diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-25 23:29:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-25 23:29:01 +0300 |
commit | 985a4c1e5ed9c00face5bcf69048bf108ff99aaf (patch) | |
tree | d2946e4701bc6fc55a0f2af2432e56a47989c648 /source/blender/makesrna/intern/rna_internal_types.h | |
parent | 232edfa34ea2a069c34036c801f97146818bee2e (diff) |
RNA:
* Test with constructing RNA paths from pointer + property, based on
a callback per struct. For animato we'll need to be able to do this,
for keyframing from buttons, unless we can somehow derive the paths
from the interface code, which seems like an unnecessary burden.
However constructing such paths is not always quick, and we need a
fast way to find out if a property is animated for drawing buttons,
so this may not be the best solution.
See rna_mesh.c for some callbacks created as a test.
* Added BLI_sprintfN to mallocN a new string using printf style
formatting.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index f8dd33c9df4..bc0c2a07b35 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -41,6 +41,7 @@ struct bContext; typedef void (*UpdateFunc)(struct bContext *C, struct PointerRNA *ptr); typedef int (*EditableFunc)(struct PointerRNA *ptr); typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr); +typedef char *(*StructPathFunc)(struct PointerRNA *ptr); typedef int (*PropBooleanGetFunc)(struct PointerRNA *ptr); typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, int value); @@ -240,6 +241,9 @@ struct StructRNA { /* function to give the more specific type */ StructRefineFunc refine; + /* function to find path to this struct in an ID */ + StructPathFunc path; + /* properties of this struct */ ListBase properties; }; |