Fix T92733: Error moving a completely locked bone

This commit is contained in:
Campbell Barton 2021-11-02 23:31:19 +11:00
parent b1bf884889
commit 2f0f08bc98
Notes: blender-bot 2023-02-14 11:18:07 +01:00
Referenced by issue #92733, Trying to move a completely locked bone, prints an error in the console
1 changed files with 8 additions and 1 deletions

View File

@ -1085,7 +1085,14 @@ void transform_mode_init(TransInfo *t, wmOperator *op, const int mode)
case TFM_RESIZE: {
float mouse_dir_constraint[3];
if (op) {
RNA_float_get_array(op->ptr, "mouse_dir_constraint", mouse_dir_constraint);
PropertyRNA *prop = RNA_struct_find_property(op->ptr, "mouse_dir_constraint");
if (prop) {
RNA_property_float_get_array(op->ptr, prop, mouse_dir_constraint);
}
else {
/* Resize is expected to have this property. */
BLI_assert(!STREQ(op->idname, "TRANSFORM_OT_resize"));
}
}
else {
zero_v3(mouse_dir_constraint);