From 985a4c1e5ed9c00face5bcf69048bf108ff99aaf Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 25 Mar 2009 20:29:01 +0000 Subject: RNA: * Test with constructing RNA paths from pointer + property, based on a callback per struct. For animato we'll need to be able to do this, for keyframing from buttons, unless we can somehow derive the paths from the interface code, which seems like an unnecessary burden. However constructing such paths is not always quick, and we need a fast way to find out if a property is animated for drawing buttons, so this may not be the best solution. See rna_mesh.c for some callbacks created as a test. * Added BLI_sprintfN to mallocN a new string using printf style formatting. --- source/blender/blenlib/BLI_string.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenlib/BLI_string.h') diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index d9d030432d3..22b41d0055b 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -73,6 +73,12 @@ char *BLI_strncpy(char *dst, const char *src, int maxncpy); */ int BLI_snprintf(char *buffer, size_t count, const char *format, ...); + /* + * Print formatted string into a newly mallocN'd string + * and return it. + */ +char *BLI_sprintfN(const char *format, ...); + /** * Compare two strings * -- cgit v1.2.3