42 const bool select_only,
45 switch (obedit->
type) {
80 if (ml_act && (!select_only || (ml_act->
flag &
SELECT))) {
101 const bool select_only,
177 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
178 Object *ob = objects[ob_index];
183 Object *ob = base->object;
194 if (ob_parent_recurse !=
NULL) {
195 while (ob_parent_recurse !=
NULL) {
199 ob_parent_recurse = ob_parent_recurse->
parent;
202 if (ob_parent_recurse) {
213 Object *ob = base->object;
238 Object *ob_parent_recurse,
280 float parent_recurse_obmat_inv[4][4];
284 float parent_obmat_calc[4][4];
295 float parent_recurse_obmat_inv[4][4];
299 float obmat_calc[4][4];
304 float obmat_parent_relative_orig[4][4];
305 float obmat_parent_relative_calc[4][4];
306 float obmat_parent_relative_inv_orig[4][4];
310 invert_m4_m4(obmat_parent_relative_inv_orig, obmat_parent_relative_orig);
313 mul_m4_m4m4(dmat, obmat_parent_relative_calc, obmat_parent_relative_inv_orig);
376 float imat[4][4], dmat[4][4];
439 for (
uint i = 0; i < objects_len; i++) {
442 for (
uint i = 0; i < objects_len;) {
444 objects[i] = objects[--objects_len];
454 bool is_translation_only;
456 float test_m4_a[4][4], test_m4_b[4][4];
460 is_translation_only =
equals_m4m4(test_m4_a, test_m4_b);
463 if (is_translation_only) {
464 for (
uint i = 0; i < objects_len; i++) {
471 for (
uint i = 0; i < objects_len; i++) {
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_active_if_layer_visible(struct Object *ob)
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
struct BPoint * BKE_lattice_active_point_get(struct Lattice *lt)
General operations, lookup, etc. for blender objects.
void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4])
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
void BKE_scene_graph_evaluated_ensure(struct Depsgraph *depsgraph, struct Main *bmain)
BLI_INLINE void * BLI_ghashIterator_getKey(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_haskey(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
BLI_INLINE void * BLI_ghashIterator_getValue(GHashIterator *ghi) ATTR_WARN_UNUSED_RESULT
#define GHASH_ITER(gh_iter_, ghash_)
void * BLI_gset_lookup(const GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT
GSet * BLI_gset_ptr_new_ex(const char *info, unsigned int nentries_reserve) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
GHash * BLI_ghash_ptr_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
bool BLI_gset_add(GSet *gs, void *key)
#define LISTBASE_FOREACH(type, var, list)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
bool invert_m4(float R[4][4])
void unit_m4(float m[4][4])
bool invert_m4_m4(float R[4][4], const float A[4][4])
void mul_m4_v3(const float M[4][4], float r[3])
bool equals_m4m4(const float mat1[4][4], const float mat2[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v3(float r[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
void ED_object_data_xform_destroy(struct XFormObjectData *xod_base)
void ED_object_data_xform_by_mat4(struct XFormObjectData *xod, const float mat[4][4])
@ XFORM_OB_SKIP_CHILD_PARENT_APPLY
@ XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM_INDIRECT
@ XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM
struct XFormObjectData * ED_object_data_xform_create(struct ID *id)
Read Guarded memory(de)allocation.
void BM_editselection_center(BMEditSelection *ese, float r_center[3])
bool BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
const Depsgraph * depsgraph
bool ED_curve_active_center(Curve *cu, float center[3])
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void ED_object_xform_skip_child_container_update_all(struct XFormObjectSkipChild_Container *xcs, struct Main *bmain, struct Depsgraph *depsgraph)
void ED_object_xform_skip_child_container_destroy(struct XFormObjectSkipChild_Container *xcs)
struct XFormObjectSkipChild_Container * ED_object_xform_skip_child_container_create(void)
void ED_object_xform_array_m4(Object **objects, uint objects_len, const float matrix[4][4])
void ED_object_data_xform_container_update_all(struct XFormObjectData_Container *xds, struct Main *bmain, Depsgraph *depsgraph)
static void trans_obdata_in_obmode_free_elem(void *xf_p)
bool ED_object_calc_active_center(Object *ob, const bool select_only, float r_center[3])
void ED_object_data_xform_container_destroy(struct XFormObjectData_Container *xds)
bool ED_object_calc_active_center_for_editmode(Object *obedit, const bool select_only, float r_center[3])
void ED_object_xform_skip_child_container_item_ensure(struct XFormObjectSkipChild_Container *xcs, Object *ob, Object *ob_parent_recurse, int mode)
static bool object_parent_in_set(GSet *objects_set, Object *ob)
void ED_object_data_xform_container_item_ensure(struct XFormObjectData_Container *xds, Object *ob)
bool ED_object_calc_active_center_for_posemode(Object *ob, const bool select_only, float r_center[3])
void ED_object_xform_skip_child_container_item_ensure_from_array(struct XFormObjectSkipChild_Container *xcs, ViewLayer *view_layer, Object **objects, uint objects_len)
struct XFormObjectData_Container * ED_object_data_xform_container_create(void)
struct EditBone * act_edbone