diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-09 19:08:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-09 19:08:47 +0300 |
commit | e60be63d23bce8c8fe9b749a17c1f3dc3fd56711 (patch) | |
tree | 5a264d6a9d21a896f913dd573fee2544a801972a /source/blender/makesrna/intern/rna_internal_types.h | |
parent | 2fe5005bbb6b81831eba33f3d6a93c4719b912a0 (diff) |
added rna property "parent" so nested RNA structs can access their parent RNA struct
This is used for generating docs so a nested RNA struct such as MaterialRaytraceTransparency are listed under Material rather then in the global struct list)
These RNA structs are used for grouping properties and don't correspond to a C structure.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 89b0503239b..45b122b2ae5 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -205,6 +205,8 @@ typedef struct CollectionPropertyRNA { struct StructRNA *structtype; } CollectionPropertyRNA; + +/* changes to this struct require updating rna_generate_struct in makesrna.c */ struct StructRNA { struct StructRNA *next, *prev; @@ -227,6 +229,12 @@ struct StructRNA { /* struct this is derivedfrom */ struct StructRNA *from; + /* only use for nested structs, where both the parent and child access + * the same C Struct but nesting is used for grouping properties. + * The parent property is used so we know NULL checks are not needed, + * and that this struct will never exist without its parent */ + struct StructRNA *parent; + /* function to give the more specific type */ StructRefineFunc refine; |