The problem with using Enumeration knobs for that purpose is that, if you
have it in a gizmo and change its contents dynamically, the list of items
doesn't get saved with the script (only the index of the selected item gets
saved).
So, you can store your array of strings in there, but it will be lost if you
copy-paste the gizmo, or if you reopen the script.

If you don't need it to live inside a gizmo it should be fine, though (just
as long as it's a User knob)


On Wed, Apr 13, 2011 at 6:09 AM, Bertrand Lempereur <[email protected]>wrote:

> Why not with Enumeration_Knob ?
> You can store an array of strings and read it back with the knob().values()
> command.
>
>
>
>
> 2011/4/13 Jimmy Christensen <[email protected]>
>
>> Or json packed object.
>> http://docs.python.org/library/json.html
>>
>> Best Regards
>> Jimmy Christensen
>> Developer
>> Ghost A/S
>>
>>
>> On 04/12/2011 10:55 PM, Mike Donovan wrote:
>>
>>> you could write it out to an xml or delimited file
>>>
>>> *From:*[email protected]
>>> [mailto:[email protected]] *On Behalf Of
>>> *Brogan Ross
>>> *Sent:* Tuesday, April 12, 2011 4:47 PM
>>> *To:* [email protected]
>>> *Subject:* [Nuke-python] Storing an array of strings
>>>
>>> Hey everyone just curious if anyone else has tried this: I want to store
>>> an array of strings in a node so I can call each string back later. For
>>> a second I thought the array knob was the way to go but I guess it only
>>> stores integers? Anyone have some advice?
>>>
>>>
>>> ________________________________________________________________________
>>> This e-mail has been scanned for all viruses by Star. The
>>> service is powered by MessageLabs. For more information on a proactive
>>> anti-virus service working around the clock, around the globe, visit:
>>> http://www.star.net.uk
>>> ________________________________________________________________________
>>>
>>>
>>> ________________________________________________________________________
>>> This e-mail has been scanned for all viruses by Star. The
>>> service is powered by MessageLabs. For more information on a proactive
>>> anti-virus service working around the clock, around the globe, visit:
>>> http://www.star.net.uk
>>> ________________________________________________________________________
>>>
>>>
>>> _______________________________________________
>>> Nuke-python mailing list
>>>
>>> [email protected]
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>
>> _______________________________________________
>> Nuke-python mailing list
>>
>> [email protected]
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>
>
>
> --
> Bertrand Lempereur
> TD at Mikros Image
>
>
> _______________________________________________
> Nuke-python mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to