Blender V5.0
object_transform.cc File Reference
#include <cstdlib>
#include <cstring>
#include <numeric>
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_grease_pencil_types.h"
#include "DNA_lattice_types.h"
#include "DNA_light_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"
#include "DNA_scene_types.h"
#include "BLI_array.hh"
#include "BLI_listbase.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_matrix.hh"
#include "BLI_math_rotation.h"
#include "BLI_task.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "BKE_armature.hh"
#include "BKE_context.hh"
#include "BKE_curve.hh"
#include "BKE_curves.hh"
#include "BKE_editmesh.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_idtype.hh"
#include "BKE_lattice.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_library.hh"
#include "BKE_main.hh"
#include "BKE_mball.hh"
#include "BKE_mesh.hh"
#include "BKE_multires.hh"
#include "BKE_object.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BKE_tracking.h"
#include "BLT_translation.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "UI_interface_icons.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ANIM_action.hh"
#include "ANIM_keyframing.hh"
#include "ANIM_keyingsets.hh"
#include "ED_anim_api.hh"
#include "ED_armature.hh"
#include "ED_keyframing.hh"
#include "ED_mesh.hh"
#include "ED_object.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "MEM_guardedalloc.h"
#include "RNA_prototypes.hh"
#include "object_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::object::XFormAxisItem
struct  blender::ed::object::XFormAxisData

Namespaces

namespace  blender
namespace  blender::ed
namespace  blender::ed::object

Functions

Clear Transformation Utilities
static void blender::ed::object::object_clear_loc (Object *ob, const bool clear_delta)
static void blender::ed::object::object_clear_rot (Object *ob, const bool clear_delta)
static void blender::ed::object::object_clear_scale (Object *ob, const bool clear_delta)
static wmOperatorStatus blender::ed::object::object_clear_transform_generic_exec (bContext *C, wmOperator *op, void(*clear_func)(Object *, const bool), const char default_ksName[])
Clear Location Operator
static wmOperatorStatus blender::ed::object::object_location_clear_exec (bContext *C, wmOperator *op)
void blender::ed::object::OBJECT_OT_location_clear (wmOperatorType *ot)
Clear Rotation Operator
static wmOperatorStatus blender::ed::object::object_rotation_clear_exec (bContext *C, wmOperator *op)
void blender::ed::object::OBJECT_OT_rotation_clear (wmOperatorType *ot)
Clear Scale Operator
static wmOperatorStatus blender::ed::object::object_scale_clear_exec (bContext *C, wmOperator *op)
void blender::ed::object::OBJECT_OT_scale_clear (wmOperatorType *ot)
Clear Origin Operator
static wmOperatorStatus blender::ed::object::object_origin_clear_exec (bContext *C, wmOperator *)
void blender::ed::object::OBJECT_OT_origin_clear (wmOperatorType *ot)
Apply Transformation Operator
static void blender::ed::object::ignore_parent_tx (Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob)
static void blender::ed::object::append_sorted_object_parent_hierarchy (Object *root_object, Object *object, Object **sorted_objects, int *object_index)
static Array< Object * > blender::ed::object::sorted_selected_editable_objects (bContext *C)
static bool blender::ed::object::apply_objects_internal_can_multiuser (bContext *C)
static bool blender::ed::object::apply_objects_internal_need_single_user (bContext *C)
static wmOperatorStatus blender::ed::object::apply_objects_internal (bContext *C, ReportList *reports, bool apply_loc, bool apply_rot, bool apply_scale, bool do_props, bool do_single_user)
static wmOperatorStatus blender::ed::object::visual_transform_apply_exec (bContext *C, wmOperator *)
void blender::ed::object::OBJECT_OT_visual_transform_apply (wmOperatorType *ot)
static wmOperatorStatus blender::ed::object::object_transform_apply_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::object::object_transform_apply_invoke (bContext *C, wmOperator *op, const wmEvent *)
void blender::ed::object::OBJECT_OT_transform_apply (wmOperatorType *ot)
Apply Parent Inverse Operator
static wmOperatorStatus blender::ed::object::object_parent_inverse_apply_exec (bContext *C, wmOperator *)
void blender::ed::object::OBJECT_OT_parent_inverse_apply (wmOperatorType *ot)

Transform Axis Target

Note this is an experimental operator to point lights/cameras at objects. We may re-work how this behaves based on user feedback.

  • campbell.
#define USE_RELATIVE_ROTATION
#define USE_RENDER_OVERRIDE
#define USE_FAKE_DEPTH_INIT
static void blender::ed::object::object_transform_axis_target_calc_depth_init (XFormAxisData *xfd, const int mval[2])
static bool blender::ed::object::object_is_target_compat (const Object *ob)
static void blender::ed::object::object_transform_axis_target_free_data (wmOperator *op)
static void blender::ed::object::object_apply_rotation (Object *ob, const float rmat[3][3])
static void blender::ed::object::object_apply_location (Object *ob, const float loc[3])
static bool blender::ed::object::object_orient_to_location (Object *ob, const float rot_orig[3][3], const float axis[3], const float location[3], const bool z_flip)
static void blender::ed::object::object_transform_axis_target_cancel (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::object::object_transform_axis_target_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::object::object_transform_axis_target_modal (bContext *C, wmOperator *op, const wmEvent *event)
void blender::ed::object::OBJECT_OT_transform_axis_target (wmOperatorType *ot)

Set Object Center Operator

enum  {
  blender::ed::object::GEOMETRY_TO_ORIGIN = 0 , blender::ed::object::ORIGIN_TO_GEOMETRY , blender::ed::object::ORIGIN_TO_CURSOR , blender::ed::object::ORIGIN_TO_CENTER_OF_MASS_SURFACE ,
  blender::ed::object::ORIGIN_TO_CENTER_OF_MASS_VOLUME
}
static float3 blender::ed::object::arithmetic_mean (const Span< float3 > values)
static void blender::ed::object::translate_positions (MutableSpan< float3 > positions, const float3 &translation)
static wmOperatorStatus blender::ed::object::object_origin_set_exec (bContext *C, wmOperator *op)
void blender::ed::object::OBJECT_OT_origin_set (wmOperatorType *ot)

Macro Definition Documentation

◆ USE_FAKE_DEPTH_INIT

#define USE_FAKE_DEPTH_INIT

Calculate a depth if the cursor isn't already over a depth (not essential but feels buggy without).

Definition at line 1919 of file object_transform.cc.

◆ USE_RELATIVE_ROTATION

#define USE_RELATIVE_ROTATION

When using multiple objects, apply their relative rotational offset to the active object.

Definition at line 1912 of file object_transform.cc.

◆ USE_RENDER_OVERRIDE

#define USE_RENDER_OVERRIDE

Disable overlays, ignoring user setting (light wire gets in the way).

Definition at line 1914 of file object_transform.cc.