Blender Git Loki

Git Commits -> Revision eed45b6

Revision eed45b6 by Jacques Lucke (master)
March 23, 2021, 10:47 (GMT)
RNA: support automatically mapping string property to char pointer

The goal of this patch is to remove the boilerplate code required to get
a string property that maps to an allocated char pointer in dna.
Previously, one to to provide three callbacks, all of which are not necessary
anymore for a simple string property.

Currently, when an empty string is assigned, the `set` function will always
allocate it as well, instead of assigning `NULL` to the pointer. Some structs
might support `NULL` while others don't, so this is the safer option for now.

Differential Revision: https://developer.blender.org/D10773

Commit Details:

Full Hash: eed45b655c9ff27718572da7359749ee615c5191
Parent Commit: 4e0fd7f
Lines Changed: +51, -67

2 Modified Paths:

/source/blender/makesrna/intern/makesrna.c (+51, -31) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+0, -36) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021