Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "RNA_prototypes.h"
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_resources.h"
#include "object_intern.h"
Go to the source code of this file.
|
static |
Definition at line 508 of file object_hook.c.
References bArmature::act_bone, add_hook_object_new(), BKE_modifier_get_info(), BKE_modifier_new(), BKE_modifier_unique_name(), BKE_object_transform_copy(), BKE_object_where_is_calc(), BKE_pose_channel_active_if_layer_visible(), BKE_report(), BLI_assert, BLI_insertlinkbefore(), BLI_snprintf(), BLI_strncpy(), C, HookModifierData::cent, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), DEG_relations_tag_update(), depsgraph, eModifierType_Hook, eModifierTypeType_OnlyDeform, ListBase::first, Object::id, Object::imat, HookModifierData::indexar, HookModifierData::indexar_num, invert_m4_m4(), LIKELY, Object::loc, MAX_NAME, HookModifierData::modifier, Object::modifiers, mul_m4_series, mul_v3_m4v3(), Bone::name, ModifierData::name, HookModifierData::name, ID::name, ModifierData::next, NULL, OB_ARMATURE, HookModifierData::object, OBJECT_ADDHOOK_NEWOB, OBJECT_ADDHOOK_SELOB_BONE, object_hook_index_array(), Object::obmat, HookModifierData::parentinv, bPoseChannel::pose_mat, RPT_ERROR, RPT_WARNING, scene, HookModifierData::subtarget, ModifierTypeInfo::type, ModifierData::type, Object::type, and unit_m4().
Referenced by object_add_hook_newob_exec(), and object_add_hook_selob_exec().
|
static |
Definition at line 487 of file object_hook.c.
References ViewLayer::basact, BKE_object_add(), BKE_view_layer_base_find(), BLI_assert, Base::local_view_bits, View3D::local_view_uuid, View3D::localvd, NULL, OB_EMPTY, and Base::object.
Referenced by add_hook_object().
|
static |
Definition at line 719 of file object_hook.c.
References Freestyle::a, C, CTX_data_edit_object(), DummyRNA_NULL_items, eModifierType_Hook, ListBase::first, EnumPropertyItem::icon, EnumPropertyItem::identifier, Object::modifiers, ModifierData::name, EnumPropertyItem::name, ModifierData::next, NULL, RNA_enum_item_add(), RNA_enum_item_end(), ModifierData::type, and EnumPropertyItem::value.
Referenced by OBJECT_OT_hook_assign(), OBJECT_OT_hook_recenter(), OBJECT_OT_hook_remove(), OBJECT_OT_hook_reset(), and OBJECT_OT_hook_select().
Definition at line 467 of file object_hook.c.
References C, CTX_data_edit_object(), ED_operator_editlattice(), ED_operator_editmesh(), and ED_operator_editsurfcurve().
Referenced by OBJECT_OT_hook_add_newob(), OBJECT_OT_hook_add_selob(), OBJECT_OT_hook_assign(), OBJECT_OT_hook_recenter(), OBJECT_OT_hook_remove(), OBJECT_OT_hook_reset(), and OBJECT_OT_hook_select().
|
static |
Definition at line 663 of file object_hook.c.
References add_hook_object(), C, CTX_data_edit_object(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), DEG_id_tag_update(), Scene::id, ID_RECALC_SELECT, NC_OBJECT, NC_SCENE, ND_MODIFIER, ND_OB_SELECT, NULL, OBJECT_ADDHOOK_NEWOB, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_add_newob().
|
static |
Definition at line 607 of file object_hook.c.
References add_hook_object(), BKE_report(), C, CTX_DATA_BEGIN, CTX_data_edit_object(), CTX_DATA_END, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), NC_OBJECT, ND_MODIFIER, NULL, OB_ARMATURE, OBJECT_ADDHOOK_SELOB, OBJECT_ADDHOOK_SELOB_BONE, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, scene, Object::type, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_add_selob().
|
static |
Definition at line 872 of file object_hook.c.
References BKE_report(), C, HookModifierData::cent, copy_v3_v3(), CTX_data_main(), CTX_data_pointer_get_type(), CTX_data_scene(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, HookModifierData::indexar, HookModifierData::indexar_num, MAX_NAME, MEM_freeN, NC_OBJECT, ND_MODIFIER, NULL, object_hook_from_context(), object_hook_index_array(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, RPT_WARNING, scene, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_assign().
|
static |
Definition at line 420 of file object_hook.c.
References BLI_findlink(), C, CTX_data_edit_object(), PointerRNA::data, eModifierType_Hook, HookModifierData::modifier, Object::modifiers, NULL, PointerRNA::owner_id, ptr, and ModifierData::type.
Referenced by object_hook_assign_exec(), object_hook_recenter_exec(), object_hook_reset_exec(), and object_hook_select_exec().
|
static |
Definition at line 319 of file object_hook.c.
References BKE_editmesh_looptri_and_normals_calc(), Object::data, DEG_id_tag_update(), ED_curve_editnurb_load(), ED_curve_editnurb_make(), EDBM_mesh_load(), EDBM_mesh_make(), Mesh::edit_mesh, Lattice::editlatt, EditLatt::latt, NULL, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, return_editcurve_indexar(), return_editlattice_indexar(), return_editmesh_indexar(), return_editmesh_vgroup(), scene, ToolSettings::selectmode, Scene::toolsettings, and Object::type.
Referenced by add_hook_object(), and object_hook_assign_exec().
|
static |
Definition at line 821 of file object_hook.c.
References BKE_report(), C, HookModifierData::cent, copy_m3_m4(), CTX_data_pointer_get_type(), CTX_data_scene(), Scene::cursor, DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, invert_m3_m3(), View3DCursor::location, mul_m3_v3(), NC_OBJECT, ND_MODIFIER, NULL, object_hook_from_context(), Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, scene, sub_v3_v3v3(), and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_recenter().
|
static |
Definition at line 696 of file object_hook.c.
References BKE_modifier_free(), BKE_modifier_remove_from_list(), BKE_report(), BLI_findlink(), C, CTX_data_edit_object(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, Object::modifiers, NC_OBJECT, ND_MODIFIER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_remove().
|
static |
Definition at line 777 of file object_hook.c.
References BKE_object_modifier_hook_reset(), BKE_report(), C, CTX_data_pointer_get_type(), DEG_id_tag_update(), Object::id, ID_RECALC_GEOMETRY, NC_OBJECT, ND_MODIFIER, NULL, object_hook_from_context(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_reset().
|
static |
Definition at line 445 of file object_hook.c.
References HookModifierData::indexar, NULL, OB_CURVES_LEGACY, OB_LATTICE, OB_MESH, OB_SURF, select_editbmesh_hook(), select_editcurve_hook(), select_editlattice_hook(), and Object::type.
Referenced by object_hook_select_exec().
|
static |
Definition at line 935 of file object_hook.c.
References BKE_report(), C, CTX_data_pointer_get_type(), Object::data, DEG_id_tag_update(), ID_RECALC_SELECT, NC_GEOM, ND_SELECT, NULL, object_hook_from_context(), object_hook_select(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by OBJECT_OT_hook_select().
void OBJECT_OT_hook_add_newob | ( | wmOperatorType * | ot | ) |
Definition at line 681 of file object_hook.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_add_hook_newob_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_add_selob | ( | wmOperatorType * | ot | ) |
Definition at line 642 of file object_hook.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_add_hook_selob_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_assign | ( | wmOperatorType * | ot | ) |
Definition at line 910 of file object_hook.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, hook_mod_itemf(), hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_hook_assign_exec(), OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_recenter | ( | wmOperatorType * | ot | ) |
Definition at line 849 of file object_hook.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, hook_mod_itemf(), hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_hook_recenter_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_remove | ( | wmOperatorType * | ot | ) |
Definition at line 750 of file object_hook.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, hook_mod_itemf(), hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, object_hook_remove_exec(), OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_reset | ( | wmOperatorType * | ot | ) |
Definition at line 798 of file object_hook.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, hook_mod_itemf(), hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_hook_reset_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_hook_select | ( | wmOperatorType * | ot | ) |
Definition at line 957 of file object_hook.c.
References wmOperatorType::description, DummyRNA_NULL_items, wmOperatorType::exec, wmOperatorType::flag, hook_mod_itemf(), hook_op_edit_poll(), wmOperatorType::idname, wmOperatorType::name, object_hook_select_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_ENUM_NO_TRANSLATE, RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
|
static |
Definition at line 226 of file object_hook.c.
References Freestyle::a, add_v3_v3(), CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, LISTBASE_FOREACH, MEM_mallocN, mul_v3_fl(), object_editcurve_get(), SELECT, BezTriple::vec, BPoint::vec, and zero_v3().
Referenced by object_hook_index_array().
|
static |
Definition at line 156 of file object_hook.c.
References Freestyle::a, add_v3_v3(), Lattice::def, BPoint::f1, BPoint::hide, MEM_mallocN, mul_v3_fl(), Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, BPoint::vec, and zero_v3().
Referenced by object_hook_index_array().
|
static |
Definition at line 57 of file object_hook.c.
References add_v3_v3(), BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_VERTS_OF_MESH, BMVert::co, MEM_mallocN, mul_v3_fl(), and zero_v3().
Referenced by object_hook_index_array().
|
static |
Definition at line 94 of file object_hook.c.
References add_v3_v3(), BKE_defvert_find_weight(), BKE_object_defgroup_active_index_get(), BKE_object_defgroup_list(), BLI_findlink(), BLI_strncpy(), BMEditMesh::bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_MESH, BM_VERTS_OF_MESH, CD_MDEFORMVERT, BMVert::co, CustomData_get_offset(), mul_v3_fl(), bDeformGroup::name, and BMesh::vdata.
Referenced by object_hook_index_array().
|
static |
Definition at line 130 of file object_hook.c.
References BMEditMesh::bm, BM_ITER_MESH, BM_vert_select_set(), BM_VERTS_OF_MESH, Object::data, EDBM_select_flush(), Mesh::edit_mesh, HookModifierData::indexar, and NULL.
Referenced by object_hook_select().
|
static |
Definition at line 366 of file object_hook.c.
References Freestyle::a, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, HookModifierData::indexar, LISTBASE_FOREACH, object_editcurve_get(), and SELECT.
Referenced by object_hook_select().
|
static |
Definition at line 204 of file object_hook.c.
References Freestyle::a, Object::data, Lattice::editlatt, BPoint::f1, HookModifierData::indexar, EditLatt::latt, and SELECT.
Referenced by object_hook_select().