Thanks Diogo!
Yes that should do it, I'd rather have not re-ordered the list but if its the
only way...
CheersHoward
Howard
>________________________________
> From: Diogo Girondi <[email protected]>
>To: Howard Jones <[email protected]>; Nuke Python discussion
><[email protected]>
>Sent: Thursday, 3 May 2012, 20:09
>Subject: Re: [Nuke-python] preset Enumeration knob
>
>
>Hi Howard,
>
>
>You could do something like:
>
>
>original_list = ['A','B','C','D','E']
>
>
>for i,v in enumerate( original_list ):
> if v == 'D':
> first = list( original_list.pop( i ) )
>
>
>print first+original_list
>
>
>>>> ['D', 'A', 'B', 'C', 'E']
>
>
>Id that what you want?
>
>
>
>
>cheers,
>diogo
>
>On Thu, May 3, 2012 at 1:58 PM, Howard Jones <[email protected]> wrote:
>
>Hi
>>
>>
>>I'm populating an enumeration knob with the contents of a directory.
>>In some instances though I would like to do this but have the knob display a
>>specific value first.
>>
>>
>>That is
>>
>>list=[A,B,C]
>>
>>
>>enumeration knob displays
>>A
>>B
>>C
>>
>>
>>but I'd like it to start at *
>>
>>
>>
>>A
>>B*
>>C
>>
>>
>>On the simple panel I would set this by
>>B
>>A
>>B
>>C
>>
>>
>>which is a bit clunky. However this is know with python panel and I would
>>rather do it neater if poss.
>>Is this possible?
>>
>>
>>
>>ThanksHoward
>>
>>_______________________________________________
>>Nuke-python mailing list
>>[email protected], http://forums.thefoundry.co.uk/
>>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
>
>
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python