Fix for [#21773] Cast Modifier cant use empties as centers
Based on the assumption that requiring object targets to be OB_EMPTY makes any other object compatible as a target. If the assumption is wrong can be reverted. Only the Cast modifier uses this at the moment and to me it looks like Cast only uses object transform so should be fine.
This commit is contained in:
@@ -399,7 +399,7 @@ static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRN
|
||||
Object *ob= value.data;
|
||||
|
||||
if(!self || ob != self)
|
||||
if(!ob || ob->type == type)
|
||||
if(!ob || type == OB_EMPTY || ob->type == type)
|
||||
*ob_p= ob;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ static void rna_CurveModifier_object_set(PointerRNA *ptr, PointerRNA value)
|
||||
|
||||
static void rna_CastModifier_object_set(PointerRNA *ptr, PointerRNA value)
|
||||
{
|
||||
modifier_object_set(ptr->id.data, &((CastModifierData*)ptr->data)->object, OB_MESH, value);
|
||||
modifier_object_set(ptr->id.data, &((CastModifierData*)ptr->data)->object, OB_EMPTY, value);
|
||||
}
|
||||
|
||||
static void rna_ArmatureModifier_object_set(PointerRNA *ptr, PointerRNA value)
|
||||
|
||||
Reference in New Issue
Block a user