From a5197f4943a2c117a53b50ca12eba193d42663ea Mon Sep 17 00:00:00 2001 From: Elia Sarti Date: Fri, 26 Mar 2010 18:15:06 +0000 Subject: [PATCH] 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. --- source/blender/makesrna/intern/rna_modifier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 8d253ac47b8..4adb462c8d1 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -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)