diff options
author | Bastien Montagne <bastien@blender.org> | 2021-09-29 13:52:48 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-09-29 13:53:57 +0300 |
commit | 6351c73b758d1b2f4d6b9e85c9bf07074b369be5 (patch) | |
tree | 3d3c04c3dc8e741455fccbec7e86d31ab376cfe6 /source/blender | |
parent | 0c32e3b312212196b2748327713ab3bc31825412 (diff) |
Fix T88954: Rearranging of modifiers for linked objects no longer works.
There would be no modifier set in context in drag and drop case, in that
case try to get active modifier from active object instead.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index b9942bc563a..125cd65631a 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1044,6 +1044,10 @@ bool edit_modifier_poll_generic(bContext *C, Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C); ModifierData *mod = ptr.data; /* May be NULL. */ + if (mod == NULL && ob != NULL) { + mod = BKE_object_active_modifier(ob); + } + if (!ob || ID_IS_LINKED(ob)) { return false; } @@ -1923,8 +1927,8 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - const eMultiresSubdivideModeType subdivide_mode = (eMultiresSubdivideModeType)(RNA_enum_get( - op->ptr, "mode")); + const eMultiresSubdivideModeType subdivide_mode = (eMultiresSubdivideModeType)( + RNA_enum_get(op->ptr, "mode")); multiresModifier_subdivide(object, mmd, subdivide_mode); ED_object_iter_other( |