Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_group_types.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_multires.h"
#include "BKE_armature.h"
#include "RNA_define.h"
#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_keyframing.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "object_intern.h"
Go to the source code of this file.
Definition in file object_transform.c.
anonymous enum |
Definition at line 621 of file object_transform.c.
static int apply_objects_internal | ( | bContext * | C, |
ReportList * | reports, | ||
int | apply_loc, | ||
int | apply_rot, | ||
int | apply_scale | ||
) | [static] |
Definition at line 376 of file object_transform.c.
References Nurb::bezt, BKE_report(), Key::block, Nurb::bp, calchandlesNurb(), MVert::co, copy_m4_m3(), copy_v3_v3(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), CU_3D, CU_BEZIER, DAG_id_tag_update(), KeyBlock::data, ED_armature_apply_transform(), ELEM, ListBase::first, Curve::flag, ID_REAL_USERS, ignore_parent_tx(), invert_m3_m3(), Mesh::key, Curve::key, mat3_to_scale(), mesh_calc_normals(), Mesh::mface, mul_m3_m3m3(), mul_m3_v3(), mul_m4_v3(), multiresModifier_scale_disp(), Mesh::mvert, NC_OBJECT, ND_TRANSFORM, Nurb::next, KeyBlock::next, NULL, Curve::nurb, OB_ARMATURE, OB_CURVE, OB_MESH, OB_RECALC_DATA, OB_RECALC_OB, OB_SURF, object_rot_to_mat3(), object_scale_to_mat3(), object_to_mat3(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, BezTriple::radius, RPT_ERROR, KeyBlock::totelem, Mesh::totface, Mesh::totvert, Nurb::type, unit_axis_angle(), unit_m3(), unit_qt(), BPoint::vec, BezTriple::vec, where_is_object(), where_is_pose(), WM_event_add_notifier(), and zero_v3().
Referenced by object_transform_apply_exec().
Definition at line 361 of file object_transform.c.
References FALSE, ListBase::first, Object::id, invert_m4_m4(), ID::next, Main::object, object_apply_mat4(), Object::obmat, Object::parent, Object::parentinv, TRUE, and what_does_parent().
Referenced by apply_objects_internal(), and object_origin_set_exec().
static void object_clear_loc | ( | Object * | ob | ) | [static] |
Definition at line 74 of file object_transform.c.
References Object::dloc, Object::loc, OB_LOCK_LOCX, OB_LOCK_LOCY, OB_LOCK_LOCZ, and Object::protectflag.
Referenced by object_location_clear_exec().
static void object_clear_rot | ( | Object * | ob | ) | [static] |
Definition at line 86 of file object_transform.c.
References axis_angle_to_eulO(), copy_qt_qt(), copy_v3_v3(), Object::dquat, Object::drot, Object::drotAngle, Object::drotAxis, eul_to_quat(), EULER_ORDER_DEFAULT, eulO_to_axis_angle(), IS_EQF, mul_qt_fl(), OB_LOCK_ROT4D, OB_LOCK_ROTW, OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, Object::protectflag, Object::quat, quat_to_eul(), Object::rot, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, Object::rotAngle, Object::rotAxis, Object::rotmode, unit_axis_angle(), unit_qt(), and zero_v3().
Referenced by object_rotation_clear_exec().
static void object_clear_scale | ( | Object * | ob | ) | [static] |
Definition at line 187 of file object_transform.c.
References Object::dscale, OB_LOCK_SCALEX, OB_LOCK_SCALEY, OB_LOCK_SCALEZ, Object::protectflag, and Object::size.
Referenced by object_scale_clear_exec().
static int object_clear_transform_generic_exec | ( | bContext * | C, |
wmOperator * | op, | ||
void(*)(Object *) | clear_func, | ||
const char | default_ksName[] | ||
) | [static] |
Definition at line 207 of file object_transform.c.
References ANIM_get_keyingset_for_autokeying(), BKE_report(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_ids_flush_update(), ED_autokeyframe_object(), ELEM, NC_OBJECT, ND_TRANSFORM, NULL, OB_MODE_WEIGHT_PAINT, OB_RECALC_OB, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by object_location_clear_exec(), object_rotation_clear_exec(), and object_scale_clear_exec().
static int object_location_clear_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 251 of file object_transform.c.
References ANIM_KS_LOCATION_ID, object_clear_loc(), and object_clear_transform_generic_exec().
Referenced by OBJECT_OT_location_clear().
static int object_origin_clear_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 313 of file object_transform.c.
References copy_m3_m4(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), DAG_id_tag_update(), DAG_ids_flush_update(), mul_m3_v3(), NC_OBJECT, ND_TRANSFORM, negate_v3_v3(), NULL, OB_RECALC_OB, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_origin_clear().
static int object_origin_set_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 627 of file object_transform.c.
References add_v3_v3(), View3D::around, Curve::bb, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), BKE_report(), BKE_reportf(), EditVert::co, copy_v3_v3(), CTX_DATA_BEGIN, CTX_data_edit_object(), CTX_DATA_END, CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), CU_3D, curve_center_bounds(), curve_center_median(), curve_translate(), DAG_id_tag_update(), DAG_ids_flush_update(), Object::data, DO_MINMAX, docenter_armature(), Object::dup_group, ELEM, FALSE, ListBase::first, Curve::flag, ID::flag, Curve::fsize, GEOMETRY_TO_ORIGIN, give_cursor(), bArmature::id, Curve::id, Mesh::id, Object::id, ID_REAL_USERS, ignore_parent_tx(), INIT_MINMAX, invert_m4_m4(), is_zero_v3(), LIB_DOIT, max, mesh_center_bounds(), mesh_center_median(), mesh_translate(), mid_v3_v3v3(), min, minmax_object_duplis(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), NC_OBJECT, ND_TRANSFORM, negate_v3_v3(), ID::next, EditVert::next, NULL, OB_ARMATURE, OB_CURVE, OB_DONE, OB_DUPLIGROUP, OB_FONT, OB_MESH, OB_RECALC_DATA, OB_RECALC_OB, OB_SURF, Main::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, ORIGIN_TO_CURSOR, wmOperator::ptr, recalc_editnormals(), wmOperator::reports, RNA_enum_get(), RNA_struct_property_is_set(), RPT_ERROR, RPT_WARNING, sub_v3_v3(), TRUE, Object::type, V3D_CENTROID, BoundBox::vec, EditMesh::verts, where_is_object(), where_is_pose(), WM_event_add_notifier(), Curve::xof, Curve::yof, and zero_v3().
Referenced by OBJECT_OT_origin_set().
void OBJECT_OT_location_clear | ( | wmOperatorType * | ot | ) |
Definition at line 256 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_location_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_origin_clear | ( | wmOperatorType * | ot | ) |
Definition at line 342 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_origin_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_origin_set | ( | wmOperatorType * | ot | ) |
Definition at line 901 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, GEOMETRY_TO_ORIGIN, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, object_origin_set_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ORIGIN_TO_CURSOR, ORIGIN_TO_GEOMETRY, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, V3D_CENTER, V3D_CENTROID, and WM_menu_invoke().
Referenced by ED_operatortypes_object().
void OBJECT_OT_rotation_clear | ( | wmOperatorType * | ot | ) |
Definition at line 276 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_rotation_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_scale_clear | ( | wmOperatorType * | ot | ) |
Definition at line 296 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_scale_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_object().
void OBJECT_OT_transform_apply | ( | wmOperatorType * | ot | ) |
Definition at line 600 of file object_transform.c.
References wmOperatorType::description, ED_operator_objectmode(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, object_transform_apply_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_visual_transform_apply | ( | wmOperatorType * | ot | ) |
Definition at line 571 of file object_transform.c.
References wmOperatorType::description, ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and visual_transform_apply_exec().
Referenced by ED_operatortypes_object().
static int object_rotation_clear_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 271 of file object_transform.c.
References ANIM_KS_ROTATION_ID, object_clear_rot(), and object_clear_transform_generic_exec().
Referenced by OBJECT_OT_rotation_clear().
static int object_scale_clear_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 291 of file object_transform.c.
References ANIM_KS_SCALING_ID, object_clear_scale(), and object_clear_transform_generic_exec().
Referenced by OBJECT_OT_scale_clear().
static int object_transform_apply_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 586 of file object_transform.c.
References apply_objects_internal(), OPERATOR_CANCELLED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), and rot.
Referenced by OBJECT_OT_transform_apply().
static int visual_transform_apply_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 547 of file object_transform.c.
References CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), DAG_id_tag_update(), NC_OBJECT, ND_TRANSFORM, NULL, OB_RECALC_OB, object_apply_mat4(), OPERATOR_CANCELLED, OPERATOR_FINISHED, TRUE, where_is_object(), and WM_event_add_notifier().
Referenced by OBJECT_OT_visual_transform_apply().