Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_curve_types.h"
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_fluidsim.h"
#include "DNA_object_force.h"
#include "DNA_scene_types.h"
#include "DNA_speaker_types.h"
#include "DNA_vfont_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_camera.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_effect.h"
#include "BKE_group.h"
#include "BKE_lamp.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
#include "BKE_key.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_nla.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_report.h"
#include "BKE_sca.h"
#include "BKE_scene.h"
#include "BKE_speaker.h"
#include "BKE_texture.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_mball.h"
#include "ED_mesh.h"
#include "ED_node.h"
#include "ED_object.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_view3d.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "object_intern.h"
Go to the source code of this file.
Definition in file object_add.c.
static int add_named_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1914 of file object_add.c.
References clear_id_newpoins(), clear_sca_new_poins(), copy_object_set_idnew(), CTX_data_main(), CTX_data_scene(), DAG_ids_flush_update(), DAG_scene_sort(), UserDef::dupflag, ED_base_object_activate(), ED_object_location_from_view(), find_id(), Object::flag, Base::flag, Scene::lay, Object::lay, Base::lay, Object::loc, MAX_ID_NAME, MEM_callocN(), MEM_freeN(), NC_SCENE, ND_OB_SELECT, NULL, Base::object, object_add_duplicate_internal(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_string_get(), U, and WM_event_add_notifier().
Referenced by OBJECT_OT_add_named().
static int convert_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1276 of file object_add.c.
References add_mesh(), BASACT, Scene::base, CD_MASK_MESH, Nurb::charidx, copy_curve(), copy_mesh(), CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), curvetomesh(), DAG_id_tag_update(), DAG_scene_sort(), Object::data, Object::disp, DM_to_mesh(), duplibase_for_convert(), ED_base_object_activate(), ED_base_object_free_and_unlink(), ELEM, find_basis_mball(), ListBase::first, Object::flag, freedisplist(), MetaBall::id, Curve::id, VFont::id, Object::id, Mesh::id, id_us_plus(), IS_TAGGED, LIB_DOIT, makeDispListCurveTypes(), makeDispListMBall(), MetaBall::mat, Mesh::mat, mball_to_mesh(), MEM_dupallocN(), mesh_get_derived_final(), mesh_to_curve(), Object::modifiers, NC_OBJECT, NC_SCENE, ND_DATA, ND_DRAW, ND_MODIFIER, ND_OB_SELECT, Base::next, Nurb::next, ID::next, NULL, Curve::nurb, OB_CURVE, OB_DONE, OB_FONT, OB_MBALL, OB_MESH, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, OB_SURF, Main::object, Base::object, object_free_modifiers(), OPERATOR_FINISHED, wmOperator::ptr, Object::recalc, DerivedMesh::release, RNA_boolean_get(), RNA_enum_get(), SELECT, Object::totcol, MetaBall::totcol, Mesh::totcol, Curve::type, Object::type, ID::us, Curve::vfont, Curve::vfontb, Curve::vfontbi, Curve::vfonti, and WM_event_add_notifier().
Referenced by OBJECT_OT_convert().
static int convert_poll | ( | bContext * | C | ) | [static] |
Definition at line 1243 of file object_add.c.
References CTX_data_active_object(), CTX_data_scene(), Object::flag, Object::id, Scene::id, ID::lib, Scene::obedit, and SELECT.
Referenced by OBJECT_OT_convert().
static void copy_object_set_idnew | ( | bContext * | C, |
int | dupflag | ||
) | [static] |
Definition at line 964 of file object_add.c.
References clear_id_newpoins(), copy_texture(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), Ipo::curve, ListBase::first, Ipo::id, Lamp::id, Material::id, ID_NEW, ID_NEW_US, Main::ipo, Main::lamp, Main::mat, MAX_MTEX, Material::mtex, ID::newid, ID::next, NULL, object_relink(), set_sca_new_poins(), MTex::tex, USER_DUP_IPO, USER_DUP_MAT, and USER_DUP_TEX.
Referenced by add_named_exec(), duplicate_exec(), and make_object_duplilist_real().
Definition at line 1232 of file object_add.c.
References Object::disp, ListBase::first, makeDispListCurveTypes(), NULL, nurbs_to_mesh(), OB_MESH, object_free_modifiers(), and Object::type.
Referenced by convert_exec().
Definition at line 1252 of file object_add.c.
References Scene::base, BLI_addhead(), copy_object(), Object::flag, Base::flag, MEM_mallocN(), NULL, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, Base::object, Object::recalc, and SELECT.
Referenced by convert_exec().
static int duplicate_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1848 of file object_add.c.
References BA_DESELECT, BASACT, clear_id_newpoins(), clear_sca_new_poins(), copy_object_set_idnew(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_ids_flush_update(), DAG_scene_sort(), Object::data, UserDef::dupflag, ED_base_object_activate(), ED_base_object_select(), NC_SCENE, ND_OB_SELECT, NULL, Base::object, object_add_duplicate_internal(), OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), U, and WM_event_add_notifier().
Referenced by OBJECT_OT_duplicate().
Definition at line 887 of file object_add.c.
References Scene::basact, Scene::base, BLI_remlink(), DAG_id_type_tag(), free_libblock_us(), ID_OB, MEM_freeN(), NULL, Base::object, and Main::object.
Referenced by convert_exec(), join_armature_exec(), join_curve_exec(), join_mesh_exec(), object_delete_cb(), and object_delete_exec().
Definition at line 1820 of file object_add.c.
References clear_id_newpoins(), clear_sca_new_poins(), DAG_scene_sort(), Object::data, ED_render_id_flush_update(), NULL, Base::object, object_add_duplicate_internal(), object_relink(), and set_sca_new_poins_ob().
Referenced by mesh_separate_selected(), separate_armature_exec(), and separate_exec().
int ED_object_add_generic_get_opts | ( | bContext * | C, |
wmOperator * | op, | ||
float * | loc, | ||
float * | rot, | ||
int * | enter_editmode, | ||
unsigned int * | layer | ||
) |
Definition at line 251 of file object_add.c.
References BKE_report(), CTX_data_scene(), CTX_wm_view3d(), ED_object_rotation_from_view(), FALSE, UserDef::flag, View3D::lay, Scene::layact, View3D::localvd, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_boolean_get_array(), RNA_boolean_set(), RNA_float_get_array(), RNA_float_set_array(), RNA_struct_find_property(), RNA_struct_property_is_set(), RPT_ERROR, TRUE, U, and USER_ADD_VIEWALIGNED.
Referenced by add_primitive_circle_exec(), add_primitive_cone_exec(), add_primitive_cube_exec(), add_primitive_cylinder_exec(), add_primitive_grid_exec(), add_primitive_icosphere_exec(), add_primitive_monkey_exec(), add_primitive_plane_exec(), add_primitive_uvsphere_exec(), curvesurf_prim_add(), effector_add_type(), group_instance_add_exec(), object_add_exec(), object_add_text_exec(), object_armature_add_exec(), object_camera_add_exec(), object_lamp_add_exec(), object_metaball_add_exec(), and object_speaker_add_exec().
int ED_object_add_generic_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) |
Definition at line 245 of file object_add.c.
References wmOperatorType::exec, object_add_generic_invoke_options(), and wmOperator::type.
void ED_object_add_generic_props | ( | wmOperatorType * | ot, |
int | do_editmode | ||
) |
Definition at line 187 of file object_add.c.
References FLT_MAX, M_PI, NULL, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_boolean_layer_member(), RNA_def_float_rotation(), RNA_def_float_vector_xyz(), RNA_def_property_flag(), RNA_def_property_update_runtime(), wmOperatorType::srna, and view_align_update().
Referenced by CURVE_OT_primitive_bezier_circle_add(), CURVE_OT_primitive_bezier_curve_add(), CURVE_OT_primitive_nurbs_circle_add(), CURVE_OT_primitive_nurbs_curve_add(), CURVE_OT_primitive_nurbs_path_add(), MESH_OT_primitive_circle_add(), MESH_OT_primitive_cone_add(), MESH_OT_primitive_cube_add(), MESH_OT_primitive_cylinder_add(), MESH_OT_primitive_grid_add(), MESH_OT_primitive_ico_sphere_add(), MESH_OT_primitive_monkey_add(), MESH_OT_primitive_plane_add(), MESH_OT_primitive_uv_sphere_add(), OBJECT_OT_add(), OBJECT_OT_armature_add(), OBJECT_OT_camera_add(), OBJECT_OT_effector_add(), OBJECT_OT_group_instance_add(), OBJECT_OT_lamp_add(), OBJECT_OT_metaball_add(), OBJECT_OT_speaker_add(), OBJECT_OT_text_add(), SURFACE_OT_primitive_nurbs_surface_circle_add(), SURFACE_OT_primitive_nurbs_surface_curve_add(), SURFACE_OT_primitive_nurbs_surface_cylinder_add(), SURFACE_OT_primitive_nurbs_surface_sphere_add(), SURFACE_OT_primitive_nurbs_surface_surface_add(), and SURFACE_OT_primitive_nurbs_surface_torus_add().
Object* ED_object_add_type | ( | bContext * | C, |
int | type, | ||
float * | loc, | ||
float * | rot, | ||
int | enter_editmode, | ||
unsigned int | layer | ||
) | [read] |
Definition at line 313 of file object_add.c.
References add_object(), BASACT, CTX_data_edit_object(), CTX_data_main(), CTX_data_scene(), DAG_id_type_tag(), DAG_scene_sort(), Object::data, ED_base_object_activate(), ED_object_base_init_transform(), ED_object_enter_editmode(), ED_object_exit_editmode(), ED_render_id_flush_update(), EM_DO_UNDO, EM_FREEDATA, EM_FREEUNDO, EM_IGNORE_LAYER, EM_WAITCURSOR, ID_OB, Object::lay, NC_SCENE, ND_LAYER_CONTENT, and WM_event_add_notifier().
Referenced by createRepresentation(), curvesurf_prim_add(), effector_add_type(), group_instance_add_exec(), make_prim_ext(), object_add_exec(), object_add_text_exec(), object_armature_add_exec(), object_camera_add_exec(), object_lamp_add_exec(), object_metaball_add_exec(), and object_speaker_add_exec().
Definition at line 136 of file object_add.c.
References copy_v3_v3(), CTX_data_scene(), Object::loc, Base::object, Object::rot, and where_is_object().
Referenced by ED_object_add_type(), and txt_add_object().
void ED_object_location_from_view | ( | bContext * | C, |
float * | loc | ||
) |
Definition at line 111 of file object_add.c.
References copy_v3_v3(), CTX_data_scene(), CTX_wm_view3d(), and give_cursor().
Referenced by add_named_exec(), and object_add_generic_invoke_options().
float ED_object_new_primitive_matrix | ( | bContext * | C, |
Object * | obedit, | ||
float * | loc, | ||
float * | rot, | ||
float | primmat[][4] | ||
) |
Definition at line 154 of file object_add.c.
References copy_m3_m4(), copy_m4_m3(), copy_v3_v3(), CTX_wm_view3d(), eul_to_mat3(), View3D::grid, invert_m3(), invert_m3_m3(), mul_m3_m3m3(), mul_m3_v3(), Object::obmat, sub_v3_v3v3(), and unit_m4().
Referenced by curvesurf_prim_add(), effector_add_type(), make_prim_ext(), and object_metaball_add_exec().
void ED_object_rotation_from_view | ( | bContext * | C, |
float * | rot | ||
) |
Definition at line 122 of file object_add.c.
References copy_qt_qt(), CTX_wm_region_view3d(), quat_to_eul(), RegionView3D::viewquat, and zero_v3().
Referenced by ED_object_add_generic_get_opts().
static int effector_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 446 of file object_add.c.
References effector_add_type(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, and RNA_enum_get().
Referenced by OBJECT_OT_effector_add().
static Object* effector_add_type | ( | bContext * | C, |
wmOperator * | op, | ||
int | type | ||
) | [static] |
Definition at line 401 of file object_add.c.
References add_nurbs_primitive(), BLI_addtail(), CTX_data_main(), CTX_data_scene(), CU_3D, CU_NURBS, CU_PATH, CU_PRIM_PATH, DAG_scene_sort(), Object::data, ED_object_add_generic_get_opts(), ED_object_add_type(), ED_object_enter_editmode(), ED_object_exit_editmode(), ED_object_new_primitive_matrix(), EM_FREEDATA, Object::empty_drawtype, FALSE, Object::id, NULL, OB_CURVE, OB_EMPTY, OB_SINGLE_ARROW, object_add_collision_fields(), object_add_generic_invoke_options(), object_editcurve_get(), Object::pd, PFIELD_GUIDE, PFIELD_VORTEX, PFIELD_WIND, rename_id(), and rot.
Referenced by effector_add_exec().
static const char* get_lamp_defname | ( | int | type | ) | [static] |
Definition at line 699 of file object_add.c.
References LA_AREA, LA_HEMI, LA_LOCAL, LA_SPOT, and LA_SUN.
Referenced by object_lamp_add_exec().
static int group_instance_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 770 of file object_add.c.
References BLI_findlink(), CTX_data_main(), CTX_data_scene(), DAG_scene_sort(), Object::dup_group, ED_object_add_generic_get_opts(), ED_object_add_type(), FALSE, Group::id, Object::id, id_lib_extern(), ID::name, NC_SCENE, ND_OB_ACTIVE, OB_DUPLIGROUP, OB_EMPTY, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, rename_id(), RNA_enum_get(), rot, Object::transflag, and WM_event_add_notifier().
Referenced by OBJECT_OT_group_instance_add().
static int join_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1996 of file object_add.c.
References BKE_report(), CTX_data_active_object(), CTX_data_scene(), ELEM, join_armature_exec(), join_curve_exec(), join_mesh_exec(), OB_ARMATURE, OB_CURVE, OB_MESH, OB_SURF, Scene::obedit, object_data_is_libdata(), OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and Object::type.
Referenced by OBJECT_OT_join().
static int join_poll | ( | bContext * | C | ) | [static] |
Definition at line 1983 of file object_add.c.
References CTX_data_active_object(), ED_operator_screenactive(), ELEM4, Object::id, ID::lib, OB_ARMATURE, OB_CURVE, OB_MESH, OB_SURF, and Object::type.
Referenced by OBJECT_OT_join().
static int join_shapes_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2049 of file object_add.c.
References BKE_report(), CTX_data_active_object(), CTX_data_scene(), join_mesh_shapes_exec(), OB_MESH, Scene::obedit, object_data_is_libdata(), OPERATOR_CANCELLED, wmOperator::reports, RPT_ERROR, and Object::type.
Referenced by OBJECT_OT_join_shapes().
static int join_shapes_poll | ( | bContext * | C | ) | [static] |
Definition at line 2036 of file object_add.c.
References CTX_data_active_object(), ED_operator_screenactive(), Object::id, ID::lib, OB_MESH, and Object::type.
Referenced by OBJECT_OT_join_shapes().
static void make_object_duplilist_real | ( | bContext * | C, |
Scene * | scene, | ||
Base * | base, | ||
const short | use_base_parent, | ||
const short | use_hierarchy | ||
) | [static] |
Definition at line 1051 of file object_add.c.
References Object::adt, Scene::base, BKE_free_animdata(), BLI_addhead(), BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_pairalloc(), BLI_ghashutil_paircmp(), BLI_ghashutil_pairfree(), BLI_ghashutil_pairhash(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_strncpy(), Object::constraints, copy_m4_m4(), copy_object(), copy_object_set_idnew(), DAG_id_tag_update(), Object::disp, FALSE, ListBase::first, Object::flag, Base::flag, free_object_duplilist(), Object::id, DupliObject::index, invert_m4_m4(), ListBase::last, Object::lay, Base::lay, DupliObject::mat, Object::mat, MEM_dupallocN(), DupliObject::next, NULL, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, OB_FROMGROUP, OB_RECALC_OB, Base::object, object_apply_mat4(), object_duplilist(), Object::obmat, Object::par1, Object::par2, Object::par3, Object::parent, Object::parentinv, PAROBJECT, Object::parsubstr, Object::partype, Object::totcol, Object::transflag, and TRUE.
Referenced by object_duplicates_make_real_exec().
static Base* object_add_duplicate_internal | ( | Main * | bmain, |
Scene * | scene, | ||
Base * | base, | ||
int | dupflag | ||
) | [static] |
Definition at line 1605 of file object_add.c.
References add_to_group(), armature_rebuild_pose(), Scene::base, BKE_copy_animdata_id_action(), BLI_addhead(), copy_armature(), copy_camera(), copy_curve(), copy_lamp(), copy_lattice(), copy_material(), copy_mball(), copy_mesh(), copy_object(), copy_speaker(), Object::data, ListBase::first, bPose::flag, Base::flag, Object::fluidsimSettings, give_matarar(), Main::group, ParticleSettings::id, Material::id, Object::id, Group::id, ID_NEW_US, ID_NEW_US2, Object::mat, MEM_mallocN(), Object::mode, ParticleSystem::next, ID::next, NULL, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_FONT, OB_FROMGROUP, ob_get_key(), OB_LAMP, OB_LATTICE, OB_MBALL, OB_MESH, OB_MODE_POSE, OB_RECALC_DATA, OB_RECALC_OB, OB_RECALC_TIME, OB_SPEAKER, OB_SURF, Base::object, object_in_group(), FluidsimSettings::orgMesh, ParticleSystem::part, Object::particlesystem, Object::pose, POSE_RECALC, psys_copy_settings(), Object::recalc, Object::totcol, Object::type, USER_DUP_ACT, USER_DUP_ARM, USER_DUP_CURVE, USER_DUP_FONT, USER_DUP_LAMP, USER_DUP_MAT, USER_DUP_MBALL, USER_DUP_MESH, USER_DUP_PSYS, and USER_DUP_SURF.
Referenced by add_named_exec(), duplicate_exec(), and ED_object_add_duplicate().
static int object_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 348 of file object_add.c.
References ED_object_add_generic_get_opts(), ED_object_add_type(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and rot.
Referenced by OBJECT_OT_add().
static void object_add_generic_invoke_options | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 212 of file object_add.c.
References CTX_data_scene(), CTX_wm_view3d(), ED_object_location_from_view(), UserDef::flag, View3D::layact, Scene::layact, View3D::localvd, wmOperator::ptr, RNA_boolean_set(), RNA_boolean_set_array(), RNA_float_set_array(), RNA_struct_find_property(), RNA_struct_property_is_set(), View3D::scenelock, U, and USER_ADD_EDITMODE.
Referenced by ED_object_add_generic_invoke(), effector_add_type(), group_instance_add_exec(), object_add_text_exec(), object_armature_add_exec(), object_camera_add_exec(), object_lamp_add_exec(), object_metaball_add_exec(), object_metaball_add_invoke(), and object_speaker_add_exec().
static int object_add_text_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 606 of file object_add.c.
References CTX_data_edit_object(), ED_object_add_generic_get_opts(), ED_object_add_type(), NC_OBJECT, ND_DRAW, OB_FONT, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, rot, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_text_add().
static int object_armature_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 644 of file object_add.c.
References add_primitive_bone(), BKE_report(), CTX_data_edit_object(), CTX_data_scene(), CTX_wm_region_view3d(), CTX_wm_view3d(), DAG_id_tag_update(), ED_object_add_generic_get_opts(), ED_object_add_type(), ED_object_enter_editmode(), ED_object_exit_editmode(), EM_FREEDATA, Object::id, NC_OBJECT, ND_DRAW, NULL, OB_ARMATURE, OB_RECALC_DATA, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, rot, RPT_ERROR, TRUE, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_armature_add().
static int object_camera_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 477 of file object_add.c.
References Scene::camera, View3D::camera, CTX_data_scene(), CTX_wm_view3d(), ED_object_add_generic_get_opts(), ED_object_add_type(), FALSE, NULL, OB_CAMERA, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_set(), rot, View3D::scenelock, and TRUE.
Referenced by OBJECT_OT_camera_add().
static int object_delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 896 of file object_add.c.
References CTX_DATA_BEGIN, CTX_data_edit_object(), CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_ids_flush_update(), DAG_scene_sort(), ED_base_object_free_and_unlink(), ListBase::first, Scene::id, ID::lib, NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, ID::next, object_in_scene(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), Main::scene, SELECT, and WM_event_add_notifier().
Referenced by OBJECT_OT_delete().
static int object_duplicates_make_real_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1179 of file object_add.c.
References clear_id_newpoins(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_ids_flush_update(), DAG_scene_sort(), make_object_duplilist_real(), NC_OBJECT, NC_SCENE, ND_DRAW, ND_PARENT, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by OBJECT_OT_duplicates_make_real().
static int object_lamp_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 712 of file object_add.c.
References CTX_data_scene(), Object::data, ED_node_shader_default(), ED_object_add_generic_get_opts(), ED_object_add_type(), FALSE, get_lamp_defname(), Lamp::id, Object::id, OB_LAMP, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, rename_id(), RNA_enum_get(), rot, scene_use_new_shading_nodes(), Lamp::type, and Lamp::use_nodes.
Referenced by OBJECT_OT_lamp_add().
static int object_metaball_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 533 of file object_add.c.
References add_metaball_primitive(), CTX_data_edit_object(), DAG_id_tag_update(), ED_object_add_generic_get_opts(), ED_object_add_type(), ED_object_exit_editmode(), ED_object_new_primitive_matrix(), EM_FREEDATA, Object::id, NC_OBJECT, ND_DRAW, NULL, OB_MBALL, OB_RECALC_DATA, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), rot, TRUE, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_metaball_add().
static int object_metaball_add_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 568 of file object_add.c.
References CTX_data_edit_object(), wmOperatorType::idname, wmOperatorType::name, OB_MBALL, object_add_generic_invoke_options(), OPERATOR_CANCELLED, Object::type, wmOperator::type, uiItemsEnumO(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by OBJECT_OT_metaball_add().
void OBJECT_OT_add | ( | wmOperatorType * | ot | ) |
Definition at line 362 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_add_exec(), object_type_items, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and TRUE.
Referenced by ED_operatortypes_object().
void OBJECT_OT_add_named | ( | wmOperatorType * | ot | ) |
Definition at line 1962 of file object_add.c.
References add_named_exec(), wmOperatorType::description, ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MAX_ID_NAME, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_armature_add | ( | wmOperatorType * | ot | ) |
Definition at line 682 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_armature_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_object().
void OBJECT_OT_camera_add | ( | wmOperatorType * | ot | ) |
Definition at line 507 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_camera_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, PROP_HIDDEN, RNA_def_property_flag(), RNA_struct_type_find_property(), wmOperatorType::srna, and TRUE.
Referenced by ED_operatortypes_object().
void OBJECT_OT_convert | ( | wmOperatorType * | ot | ) |
Definition at line 1575 of file object_add.c.
References convert_exec(), convert_poll(), wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OB_MESH, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 943 of file object_add.c.
References wmOperatorType::description, ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_delete_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and WM_operator_confirm().
Referenced by ED_operatortypes_object().
void OBJECT_OT_duplicate | ( | wmOperatorType * | ot | ) |
Definition at line 1889 of file object_add.c.
References wmOperatorType::description, duplicate_exec(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, PROP_HIDDEN, RNA_def_boolean(), RNA_def_enum(), RNA_def_property_flag(), wmOperatorType::srna, TFM_TRANSLATION, and transform_mode_types.
Referenced by ED_operatortypes_object().
void OBJECT_OT_duplicates_make_real | ( | wmOperatorType * | ot | ) |
Definition at line 1205 of file object_add.c.
References wmOperatorType::description, ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_duplicates_make_real_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_effector_add | ( | wmOperatorType * | ot | ) |
Definition at line 454 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_props(), ED_operator_objectmode(), effector_add_exec(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, TRUE, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_group_instance_add | ( | wmOperatorType * | ot | ) |
Definition at line 858 of file object_add.c.
References wmOperatorType::description, DummyRNA_NULL_items, ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, FALSE, wmOperatorType::flag, group_instance_add_exec(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), RNA_def_enum_funcs(), RNA_group_itemf(), wmOperatorType::srna, and WM_enum_search_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_join | ( | wmOperatorType * | ot | ) |
Definition at line 2020 of file object_add.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, join_exec(), join_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_join_shapes | ( | wmOperatorType * | ot | ) |
Definition at line 2069 of file object_add.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, join_shapes_exec(), join_shapes_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_lamp_add | ( | wmOperatorType * | ot | ) |
Definition at line 741 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, FALSE, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, LA_AREA, LA_HEMI, LA_LOCAL, LA_SPOT, LA_SUN, lamp_type_items, wmOperatorType::name, NULL, object_lamp_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_metaball_add | ( | wmOperatorType * | ot | ) |
Definition at line 587 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, metaelem_type_items, wmOperatorType::name, object_metaball_add_exec(), object_metaball_add_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, and TRUE.
Referenced by ED_operatortypes_object().
void OBJECT_OT_speaker_add | ( | wmOperatorType * | ot | ) |
Definition at line 840 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_speaker_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_object().
void OBJECT_OT_text_add | ( | wmOperatorType * | ot | ) |
Definition at line 627 of file object_add.c.
References wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_add_text_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_object().
static int object_speaker_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 802 of file object_add.c.
References add_nla_soundstrip(), add_nlatrack(), BKE_id_add_animdata(), BKE_nlastrip_validate_name(), BKE_nlatrack_add_strip(), CFRA, CTX_data_scene(), Object::data, ED_object_add_generic_get_opts(), ED_object_add_type(), NlaStrip::end, FALSE, Object::id, NA_EDITED, NlaTrack::name, NC_ANIMATION, ND_NLA, NULL, OB_SPEAKER, object_add_generic_invoke_options(), OPERATOR_CANCELLED, OPERATOR_FINISHED, rot, NlaStrip::start, io_export_cycles_xml::strip(), and WM_event_add_notifier().
Referenced by OBJECT_OT_speaker_add().
void view_align_update | ( | struct Main * | UNUSEDmain, |
struct Scene * | UNUSEDscene, | ||
struct PointerRNA * | ptr | ||
) |
Definition at line 182 of file object_add.c.
References RNA_struct_idprops_unset().
Referenced by ED_object_add_generic_props().
EnumPropertyItem convert_target_items[] [static] |
EnumPropertyItem field_type_items[] [static] |
{ {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", ""}, {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", ""}, {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", ""}, {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, "Magnetic", ""}, {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, "Harmonic", ""}, {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, "Charge", ""}, {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, "Lennard-Jones", ""}, {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, "Texture", ""}, {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, "Curve Guide", ""}, {PFIELD_BOID, "BOID", ICON_FORCE_BOID, "Boid", ""}, {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", ""}, {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", ""}, {0, NULL, 0, NULL, NULL}}
Definition at line 385 of file object_add.c.
Referenced by rna_def_field().