diff options
Diffstat (limited to 'source/blender/editors/space_logic/logic_window.c')
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index ce8ee25eef0..2957edd941b 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -1009,8 +1009,6 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr) bSensor *sens = (bSensor *)ptr->data; bArmatureSensor *as = (bArmatureSensor *) sens->data; Object *ob = (Object *)ptr->id.data; - PointerRNA pose_ptr, pchan_ptr; - PropertyRNA *bones_prop= NULL; uiLayout *row; if (ob->type != OB_ARMATURE) { @@ -1019,11 +1017,12 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr) } if (ob->pose) { + PointerRNA pose_ptr, pchan_ptr; + PropertyRNA *bones_prop; + RNA_pointer_create((ID *)ob, &RNA_Pose, ob->pose, &pose_ptr); bones_prop = RNA_struct_find_property(&pose_ptr, "bones"); - } - if (&pose_ptr.data) { uiItemPointerR(layout, ptr, "bone", &pose_ptr, "bones", NULL, ICON_BONE_DATA); if (RNA_property_collection_lookup_string(&pose_ptr, bones_prop, as->posechannel, &pchan_ptr)) |