[Bf-committers] Patch 6402 Bug in IDProperty handling of matrices and vectors

Joe Eagar joeedh at gmail.com
Sat Apr 14 03:14:43 CEST 2007

Hannu Parviainen wrote:
> Thanks, that clarifies things. What about string-type properties, are 
> they still
> under heavy development? The reason I'm asking is that I've got code like
> char *dataStr
> dataStr = (char*) RM_GetPropertyPointer(&ob->id, "example", 
> uiDefBut(block, TEX,  0, "", 90,180,150,20,  dataStr, 0, 40.0, 0, 0, 
> "Example string data");
> where dataStr now points to the IDProperty example->data.pointer, and 
> manipulating the
> string leads to severe unstability. The property is initialized with 
> the IDP_new() as a string
> and has enough room for the text.
> Hannu
Is RM_GetPropertyPointer a utility function you wrote?  If so, 
submitting utility functions to the patch tracker (assigned to me) is 
great, since the C API of id properties still needs some review/improvement.

Anyway, could you post the code for RM_GetPropertyPointer?  Also, you 
probably need to set the id property len property of the string to the 
string's length + 1.  Strings in ID properties are always assumed to 
have the correct string_property->len set; this might be a bad idea, and 
one I might be able to do away with via the magic of MEM_alloc_len.


More information about the Bf-committers mailing list