Blender
V3.3
|
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math_rotation.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_curve_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_lattice_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_vfont_types.h"
#include "DNA_workspace_types.h"
#include "IMB_imbuf_types.h"
#include "BKE_anim_visualization.h"
#include "BKE_armature.h"
#include "BKE_collection.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_editlattice.h"
#include "BKE_editmesh.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_lattice.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_softbody.h"
#include "BKE_workspace.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "ED_anim_api.h"
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_gpencil.h"
#include "ED_image.h"
#include "ED_keyframes_keylist.h"
#include "ED_lattice.h"
#include "ED_mball.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_undo.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "RNA_types.h"
#include "UI_interface_icons.h"
#include "CLG_log.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
#include "object_intern.h"
Go to the source code of this file.
Classes | |
struct | MoveToCollectionData |
Typedefs | |
typedef struct MoveToCollectionData | MoveToCollectionData |
Variables | |
static CLG_LogRef | LOG = {"ed.object.edit"} |
Hide Operator | |
#define | COLLECTION_INVALID_INDEX -1 |
static bool | object_hide_poll (bContext *C) |
static int | object_hide_view_clear_exec (bContext *C, wmOperator *op) |
void | OBJECT_OT_hide_view_clear (wmOperatorType *ot) |
static int | object_hide_view_set_exec (bContext *C, wmOperator *op) |
void | OBJECT_OT_hide_view_set (wmOperatorType *ot) |
static int | object_hide_collection_exec (bContext *C, wmOperator *op) |
void | ED_collection_hide_menu_draw (const bContext *C, uiLayout *layout) |
static int | object_hide_collection_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
void | OBJECT_OT_hide_collection (wmOperatorType *ot) |
Object Link/Move to Collection Operator | |
static MoveToCollectionData * | master_collection_menu = NULL |
static void | move_to_collection_menus_items (struct uiLayout *layout, struct MoveToCollectionData *menu) |
static ListBase | selected_objects_get (bContext *C) |
static bool | move_to_collection_poll (bContext *C) |
static int | move_to_collection_exec (bContext *C, wmOperator *op) |
static int | move_to_collection_menus_create (wmOperator *op, MoveToCollectionData *menu) |
static void | move_to_collection_menus_free_recursive (MoveToCollectionData *menu) |
static void | move_to_collection_menus_free (MoveToCollectionData **menu) |
static void | move_to_collection_menu_create (bContext *C, uiLayout *layout, void *menu_v) |
static int | move_to_collection_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) |
void | OBJECT_OT_move_to_collection (wmOperatorType *ot) |
void | OBJECT_OT_link_to_collection (wmOperatorType *ot) |
#define COLLECTION_INVALID_INDEX -1 |
Definition at line 380 of file object_edit.c.
typedef struct MoveToCollectionData MoveToCollectionData |
Definition at line 108 of file object_edit.c.
Definition at line 382 of file object_edit.c.
References BKE_layer_collection_findindex(), BKE_layer_collection_has_selected_objects(), C, COLLECTION_HIDE_VIEWPORT, CTX_data_view_layer(), ListBase::first, MoveToCollectionData::index, LAYER_COLLECTION_EXCLUDE, LAYER_COLLECTION_HAS_OBJECTS, LayerCollection::layer_collections, ViewLayer::layer_collections, LISTBASE_FOREACH, uiItemIntO(), uiLayoutRow(), uiLayoutSetOperatorContext(), and WM_OP_EXEC_REGION_WIN.
Referenced by object_hide_collection_invoke().
Definition at line 125 of file object_edit.c.
References C, CTX_data_active_object(), ED_object_context(), and NULL.
Referenced by object_update_paths_poll().
Object** ED_object_array_in_mode_or_selected | ( | bContext * | C, |
bool(*)(const Object *ob, void *user_data) | filter_fn, | ||
void * | filter_user_data, | ||
uint * | r_objects_len | ||
) |
Definition at line 137 of file object_edit.c.
References blender::compositor::area(), BKE_view_layer_array_from_objects_in_mode, BKE_view_layer_array_selected_objects, C, CTX_data_view_layer(), CTX_wm_area(), GS, ID_OB, if(), MEM_mallocN, Object::mode, ID::name, NULL, OB_MODE_ALL_PAINT, OB_MODE_ALL_PAINT_GPENCIL, OB_MODE_ALL_SCULPT, OB_MODE_EDIT, OB_MODE_POSE, OBACT, SpaceProperties::pinid, SPACE_EMPTY, SPACE_PROPERTIES, and SPACE_VIEW3D.
Definition at line 1024 of file object_edit.c.
References BKE_modifiers_findby_type(), ED_object_modifier_add(), ED_object_modifier_remove(), ELEM, eModifierType_Surface, PartDeflect::forcefield, NULL, OB_CURVES_LEGACY, OB_FONT, OB_MESH, OB_SURF, PFIELD_GUIDE, PFIELD_SHAPE_SURFACE, PFIELD_TEXTURE, scene, PartDeflect::shape, and Object::type.
Referenced by forcefield_toggle_exec().
Definition at line 120 of file object_edit.c.
References C, CTX_data_pointer_get_type(), and PointerRNA::data.
Referenced by ED_object_active_context().
Definition at line 833 of file object_edit.c.
References C, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), ED_object_editmode_enter_ex(), and scene.
Definition at line 734 of file object_edit.c.
References BKE_editlattice_make(), BKE_editmesh_from_object(), BKE_editmesh_looptri_and_normals_calc(), BKE_object_is_in_editmode(), BKE_object_obdata_is_libdata(), CLOG_WARN, Object::data, DEG_id_tag_update(), ED_armature_to_edit(), ED_curve_editfont_make(), ED_curve_editnurb_make(), ED_mball_editmball_make(), EDBM_mesh_make(), ELEM, EM_NO_CONTEXT, Object::id, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, LIKELY, LOG, mesh_needs_keyindex(), Object::mode, ID::name, NC_SCENE, ND_MODE, bArmature::needs_flush_to_id, MetaBall::needs_flush_to_id, NS_EDITMODE_ARMATURE, NS_EDITMODE_CURVE, NS_EDITMODE_CURVES, NS_EDITMODE_LATTICE, NS_EDITMODE_MBALL, NS_EDITMODE_MESH, NS_EDITMODE_TEXT, NS_MODE_OBJECT, NULL, OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_MODE_EDIT, OB_SURF, Object::restore_mode, scene, ToolSettings::selectmode, Scene::toolsettings, Object::type, and WM_main_add_notifier().
Referenced by do_outliner_item_editmode_toggle(), ED_editors_init(), ED_object_add_type_with_obdata(), ED_object_editmode_enter(), ED_undo_object_editmode_restore_helper(), editmode_toggle_exec(), effector_add_exec(), make_prim_init(), and object_armature_add_exec().
Definition at line 695 of file object_edit.c.
References C, CTX_data_edit_object(), CTX_data_main(), CTX_data_scene(), ED_object_editmode_exit_ex(), and scene.
Referenced by object_batch_delete_hierarchy_fn().
bool ED_object_editmode_exit_ex | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct Object * | obedit, | ||
int | flag | ||
) |
flag |
|
Definition at line 653 of file object_edit.c.
References BKE_particlesystem_reset_all(), BKE_ptcache_ids_from_object(), BKE_ptcache_object_reset(), BLI_freelistN(), DEG_id_tag_update(), ED_object_editmode_load_free_ex(), EM_FREEDATA, Object::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, LISTBASE_FOREACH, Object::mode, NC_SCENE, ND_MODE, NS_MODE_OBJECT, OB_MODE_EDIT, PTCACHE_OUTDATED, PTCACHE_RESET_OUTDATED, PTCACHE_TYPE_PARTICLES, scene, UNLIKELY, and WM_main_add_notifier().
Referenced by curvesurf_prim_add(), do_outliner_item_editmode_toggle(), ED_object_add_type_with_obdata(), ED_object_editmode_exit(), ED_object_editmode_exit_multi_ex(), ed_object_mode_generic_exit_ex(), ED_undo_object_editmode_restore_helper(), editmode_toggle_exec(), effector_add_exec(), make_prim_finish(), object_armature_add_exec(), object_metaball_add_exec(), outliner_object_delete_fn(), and posemode_exec().
Definition at line 726 of file object_edit.c.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), ED_object_editmode_exit_multi_ex(), and scene.
bool ED_object_editmode_exit_multi_ex | ( | Main * | bmain, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
int | flag | ||
) |
Definition at line 708 of file object_edit.c.
References ED_object_editmode_exit_ex(), LISTBASE_FOREACH, Object::mode, NULL, OB_MODE_EDIT, OBEDIT_FROM_VIEW_LAYER, ViewLayer::object_bases, scene, and Object::type.
Referenced by ED_object_base_activate_with_mode_exit_if_needed(), and ED_object_editmode_exit_multi().
Support freeing edit-mode data without flushing it back to the object.
Definition at line 703 of file object_edit.c.
References ED_object_editmode_load_free_ex().
Referenced by ED_editors_exit().
Definition at line 648 of file object_edit.c.
References ED_object_editmode_load_free_ex().
Referenced by bake_targets_init_vertex_colors(), and ED_editors_flush_edits_for_object_ex().
|
static |
Load edit-mode data back into the object.
load_data | Flush the edit-mode data back to the object. |
free_data | Free the edit-mode data. |
Definition at line 510 of file object_edit.c.
References BKE_editlattice_free(), BKE_editlattice_load(), BKE_object_data_editmode_flush_ptr_get(), BKE_pose_channels_clear_with_null_bone(), BLI_assert, BMEditMesh::bm, CLOG_WARN, Object::data, DEG_relations_tag_update(), ED_armature_edit_free(), ED_armature_from_edit(), ED_curve_editfont_free(), ED_curve_editfont_load(), ED_curve_editnurb_free(), ED_curve_editnurb_load(), ED_mball_editmball_free(), ED_mball_editmball_load(), ED_mesh_mirror_spatial_table_end(), ED_mesh_mirror_topo_table_end(), EDBM_mesh_free_data(), EDBM_mesh_load_ex(), bArmature::edbo, Mesh::edit_mesh, MetaBall::editelems, Curve::editfont, Lattice::editlatt, Curve::editnurb, ELEM, Mesh::id, LOG, MEM_freeN, MESH_MAX_VERTS, ID::name, NULL, OB_ARMATURE, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, Object::pose, BMesh::totvert, and Object::type.
Referenced by ED_object_editmode_exit_ex(), ED_object_editmode_free_ex(), and ED_object_editmode_load().
Clear motion paths for all objects.
Definition at line 1407 of file object_edit.c.
References C, CTX_DATA_BEGIN, CTX_DATA_END, and object_clear_mpath().
Referenced by object_clear_paths_exec().
void ED_objects_recalculate_paths | ( | struct bContext * | C, |
struct Scene * | scene, | ||
eObjectPathCalcRange | range, | ||
struct ListBase * | ld_objects | ||
) |
For the objects with animation: update paths for those that have got them This should selectively update paths that exist.
To be called from various tools that do incremental updates
Definition at line 1140 of file object_edit.c.
References animviz_calc_motionpaths(), animviz_depsgraph_build(), animviz_get_object_motionpaths(), ANIMVIZ_RECALC_PATHS, bPose::avs, Object::avs, BLI_freelistN(), C, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_view_layer(), Object::data, DEG_graph_free(), DEG_id_tag_update(), depsgraph, has_object_motion_paths(), has_pose_motion_paths(), Object::id, ID_RECALC_COPY_ON_WRITE, LISTBASE_FOREACH, NULL, OBJECT_PATH_CALC_RANGE_CURRENT_FRAME, object_path_convert_range(), Object::pose, bAnimVizSettings::recalc, and scene.
Referenced by ED_objects_recalculate_paths_selected(), and ED_objects_recalculate_paths_visible().
void ED_objects_recalculate_paths_selected | ( | bContext * | C, |
Scene * | scene, | ||
eObjectPathCalcRange | range | ||
) |
Definition at line 1104 of file object_edit.c.
References BLI_addtail(), BLI_freelistN(), BLI_genericNodeN(), C, CTX_DATA_BEGIN, CTX_DATA_END, ED_objects_recalculate_paths(), NULL, and scene.
Referenced by object_calculate_paths_exec(), object_update_paths_exec(), recalcData_objects(), and special_aftertrans_update__object().
void ED_objects_recalculate_paths_visible | ( | bContext * | C, |
Scene * | scene, | ||
eObjectPathCalcRange | range | ||
) |
Definition at line 1117 of file object_edit.c.
References BLI_addtail(), BLI_freelistN(), BLI_genericNodeN(), C, CTX_DATA_BEGIN, CTX_DATA_END, ED_objects_recalculate_paths(), NULL, and scene.
Referenced by object_update_all_paths_exec().
|
static |
Definition at line 844 of file object_edit.c.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_message_bus(), CTX_wm_view3d(), ED_object_editmode_enter_ex(), ED_object_editmode_exit_ex(), ED_object_mode_compat_set(), EM_FREEDATA, EM_NO_CONTEXT, FOREACH_OBJECT_BEGIN, FOREACH_OBJECT_END, FOREACH_SELECTED_OBJECT_BEGIN, FOREACH_SELECTED_OBJECT_END, G, Object::id, Object::mode, OB_MODE_EDIT, OBACT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, scene, Object::type, WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by OBJECT_OT_editmode_toggle().
Definition at line 894 of file object_edit.c.
References C, CTX_data_active_object(), Object::data, ELEM, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, Object::mode, NULL, OB_HIDE_VIEWPORT, OB_MODE_EDIT, OB_TYPE_SUPPORT_EDITMODE, Object::type, and Object::visibility_flag.
Referenced by OBJECT_OT_editmode_toggle().
|
static |
Definition at line 1046 of file object_edit.c.
References BKE_partdeflect_new(), C, CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), DEG_id_tag_update(), ED_object_check_force_modifiers(), PartDeflect::forcefield, Object::id, ID_RECALC_TRANSFORM, NC_OBJECT, ND_DRAW, ND_MODIFIER, NULL, OPERATOR_FINISHED, Object::pd, PFIELD_FORCE, and WM_event_add_notifier().
Referenced by OBJECT_OT_forcefield_toggle().
Definition at line 1130 of file object_edit.c.
References Object::avs, MOTIONPATH_BAKE_HAS_PATHS, and bAnimVizSettings::path_bakeflag.
Referenced by ED_objects_recalculate_paths().
Definition at line 1135 of file object_edit.c.
References bPose::avs, MOTIONPATH_BAKE_HAS_PATHS, bAnimVizSettings::path_bakeflag, and Object::pose.
Referenced by ED_objects_recalculate_paths().
Definition at line 483 of file object_edit.c.
References ELEM, eModifierType_Hook, Mesh::key, LISTBASE_FOREACH, Main::objects, PARVERT1, and PARVERT3.
Referenced by ED_object_editmode_enter_ex().
|
static |
Definition at line 1832 of file object_edit.c.
References BKE_collection_add(), BKE_collection_from_index(), BKE_collection_object_add(), BKE_collection_object_move(), BKE_report(), BKE_reportf(), BLI_findptr(), BLI_freelistN(), BLI_listbase_is_single(), C, CTX_data_main(), CTX_data_scene(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), ListBase::first, Collection::gobject, Collection::id, Object::id, Scene::id, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, wmOperator::idname, LISTBASE_FOREACH, MAX_NAME, ID::name, NC_SCENE, ND_LAYER, ND_LAYER_CONTENT, ND_OB_ACTIVE, NULL, Main::objects, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_property_int_get(), RNA_property_is_set(), RNA_string_get(), RNA_struct_find_property(), RPT_ERROR, RPT_INFO, scene, selected_objects_get(), STREQ, and WM_event_add_notifier().
Referenced by move_to_collection_invoke(), OBJECT_OT_link_to_collection(), and OBJECT_OT_move_to_collection().
|
static |
Definition at line 2005 of file object_edit.c.
References BKE_collection_from_index(), BKE_collection_new_name_get(), BKE_report(), BLI_freelistN(), BLI_listbase_is_empty(), C, MoveToCollectionData::collection, CTX_data_scene(), CTX_IFACE_, Scene::master_collection, master_collection_menu, MAX_NAME, MEM_callocN, move_to_collection_exec(), move_to_collection_menu_create(), move_to_collection_menus_create(), move_to_collection_menus_free(), wmOperatorType::name, NULL, OPERATOR_CANCELLED, OPERATOR_INTERFACE, MoveToCollectionData::ot, wmOperatorType::prop, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_property_int_get(), RNA_property_is_set(), RNA_property_string_set(), RNA_struct_find_property(), RPT_ERROR, scene, selected_objects_get(), wmOperatorType::translation_context, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), uiLayoutSetOperatorContext(), WM_OP_INVOKE_DEFAULT, and WM_operator_props_dialog_popup().
Referenced by OBJECT_OT_link_to_collection(), and OBJECT_OT_move_to_collection().
|
static |
Definition at line 1952 of file object_edit.c.
References BKE_collection_ui_name_get(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, MoveToCollectionData::collection, CTX_data_scene(), CTX_IFACE_, PointerRNA::data, wmOperatorType::idname, MoveToCollectionData::index, LISTBASE_FOREACH, Scene::master_collection, move_to_collection_menus_items(), wmOperatorType::name, NULL, MoveToCollectionData::ot, MoveToCollectionData::ptr, RNA_boolean_set(), RNA_int_set(), scene, MoveToCollectionData::submenus, UI_block_flag_enable(), UI_BLOCK_IS_FLIP, UI_icon_color_from_collection(), uiItemFullO_ptr(), uiItemIntO(), uiItemS(), uiLayoutGetBlock(), WM_OP_INVOKE_DEFAULT, and WM_operator_properties_create_ptr().
Referenced by move_to_collection_invoke(), and move_to_collection_menus_items().
|
static |
Definition at line 1918 of file object_edit.c.
References BLI_addtail(), Collection::children, MoveToCollectionData::collection, MoveToCollectionData::index, LISTBASE_FOREACH, MEM_callocN, MoveToCollectionData::ot, MoveToCollectionData::submenus, and wmOperator::type.
Referenced by move_to_collection_invoke().
|
static |
Definition at line 1941 of file object_edit.c.
References MEM_freeN, move_to_collection_menus_free_recursive(), and NULL.
Referenced by move_to_collection_invoke().
|
static |
Definition at line 1933 of file object_edit.c.
References BLI_freelistN(), LISTBASE_FOREACH, and MoveToCollectionData::submenus.
Referenced by move_to_collection_menus_free().
|
static |
Definition at line 1985 of file object_edit.c.
References BLI_listbase_is_empty(), MoveToCollectionData::collection, Collection::id, wmOperatorType::idname, MoveToCollectionData::index, move_to_collection_menu_create(), ID::name, MoveToCollectionData::ot, MoveToCollectionData::submenus, UI_icon_color_from_collection(), uiItemIntO(), and uiItemMenuF().
Referenced by move_to_collection_menu_create().
Definition at line 1824 of file object_edit.c.
References C, CTX_wm_space_outliner(), ED_operator_objectmode(), ED_outliner_collections_editor_poll(), and NULL.
Referenced by OBJECT_OT_link_to_collection(), and OBJECT_OT_move_to_collection().
|
static |
Definition at line 1229 of file object_edit.c.
References animviz_motionpath_compute_range(), animviz_verify_motionpaths(), C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), ED_objects_recalculate_paths_selected(), NC_OBJECT, ND_DRAW_ANIMVIZ, ND_POSE, ND_TRANSFORM, NULL, OBJECT_PATH_CALC_RANGE_FULL, OPERATOR_FINISHED, bAnimVizSettings::path_range, bAnimVizSettings::path_type, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_paths_calculate().
|
static |
Definition at line 1208 of file object_edit.c.
References Object::avs, C, CTX_data_active_object(), NULL, OPERATOR_CANCELLED, bAnimVizSettings::path_range, bAnimVizSettings::path_type, wmOperator::ptr, RNA_enum_set(), and WM_operator_props_dialog_popup().
Referenced by OBJECT_OT_paths_calculate().
Definition at line 1395 of file object_edit.c.
References animviz_free_motionpath(), Object::avs, DEG_id_tag_update(), Object::id, ID_RECALC_COPY_ON_WRITE, MOTIONPATH_BAKE_HAS_PATHS, Object::mpath, NULL, and bAnimVizSettings::path_bakeflag.
Referenced by ED_objects_clear_paths().
|
static |
Definition at line 1426 of file object_edit.c.
References C, ED_objects_clear_paths(), NC_OBJECT, ND_TRANSFORM, NULL, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), and WM_event_add_notifier().
Referenced by object_clear_paths_invoke(), and OBJECT_OT_paths_clear().
|
static |
Definition at line 1440 of file object_edit.c.
References C, KM_SHIFT, wmEvent::modifier, object_clear_paths_exec(), wmOperator::ptr, RNA_boolean_set(), and RNA_struct_property_is_set().
Referenced by OBJECT_OT_paths_clear().
|
static |
Definition at line 341 of file object_edit.c.
References BKE_layer_collection_from_index(), BKE_layer_collection_isolate_global(), BKE_layer_collection_isolate_local(), BKE_layer_collection_local_sync(), C, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), View3D::flag, Scene::id, ID_RECALC_BASE_FLAGS, MoveToCollectionData::index, LAYER_COLLECTION_HIDE_VIEWPORT, LayerCollection::local_collections_bits, View3D::local_collections_uuid, NC_SCENE, ND_OB_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), LayerCollection::runtime_flag, scene, V3D_LOCAL_COLLECTIONS, and WM_event_add_notifier().
Referenced by object_hide_collection_invoke(), and OBJECT_OT_hide_collection().
|
static |
Definition at line 418 of file object_edit.c.
References C, COLLECTION_INVALID_INDEX, CTX_IFACE_, ED_collection_hide_menu_draw(), MoveToCollectionData::index, KM_SHIFT, wmEvent::modifier, wmOperatorType::name, object_hide_collection_exec(), OPERATOR_INTERFACE, wmOperator::ptr, RNA_int_get(), RNA_property_boolean_set(), RNA_property_is_set(), RNA_struct_find_property(), wmOperatorType::translation_context, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), and UI_popup_menu_layout().
Referenced by OBJECT_OT_hide_collection().
Definition at line 222 of file object_edit.c.
References C, CTX_wm_space_outliner(), ED_operator_view3d_active(), ED_outliner_collections_editor_poll(), and NULL.
Referenced by OBJECT_OT_hide_view_clear(), and OBJECT_OT_hide_view_set().
|
static |
Definition at line 230 of file object_edit.c.
References BASE_HIDDEN, BASE_SELECTED, BKE_layer_collection_sync(), BKE_scene_object_base_flag_sync_from_base(), C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), Scene::id, ID_RECALC_BASE_FLAGS, LISTBASE_FOREACH, NC_SCENE, ND_OB_SELECT, ND_OB_VISIBLE, ViewLayer::object_bases, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), scene, select(), and WM_event_add_notifier().
Referenced by OBJECT_OT_hide_view_clear().
|
static |
Definition at line 281 of file object_edit.c.
References BA_DESELECT, BASE_HIDDEN, BASE_SELECTED, BASE_VISIBLE_VIEWLAYER, BKE_layer_collection_sync(), C, CTX_data_scene(), CTX_data_view_layer(), DEG_id_tag_update(), ED_object_base_select(), Scene::id, ID_RECALC_BASE_FLAGS, LISTBASE_FOREACH, NC_SCENE, ND_OB_SELECT, ND_OB_VISIBLE, ViewLayer::object_bases, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_hide_view_set().
|
static |
Mode Switching Logic (internal details).
Notes:
Supported Cases:
Definition at line 1667 of file object_edit.c.
References C, CTX_data_active_object(), ED_object_mode_compat_test(), ED_object_mode_set_ex(), EDBM_selectmode_set_multi(), wmOperator::idname, Object::mode, OB_GPENCIL, OB_MESH, OB_MODE_EDIT, OB_MODE_EDIT_GPENCIL, OB_MODE_OBJECT, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, wmOperator::reports, Object::restore_mode, RNA_boolean_get(), RNA_enum_get(), RNA_property_enum_get(), RNA_property_is_set(), RNA_struct_find_property(), STREQ, and Object::type.
Referenced by OBJECT_OT_mode_set().
|
static |
Definition at line 1626 of file object_edit.c.
References C, CTX_data_active_object(), ED_object_mode_compat_test(), input, NULL, OB_MODE_OBJECT, RNA_enum_item_add(), RNA_enum_item_end(), RNA_enum_items_add_value(), and rna_enum_object_mode_items.
Referenced by OBJECT_OT_mode_set().
Definition at line 1660 of file object_edit.c.
References C, CTX_data_active_object(), and ED_operator_object_active_editable_ex().
Referenced by OBJECT_OT_mode_set().
void OBJECT_OT_editmode_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 912 of file object_edit.c.
References wmOperatorType::description, editmode_toggle_exec(), editmode_toggle_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_forcefield_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1069 of file object_edit.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, forcefield_toggle_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hide_collection | ( | wmOperatorType * | ot | ) |
Definition at line 444 of file object_edit.c.
References COLLECTION_INVALID_INDEX, wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_hide_collection_exec(), object_hide_collection_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hide_view_clear | ( | wmOperatorType * | ot | ) |
Definition at line 263 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_hide_poll(), object_hide_view_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hide_view_set | ( | wmOperatorType * | ot | ) |
Definition at line 321 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_hide_poll(), object_hide_view_set_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_link_to_collection | ( | wmOperatorType * | ot | ) |
Definition at line 2112 of file object_edit.c.
References COLLECTION_INVALID_INDEX, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_NAME, move_to_collection_exec(), move_to_collection_invoke(), move_to_collection_poll(), wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_mode_set | ( | wmOperatorType * | ot | ) |
Definition at line 1760 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OB_MODE_OBJECT, object_mode_set_exec(), object_mode_set_itemf(), object_mode_set_poll(), ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), rna_enum_object_mode_items, and wmOperatorType::srna.
Referenced by ED_operatortypes_object(), and OBJECT_OT_mode_set_with_submode().
void OBJECT_OT_mode_set_with_submode | ( | wmOperatorType * | ot | ) |
Definition at line 1785 of file object_edit.c.
References wmOperatorType::idname, wmOperatorType::name, OBJECT_OT_mode_set(), ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_enum_flag(), RNA_def_property_flag(), rna_enum_mesh_select_mode_items, and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_move_to_collection | ( | wmOperatorType * | ot | ) |
Definition at line 2073 of file object_edit.c.
References COLLECTION_INVALID_INDEX, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MAX_NAME, move_to_collection_exec(), move_to_collection_invoke(), move_to_collection_poll(), wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int(), RNA_def_property_flag(), RNA_def_string(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_paths_calculate | ( | wmOperatorType * | ot | ) |
Definition at line 1260 of file object_edit.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, MOTIONPATH_RANGE_SCENE, MOTIONPATH_TYPE_RANGE, wmOperatorType::name, object_calculate_paths_exec(), object_calculate_paths_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), rna_enum_motionpath_display_type_items, rna_enum_motionpath_range_items, and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_paths_clear | ( | wmOperatorType * | ot | ) |
Definition at line 1448 of file object_edit.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_clear_paths_exec(), object_clear_paths_invoke(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_paths_update | ( | wmOperatorType * | ot | ) |
Definition at line 1332 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_update_paths_exec(), object_update_paths_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_paths_update_visible | ( | wmOperatorType * | ot | ) |
Definition at line 1373 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_update_all_paths_exec(), object_update_all_paths_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_posemode_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 1003 of file object_edit.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and posemode_exec().
Referenced by ED_operatortypes_object().
void OBJECT_OT_shade_flat | ( | wmOperatorType * | ot | ) |
Definition at line 1571 of file object_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, shade_poll(), and shade_smooth_exec().
Referenced by ED_operatortypes_object().
void OBJECT_OT_shade_smooth | ( | wmOperatorType * | ot | ) |
Definition at line 1586 of file object_edit.c.
References DEG2RADF, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ANGLE, PROP_FLOAT, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_property(), RNA_def_property_flag(), RNA_def_property_float_default(), RNA_def_property_range(), RNA_def_property_ui_text(), shade_poll(), shade_smooth_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
|
static |
Definition at line 1091 of file object_edit.c.
References ANIMVIZ_CALC_RANGE_CHANGED, ANIMVIZ_CALC_RANGE_CURRENT_FRAME, ANIMVIZ_CALC_RANGE_FULL, OBJECT_PATH_CALC_RANGE_CHANGED, OBJECT_PATH_CALC_RANGE_CURRENT_FRAME, and OBJECT_PATH_CALC_RANGE_FULL.
Referenced by ED_objects_recalculate_paths().
|
static |
Definition at line 1358 of file object_edit.c.
References C, CTX_data_scene(), ED_objects_recalculate_paths_visible(), NC_OBJECT, ND_POSE, ND_TRANSFORM, NULL, OBJECT_PATH_CALC_RANGE_FULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_paths_update_visible().
Definition at line 1353 of file object_edit.c.
Referenced by OBJECT_OT_paths_update_visible().
|
static |
Definition at line 1306 of file object_edit.c.
References animviz_motionpath_compute_range(), animviz_verify_motionpaths(), C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), ED_objects_recalculate_paths_selected(), NC_OBJECT, ND_DRAW_ANIMVIZ, ND_POSE, ND_TRANSFORM, NULL, OBJECT_PATH_CALC_RANGE_FULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_paths_update().
Definition at line 1296 of file object_edit.c.
References Object::avs, C, ED_object_active_context(), ED_operator_object_active_editable(), MOTIONPATH_BAKE_HAS_PATHS, and bAnimVizSettings::path_bakeflag.
Referenced by OBJECT_OT_paths_update().
|
static |
Definition at line 934 of file object_edit.c.
References BKE_id_is_editable(), C, CTX_data_active_base(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_message_bus(), CTX_wm_view3d(), ED_object_editmode_exit_ex(), ED_object_mode_compat_set(), ED_object_posemode_enter(), ED_object_posemode_enter_ex(), ED_object_posemode_exit(), ED_object_posemode_exit_ex(), EM_FREEDATA, FOREACH_OBJECT_BEGIN, FOREACH_OBJECT_END, FOREACH_SELECTED_OBJECT_BEGIN, FOREACH_SELECTED_OBJECT_END, G, Object::id, Object::mode, NULL, OB_ARMATURE, OB_MODE_OBJECT, OB_MODE_POSE, OBEDIT_FROM_VIEW_LAYER, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::reports, scene, Object::type, WM_msg_publish_rna_prop, and WM_toolsystem_update_from_context_view3d().
Referenced by OBJECT_OT_posemode_toggle().
Definition at line 1807 of file object_edit.c.
References BLI_addtail(), BLI_genericNodeN(), C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_wm_space_outliner(), ED_outliner_selected_objects_get(), NULL, and Main::objects.
Referenced by move_to_collection_exec(), and move_to_collection_invoke().
Definition at line 1557 of file object_edit.c.
References C, CTX_data_view_layer(), Object::data, ID_IS_OVERRIDE_LIBRARY, Object::mode, NULL, OB_MODE_EDIT, OB_MODE_SCULPT, and OBACT.
Referenced by OBJECT_OT_shade_flat(), and OBJECT_OT_shade_smooth().
|
static |
Definition at line 1475 of file object_edit.c.
References BKE_curve_smooth_flag_set(), BKE_id_is_editable(), BKE_mesh_auto_smooth_flag_set(), BKE_mesh_batch_cache_dirty_tag(), BKE_MESH_BATCH_DIRTY_ALL, BKE_mesh_smooth_flag_set(), BKE_report(), BLI_addtail(), BLI_freelistN(), C, CTX_data_main(), CTX_data_selected_editable_objects(), CTX_data_view_layer(), data, Object::data, PointerRNA::data, DEG_id_tag_update(), ELEM, ListBase::first, Object::id, ID_RECALC_GEOMETRY, wmOperator::idname, LIB_TAG_DOIT, LISTBASE_FOREACH, Object::mode, NC_OBJECT, ND_DRAW, NULL, OB_CURVES_LEGACY, OB_MESH, OB_MODE_ALL_PAINT, OB_SURF, OBACT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, CollectionPointerLink::ptr, wmOperator::reports, RNA_boolean_get(), RNA_float_get(), RPT_WARNING, STREQ, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_shade_flat(), and OBJECT_OT_shade_smooth().
|
static |
Definition at line 108 of file object_edit.c.
Referenced by ED_object_editmode_enter_ex(), and ED_object_editmode_load_free_ex().
|
static |
Definition at line 2003 of file object_edit.c.
Referenced by move_to_collection_invoke().