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.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user