From c19dd6a7b2e7c1324e648206b88940bb3d408a9b Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 24 Nov 2010 14:34:16 +0000 Subject: [PATCH] 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. --- source/blender/makesrna/intern/rna_actuator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */