diff options
author | Ton Roosendaal <ton@blender.org> | 2010-11-24 17:34:16 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-11-24 17:34:16 +0300 |
commit | c19dd6a7b2e7c1324e648206b88940bb3d408a9b (patch) | |
tree | 1b29d6696251b3057d8c604cf20081ee8d4593ce /source/blender/makesrna/intern/rna_actuator.c | |
parent | c7c034fedb87e0ff3cf80f4f388bacad51434617 (diff) |
Bugfix #23576
Logic Window: Actuator type options in menu didn't show special options
for Armature or Mesh when 'show selected' was used.
Dalai proposed a nice new RNA feature for inherited types, but with
only two exceptions handled, it was easy to code this check.
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 79644b55089..ea3188b2c5e 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -360,7 +360,9 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, int *fre Object *ob= NULL; int totitem= 0; - if (ptr->type == &RNA_Actuator) { + /* hardcoded exceptions, for these cases code below needs to find the id.data */ + /* otherwise buttons never give all options for selected */ + if (ptr->type==&RNA_Actuator || ptr->type==&RNA_ArmatureActuator || ptr->type==RNA_ShapeActionActuator) { ob = (Object *)ptr->id.data; } else { /* can't use ob from ptr->id.data because that enum is also used by operators */ |