Fix uninitialized cursor w/ setting object origin
This commit is contained in:
parent
735653cda8
commit
45042f6a03
|
@ -141,7 +141,7 @@ void ED_armature_transform(Main *bmain, bArmature *arm, float mat[4][4], const b
|
|||
|
||||
/* exported for use in editors/object/ */
|
||||
/* 0 == do center, 1 == center new, 2 == center cursor */
|
||||
void ED_armature_origin_set(Main *bmain, Object *ob, float cursor[3], int centermode, int around)
|
||||
void ED_armature_origin_set(Main *bmain, Object *ob, const float cursor[3], int centermode, int around)
|
||||
{
|
||||
const bool is_editmode = BKE_object_is_in_editmode(ob);
|
||||
EditBone *ebone;
|
||||
|
|
|
@ -206,7 +206,7 @@ void ED_armature_ebone_from_mat3(EditBone *ebone, float mat[3][3]);
|
|||
void ED_armature_ebone_from_mat4(EditBone *ebone, float mat[4][4]);
|
||||
|
||||
void ED_armature_edit_transform_mirror_update(struct Object *obedit);
|
||||
void ED_armature_origin_set(struct Main *bmain, struct Object *ob, float cursor[3], int centermode, int around);
|
||||
void ED_armature_origin_set(struct Main *bmain, struct Object *ob, const float cursor[3], int centermode, int around);
|
||||
|
||||
void ED_armature_transform_bones(struct bArmature *arm, float mat[4][4], const bool do_props);
|
||||
void ED_armature_transform_apply(struct Main *bmain, struct Object *ob, float mat[4][4], const bool do_props);
|
||||
|
|
|
@ -811,7 +811,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
|||
Object *obedit = CTX_data_edit_object(C);
|
||||
Depsgraph *depsgraph = CTX_data_depsgraph(C);
|
||||
Object *tob;
|
||||
float cursor[3], cent[3], cent_neg[3], centn[3];
|
||||
float cent[3], cent_neg[3], centn[3];
|
||||
const float *cursor = scene->cursor.location;
|
||||
int centermode = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
ListBase ctx_data_list;
|
||||
|
|
Loading…
Reference in New Issue