diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-17 22:41:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-17 22:41:37 +0400 |
commit | 22b5a3735fa124cd91910bb527688d664329bd4b (patch) | |
tree | 33688aaa4699d902831e5f90df666f7efed0f8d1 /source/blender/makesrna/intern/makesrna.c | |
parent | d90e3759bcfdea5d7532dfc913dbec6b369f2904 (diff) |
add flag FUNC_USE_MAIN for rna functions which don't need the context. (currently unused)
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 6dbf7b9c553..c21685c9add 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1709,6 +1709,12 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA first= 0; } + if(func->flag & FUNC_USE_MAIN) { + if(!first) fprintf(f, ", "); + first= 0; + fprintf(f, "CTX_data_main(C)"); /* may have direct access later */ + } + if(func->flag & FUNC_USE_CONTEXT) { if(!first) fprintf(f, ", "); first= 0; @@ -2007,6 +2013,12 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA first= 0; } + if(func->flag & FUNC_USE_MAIN) { + if(!first) fprintf(f, ", "); + first= 0; + fprintf(f, "Main *bmain"); + } + if(func->flag & FUNC_USE_CONTEXT) { if(!first) fprintf(f, ", "); first= 0; |