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>2012-11-02 14:37:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-02 14:37:33 +0400
commitad191960a77bba1d583883c2a4b9ea02f9c78c23 (patch)
treef82a4ef676b64c30166755ab8001661b03b4c5a6 /source/blender/makesrna/intern/makesrna.c
parentb3c1aae32019cce5e36fa70bc9fa81e451f79c78 (diff)
own recent commit to add pointer passing between py-rna and our C code, broke function calls for C++ rna api.
reported as [#33048] Cycles crashes when rendering
Diffstat (limited to 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r--source/blender/makesrna/intern/makesrna.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 8c7e4a53163..31a6e82648a 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -1746,6 +1746,8 @@ static void rna_def_struct_function_prototype_cpp(FILE *f, StructRNA *srna, Func
if (type == PROP_POINTER)
ptrstr = "";
+ else if ((type == PROP_POINTER) && (flag & PROP_RNAPTR) && !(flag & PROP_THICK_WRAP))
+ ptrstr = "*";
else if (type == PROP_POINTER || dp->prop->arraydimension)
ptrstr = "*";
else if (type == PROP_STRING && (flag & PROP_THICK_WRAP))
@@ -1918,7 +1920,10 @@ static void rna_def_struct_function_call_impl_cpp(FILE *f, StructRNA *srna, Func
fprintf(f, "%s_len, ", dp->prop->identifier);
if (dp->prop->type == PROP_POINTER)
- fprintf(f, "(::%s *) %s.ptr.data", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier));
+ if ((dp->prop->flag & PROP_RNAPTR) && !(dp->prop->flag & PROP_THICK_WRAP))
+ fprintf(f, "(::%s *) &%s.ptr", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier));
+ else
+ fprintf(f, "(::%s *) %s.ptr.data", rna_parameter_type_name(dp->prop), rna_safe_id(dp->prop->identifier));
else
fprintf(f, "%s", rna_safe_id(dp->prop->identifier));
}