diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-18 13:07:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-18 13:07:15 +0400 |
commit | ebe47add0816831ac0d1ce77a47a09da60d4af59 (patch) | |
tree | 77b4fb6bdf0401b9fef51af4499528f547ad54d7 /source | |
parent | 5f32094bcee61f727eded2700996ff72cf0959e6 (diff) |
fix for one of the issues in [#27035] 3 problems: crash and enum "REGION" not found in ('VERTS')
now constraint macro argument shows as 'NORMAL' rather then '<UNKNOWN ENUM>'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 4672a77bd06..f8811a5f464 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -903,7 +903,7 @@ int RNA_property_is_idprop(PropertyRNA *prop); /* python compatible string representation of this property, (must be freed!) */ char *RNA_property_as_string(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop); -char *RNA_pointer_as_string(PointerRNA *ptr); +char *RNA_pointer_as_string(struct bContext *C, PointerRNA *ptr); /* Function */ diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 03622ec756f..a89d52e9fca 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4036,8 +4036,9 @@ int RNA_property_is_idprop(PropertyRNA *prop) } /* string representation of a property, python - * compatible but can be used for display too*/ -char *RNA_pointer_as_string(PointerRNA *ptr) + * compatible but can be used for display too, + * context may be NULL */ +char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr) { DynStr *dynstr= BLI_dynstr_new(); char *cstring; @@ -4057,7 +4058,7 @@ char *RNA_pointer_as_string(PointerRNA *ptr) BLI_dynstr_append(dynstr, ", "); first_time= 0; - cstring = RNA_property_as_string(NULL, ptr, prop); + cstring = RNA_property_as_string(C, ptr, prop); BLI_dynstr_appendf(dynstr, "\"%s\":%s", propname, cstring); MEM_freeN(cstring); } @@ -4175,7 +4176,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop) case PROP_POINTER: { PointerRNA tptr= RNA_property_pointer_get(ptr, prop); - cstring= RNA_pointer_as_string(&tptr); + cstring= RNA_pointer_as_string(C, &tptr); BLI_dynstr_append(dynstr, cstring); MEM_freeN(cstring); break; @@ -4194,7 +4195,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop) first_time= 0; /* now get every prop of the collection */ - cstring= RNA_pointer_as_string(&itemptr); + cstring= RNA_pointer_as_string(C, &itemptr); BLI_dynstr_append(dynstr, cstring); MEM_freeN(cstring); } |