diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-19 14:16:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-19 14:16:30 +0400 |
commit | 4e3390437ea9a632339b47d3a99866b6c98f74af (patch) | |
tree | 21297caa5f67dcb0f52a79420019804a1d2be8dc /source/blender/makesrna/intern/rna_ID.c | |
parent | 98140e234e6d88dc301a3d8663ef54b56520020f (diff) |
- Properties from base classes are now registered too, this allows class mix-in's to define properties.
An example of how this is useful - an importer mixin could define the filepath properties and a generic invoke function which can run the subclasses exec for each selected file.
- Panels and Menus now skip the property check when registering.
- renamed _idproperties_ to _idprops_ in function names, function names were getting very long.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index e0bfb9bd03d..a8b7fb1540b 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -176,7 +176,7 @@ StructRNA *rna_ID_refine(PointerRNA *ptr) return ID_code_to_RNA_type(GS(id->name)); } -IDProperty *rna_ID_idproperties(PointerRNA *ptr, int create) +IDProperty *rna_ID_idprops(PointerRNA *ptr, int create) { return IDP_GetProperties(ptr->data, create); } @@ -195,7 +195,7 @@ void rna_ID_fake_user_set(PointerRNA *ptr, int value) } } -IDProperty *rna_IDPropertyGroup_idproperties(PointerRNA *ptr, int create) +IDProperty *rna_IDPropertyGroup_idprops(PointerRNA *ptr, int create) { return ptr->data; } @@ -317,7 +317,7 @@ static void rna_def_ID_properties(BlenderRNA *brna) * care of the properties here */ srna= RNA_def_struct(brna, "IDPropertyGroup", NULL); RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties"); - RNA_def_struct_idproperties_func(srna, "rna_IDPropertyGroup_idproperties"); + RNA_def_struct_idprops_func(srna, "rna_IDPropertyGroup_idprops"); RNA_def_struct_register_funcs(srna, "rna_IDPropertyGroup_register", "rna_IDPropertyGroup_unregister"); RNA_def_struct_refine_func(srna, "rna_IDPropertyGroup_refine"); @@ -341,7 +341,7 @@ static void rna_def_ID(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "ID", "Base type for datablocks, defining a unique name, linking from other libraries and garbage collection"); RNA_def_struct_flag(srna, STRUCT_ID|STRUCT_ID_REFCOUNT); RNA_def_struct_refine_func(srna, "rna_ID_refine"); - RNA_def_struct_idproperties_func(srna, "rna_ID_idproperties"); + RNA_def_struct_idprops_func(srna, "rna_ID_idprops"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name"); |