RNA: review of commits in the past days, check the diffs for the
[blender.git] / source / blender / makesrna / intern / rna_object.c
index 735d524032f5cff52c9d62838d5479fb9dcf268b..a224016f0cb26150310ecaf92ad9ca1551ccaa6a 100644 (file)
 #include "DNA_property_types.h"
 
 #ifdef RNA_RUNTIME
-static struct StructRNA* rna_Object_gameproperties_type(struct CollectionPropertyIterator *iter)
-{
-       bProperty *property= (bProperty*)iter->ptr.data;
-       switch(property->type){
-               case PROP_BOOL:
-                       return &RNA_GameBooleanProperty;
-               case PROP_INT:
-                       return &RNA_GameIntProperty;
-               case PROP_FLOAT:
-                       return &RNA_GameFloatProperty;
-               case PROP_STRING:
-                       return &RNA_GameStringProperty;
-               case PROP_TIME:
-                       return &RNA_GameTimeProperty;
-       }
-       return &RNA_UnknownType;
-}
+
 #else
 
 void RNA_def_object(BlenderRNA *brna)
@@ -84,25 +68,25 @@ void RNA_def_object(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Scale", "");
 
        prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_struct_type(prop, "ModifierData");
-       RNA_def_property_ui_text(prop, "Modifiers", "Modifiers of this object.");
+       RNA_def_property_struct_type(prop, "Modifier");
+       RNA_def_property_ui_text(prop, "Modifiers", "");
 
        prop= RNA_def_property(srna, "sensors", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Sensor");
-       RNA_def_property_ui_text(prop, "Sensors", "Sensors of this object.");
+       RNA_def_property_ui_text(prop, "Sensors", "");
 
        prop= RNA_def_property(srna, "controllers", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Controller");
-       RNA_def_property_ui_text(prop, "Controller", "Controllers of this object.");
+       RNA_def_property_ui_text(prop, "Controllers", "");
 
        prop= RNA_def_property(srna, "actuators", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Actuator");
-       RNA_def_property_ui_text(prop, "Actuators", "Actuators of this object.");
+       RNA_def_property_ui_text(prop, "Actuators", "");
 
-       prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
+       prop= RNA_def_property(srna, "game_properties", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "prop", NULL);
-       RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, "rna_Object_gameproperties_type", 0, 0, 0);
-       RNA_def_property_ui_text(prop, "Property", "Properties of this object.");
+       RNA_def_property_struct_type(prop, "GameProperty");
+       RNA_def_property_ui_text(prop, "Game Properties", "Game engine properties.");
 }
 
 #endif