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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c4
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 7747c5e78b3..e5545f9cb95 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -1479,10 +1479,10 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Mode", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- /*XXX filter only camera objects */
+
prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Camera Object", "Set this Camera (leave empty to refer to self object)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 26401fcd868..725e9815a67 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -758,7 +758,9 @@ void BL_ConvertActuators(const char* maggiename,
mode = KX_SceneActuator::KX_SCENE_SET_CAMERA;
if (sceneact->camera)
{
- cam = (KX_Camera*) converter->FindGameObject(sceneact->camera);
+ KX_GameObject *tmp = converter->FindGameObject(sceneact->camera);
+ if (tmp && tmp->GetGameObjectType() == SCA_IObject::OBJ_CAMERA)
+ cam = (KX_Camera*)tmp;
}
break;
case ACT_SCENE_RESTART: