PDA

View Full Version : Long arrays display truncated


groutcho
02-10-2009, 04:34 PM
Hi all,

Here is my problem.

I'm creating an array (typically objects as array) whose then I write the contents into the user defined property window. The Problem is that the display of this array is truncated after a certain amount of characters so that it ends like this #(value1, value2, value3, ...)

The goal is to store some arrays of objects to be displayed in the user defined properties of the cameras in the scene.

Of course if I access the array by calling its name, i get its full values.

I then create a user defined property which stores this array.

The problem is that I need to write the content of the property in a XML file. How can I bypass this limitation ? I thought about storing the array's name instead of its values like :

theUserDefinedProperty = theArrayName

but I'm not so sure...

EDIT : I would like to store the variable's name instead of its value, how to do it ?

PiXeL_MoNKeY
02-10-2009, 04:42 PM
Look up options.PrintAllElements.

NOTE: it is only truncated when printed to the listerner. All the data is there and can be accessed using normal array methods.

-Eric

groutcho
02-10-2009, 04:45 PM
Great ! That is exactly what I needed. I know that the variable is not truncated, only its display, but it is just what i needed. Thanks !

SyncViewS
02-10-2009, 06:05 PM
As was mentioned in this previous thread (http://forums.cgsociety.org/showthread.php?f=98&t=726705), you can use the context
with printAllElements on
(
format "Array: %\n" myArray
)- Enrico

groutcho
02-10-2009, 06:32 PM
That is exactly what i did.

CGTalk Moderation
02-10-2009, 06:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.