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_sensor.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_sensor.c')
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index 8f6cc4b875e..47a619f661a 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -26,6 +26,7 @@
#include "RNA_define.h"
#include "RNA_enum_types.h"
+#include "RNA_access.h"
#include "rna_internal.h"
@@ -115,7 +116,7 @@ EnumPropertyItem *rna_Sensor_type_itemf(bContext *C, PointerRNA *ptr, int *free)
Object *ob=NULL;
int totitem= 0;
- if (ptr->type == &RNA_Sensor) {
+ if (ptr->type == &RNA_Sensor || RNA_struct_is_a(ptr->type, &RNA_Sensor)) {
ob = (Object *)ptr->id.data;
} else {
/* can't use ob from ptr->id.data because that enum is also used by operators */