Commit: 137a5e162c2435662dbb299ff49771e7d2e7598f Author: Hans Goudey Date: Tue Aug 24 17:40:18 2021 -0500 Branches: refactor-idprop-ui-data https://developer.blender.org/rB137a5e162c2435662dbb299ff49771e7d2e7598f
Merge branch 'master' into refactor-idprop-ui-data =================================================================== =================================================================== diff --cc source/blender/blenloader/intern/versioning_300.c index a9816ede88b,72572b05ef6..5b9cdc8c44f --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@@ -20,12 -20,9 +20,13 @@@ /* allow readfile to use deprecated functionality */ #define DNA_DEPRECATED_ALLOW +#include <string.h> + +#include "MEM_guardedalloc.h" + #include "BLI_listbase.h" #include "BLI_math_vector.h" + #include "BLI_path_util.h" #include "BLI_string.h" #include "BLI_utildefines.h" diff --cc source/blender/makesrna/RNA_access.h index a4e56652620,b943a8fad5a..abbe609d0ef --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@@ -1026,11 -1028,9 +1028,9 @@@ char *RNA_property_string_get_alloc void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value); void RNA_property_string_set_bytes(PointerRNA *ptr, PropertyRNA *prop, const char *value, int len); int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop); -void RNA_property_string_get_default(PointerRNA *ptr, PropertyRNA *prop, char *value); +void RNA_property_string_get_default(PropertyRNA *prop, char *value, int max_len); - char *RNA_property_string_get_default_alloc(PointerRNA *ptr, - PropertyRNA *prop, - char *fixedbuf, - int fixedlen); + char *RNA_property_string_get_default_alloc( + PointerRNA *ptr, PropertyRNA *prop, char *fixedbuf, int fixedlen, int *r_len); int RNA_property_string_default_length(PointerRNA *ptr, PropertyRNA *prop); int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop); diff --cc source/blender/makesrna/intern/rna_access.c index dda1c2ff56a,c838032f1bb..246446313d4 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@@ -3392,11 -3551,15 +3403,15 @@@ char *RNA_property_string_get_default_a buf = fixedbuf; } else { - buf = MEM_callocN(sizeof(char) * (length + 1), "RNA_string_get_alloc"); + buf = MEM_callocN(sizeof(char) * (length + 1), __func__); } - RNA_property_string_get_default(ptr, prop, buf); + RNA_property_string_get_default(prop, buf, length + 1); + if (r_len) { + *r_len = length; + } + return buf; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs