|
Blender V4.3
|
Rigid Body object editing operators. More...
#include <cstdlib>#include <cstring>#include "DNA_object_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_report.hh"#include "BKE_rigidbody.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "DEG_depsgraph_query.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_object.hh"#include "ED_physics.hh"#include "ED_screen.hh"#include "physics_intern.hh"Go to the source code of this file.
Classes | |
| struct | rbMaterialDensityItem |
Variables | |
| static rbMaterialDensityItem | RB_MATERIAL_DENSITY_TABLE [] |
| static const int | NUM_RB_MATERIAL_PRESETS |
Rigid Body object editing operators.
Definition in file rigidbody_object.cc.
|
static |
Definition at line 56 of file rigidbody_object.cc.
References blender::ed::object::context_active_object(), CTX_data_scene(), ED_operator_object_active_editable(), operator_rigidbody_editable_poll(), and Object::rigidbody_object.
Referenced by RIGIDBODY_OT_mass_calculate(), RIGIDBODY_OT_object_remove(), RIGIDBODY_OT_objects_remove(), and RIGIDBODY_OT_shape_change().
|
static |
Definition at line 71 of file rigidbody_object.cc.
References blender::ed::object::context_active_object(), CTX_data_scene(), ED_operator_object_active_editable(), OB_MESH, operator_rigidbody_editable_poll(), and Object::type.
Referenced by RIGIDBODY_OT_object_add(), and RIGIDBODY_OT_objects_add().
| bool ED_rigidbody_object_add | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| int | type, | ||
| ReportList * | reports ) |
Definition at line 88 of file rigidbody_object.cc.
References BKE_rigidbody_add_object().
Referenced by rigidbody_object_add_exec(), and rigidbody_objects_add_exec().
Definition at line 93 of file rigidbody_object.cc.
References BKE_rigidbody_remove_object().
Referenced by blender::ed::object::object_convert_exec(), rigidbody_object_remove_exec(), and rigidbody_objects_remove_exec().
|
static |
Definition at line 506 of file rigidbody_object.cc.
References PROP_EDITABLE, wmOperator::ptr, RNA_def_property_clear_flag(), RNA_def_property_flag(), RNA_enum_get(), RNA_property_identifier(), and STREQ.
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 44 of file rigidbody_object.cc.
References ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by ED_operator_rigidbody_active_poll(), and ED_operator_rigidbody_add_poll().
|
static |
Definition at line 414 of file rigidbody_object.cc.
References EnumPropertyItem::identifier, IFACE_, EnumPropertyItem::name, rbMaterialDensityItem::name, NUM_RB_MATERIAL_PRESETS, RB_MATERIAL_DENSITY_TABLE, RNA_enum_item_add(), RNA_enum_item_end(), and EnumPropertyItem::value.
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 103 of file rigidbody_object.cc.
References blender::ed::object::context_active_object(), CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_add(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_object_add().
|
static |
Definition at line 150 of file rigidbody_object.cc.
References BKE_report(), blender::ed::object::context_active_object(), CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_remove(), ELEM, NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, Object::rigidbody_object, RPT_ERROR, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_object_remove().
|
static |
Definition at line 196 of file rigidbody_object.cc.
References CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_add(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_objects_add().
|
static |
Definition at line 450 of file rigidbody_object.cc.
References BKE_rigidbody_calc_volume(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_ensure_evaluated_depsgraph(), DEG_get_evaluated_object(), DEG_id_tag_update(), rbMaterialDensityItem::density, depsgraph, ID_RECALC_TRANSFORM, material, NC_OBJECT, ND_POINTCACHE, NUM_RB_MATERIAL_PRESETS, OPERATOR_CANCELLED, OPERATOR_FINISHED, ptr, wmOperator::ptr, RB_MATERIAL_DENSITY_TABLE, RNA_enum_get(), RNA_float_get(), RNA_float_set(), RNA_pointer_create(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 245 of file rigidbody_object.cc.
References CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_remove(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_objects_remove().
|
static |
Definition at line 291 of file rigidbody_object.cc.
References CTX_DATA_BEGIN, CTX_DATA_END, DEG_id_tag_update(), ID_RECALC_TRANSFORM, NC_OBJECT, NC_SPACE, ND_POINTCACHE, ND_SPACE_VIEW3D, OPERATOR_CANCELLED, OPERATOR_FINISHED, ptr, wmOperator::ptr, RNA_enum_get(), RNA_enum_set(), RNA_pointer_create(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_shape_change().
| void RIGIDBODY_OT_mass_calculate | ( | wmOperatorType * | ot | ) |
Definition at line 526 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_active_poll(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, mass_calculate_poll_property(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::poll_property, wmOperatorType::prop, PROP_ENUM_NO_TRANSLATE, rigidbody_materials_itemf(), rigidbody_objects_calc_mass_exec(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_float(), RNA_def_property_flag(), rna_enum_dummy_DEFAULT_items, wmOperatorType::srna, and WM_menu_invoke().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_object_add | ( | wmOperatorType * | ot | ) |
Definition at line 125 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_add_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RBO_TYPE_ACTIVE, rigidbody_object_add_exec(), RNA_def_enum(), rna_enum_rigidbody_object_type_items, and wmOperatorType::srna.
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_object_remove | ( | wmOperatorType * | ot | ) |
Definition at line 176 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_active_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and rigidbody_object_remove_exec().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_objects_add | ( | wmOperatorType * | ot | ) |
Definition at line 220 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_add_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RBO_TYPE_ACTIVE, rigidbody_objects_add_exec(), RNA_def_enum(), rna_enum_rigidbody_object_type_items, and wmOperatorType::srna.
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_objects_remove | ( | wmOperatorType * | ot | ) |
Definition at line 271 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_active_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and rigidbody_objects_remove_exec().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_shape_change | ( | wmOperatorType * | ot | ) |
Definition at line 321 of file rigidbody_object.cc.
References wmOperatorType::description, ED_operator_rigidbody_active_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RB_SHAPE_TRIMESH, rigidbody_objects_shape_change_exec(), RNA_def_enum(), rna_enum_rigidbody_object_shape_items, wmOperatorType::srna, and WM_menu_invoke().
Referenced by operatortypes_particle().
|
static |
Definition at line 407 of file rigidbody_object.cc.
Referenced by rigidbody_materials_itemf(), and rigidbody_objects_calc_mass_exec().
|
static |
Definition at line 359 of file rigidbody_object.cc.
Referenced by rigidbody_materials_itemf(), and rigidbody_objects_calc_mass_exec().