Also I was checking yesterday quickly the ocio colorspace node has an
option to affect all channels, you might just be able to add this before
everything gets shuffled out. Might not be suitable if your question was
part of a wider python script, but if it's just shuffle everything in a
different colorspace it should be enough.
Cheers
On Dec 23, 2014 11:24 AM, "Parimal Desai" <parimal.aca...@gmail.com> wrote:

> I'll work on it. Thanks Erwan!
>
> On Mon, Dec 22, 2014 at 4:06 PM, Erwan Leroy <er...@erwanleroy.com> wrote:
>
>> Just quickly looking at your mail between 2 renders, I think it might be
>> easier and more usable to have a "master" noop that mimics the OCIO node,
>> and all the other ones expression linking to that one. This way the op can
>> easily reopen the controls later on.
>> On 22 Dec 2014 18:31, "Parimal Desai" <parimal.aca...@gmail.com> wrote:
>>
>>> I am currently developing a script which shuffle's out AOV's from a read
>>> node, then user input appears which asks user, Create OCIO ColorSpace or
>>> not ?  If user click Cancel script will end here and if user click Ok OCIO
>>> ColorSpace nodes will be created after every shuffle node and a python
>>> panel will appear which will have same controls as OCIO ColorSpace nodes
>>> and user will be able to change all controls of all OCIO ColorSpace nodes
>>> via this python panel. But I am stuck to link OCIO ColorSpace nodes
>>> controls with python panel controls. I am a python beginner though.
>>>
>>> As a experiment I have written this bit of code which will call, In and
>>> Out Colorspace values of single OCIO ColorSpace node into python panel's
>>> Enumeration Knob, I am able to call values and get values but I don't know
>>> how to control OCIO ColorSpace node from python panel (getting error after
>>> running this code).
>>>
>>>
>>> *class ocioPanel(nukescripts.PythonPanel):*
>>> *    def __init__(self, node):*
>>> *        nukescripts.PythonPanel.__init__(self, 'OCIO ColorSpace')*
>>> *        self.csNode = node*
>>> *        csin = node['in_colorspace'].values()*
>>> *        csout = node['out_colorspace'].values()*
>>> *        self.inKnob = nuke.Enumeration_Knob( 'in_space', 'In Space ',
>>> csin)*
>>> *        self.outKnob = nuke.Enumeration_Knob('out_spcae', 'Out Space',
>>> csout)*
>>>
>>> *        for k in[self.inKnob, self.outKnob]:*
>>> *            self.addKnob(k)*
>>>
>>> * inValue = self.inKnob.value()*
>>> * outValue = self.outKnob.value()*
>>> * for n in node:*
>>> * n.knob('in_colorspace').setValue( inValue )*
>>> * n.knob('out_colorspace').setValue( outValue )  -- *is it right or not?
>>> *n = ocioPanel(node)*
>>> *if n.showModalDialog():*
>>> *    print n.inKnob.value(), n.outKnob.value()*
>>>
>>>
>>>
>>> Any help is highly appreciated.
>>>
>>>
>>> _______________________________________________
>>> Nuke-python mailing list
>>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>
>>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to