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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-04 13:25:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-04 13:25:57 +0300
commit46c8bfe15182371b0f1a161726f27d5010ef3bbb (patch)
treebd9553b4d5e11575206393b0a23eebf6d20b5232 /source/blender/makesrna/intern/rna_access.c
parentb221e57fd2722eda1e1f3738106709d4574c4d00 (diff)
Make Links (Ctrl+L) back
- split into 2 operators: object.make_links_data() & object.make_links_scene since they are quite different. - added reusable functions RNA_group_itemf & RNA_scene_itemf which can be used for any operator that takes ID data (easy to add more types Mesh, Text etc) - DummyRNA_NULL_items for dynamic items so each operator need not define its own empty enum.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index f0aaceec4aa..93e83492efa 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -734,6 +734,11 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
return &RNA_UnknownType;
}
+/* Reuse for dynamic types */
+EnumPropertyItem DummyRNA_NULL_items[] = {
+ {0, NULL, 0, NULL, NULL}
+};
+
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free)
{
EnumPropertyRNA *eprop= (EnumPropertyRNA*)rna_ensure_property(prop);