Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2010-11-26 06:58:31 +0300
committerDalai Felinto <dfelinto@gmail.com>2010-11-26 06:58:31 +0300
commitb8572527dfe3d7c1372d1c050bbd02550439dc0b (patch)
tree28a9c2a13f778fd91a29e62fc2f1eb77cea4628b /source/blender/makesrna/intern/rna_actuator.c
parentca6cc30368841e358021d53281c7299ea6a82f13 (diff)
follow up of "Bugfix #23576" (Logic UI) - replacing hardcoded values by RNA_struct_is_a + making rna_sensor future proof
Diffstat (limited to 'source/blender/makesrna/intern/rna_actuator.c')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index fa5397e669e..2fa93bcecdd 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "RNA_define.h"
+#include "RNA_access.h"
#include "rna_internal.h"
#include "DNA_constraint_types.h"
@@ -360,9 +361,7 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, int *fre
Object *ob= NULL;
int totitem= 0;
- /* 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) {
+ if (ptr->type==&RNA_Actuator || RNA_struct_is_a(ptr->type, &RNA_Actuator)){
ob = (Object *)ptr->id.data;
} else {
/* can't use ob from ptr->id.data because that enum is also used by operators */