diff options
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 887124fc486..ce977daf30a 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1900,9 +1900,13 @@ static void rna_def_struct_function_prototype_cpp(FILE *f, StructRNA *UNUSED(srn if (!(flag & PROP_DYNAMIC) && dp->prop->arraydimension) fprintf(f, "%s %s[%u]", rna_parameter_type_cpp_name(dp->prop), rna_safe_id(dp->prop->identifier), dp->prop->totarraylength); - else - fprintf(f, "%s %s%s", rna_parameter_type_cpp_name(dp->prop), - ptrstr, rna_safe_id(dp->prop->identifier)); + else { + fprintf(f, "%s%s%s%s", + rna_parameter_type_cpp_name(dp->prop), + (dp->prop->type == PROP_POINTER && ptrstr[0] == '\0') ? "& " : " ", + ptrstr, + rna_safe_id(dp->prop->identifier)); + } } fprintf(f, ")"); |