Try making your master_scaling knob an XYZ knob instead of a Scale knob. Scale_knob is one of those that doesn't serialize correctly when created through Python, and is rebuilt as an Array knob once you copy-paste or reopen the script.
That's when your scale.x, scale.y and scale.z expressions start failing, because Array_knob doesn't have xyz fields. Hope that helps On Sun, May 4, 2014 at 5:18 PM, -emre <[email protected]> wrote: > Maybe, you'd like to have a look at what i'm trying to do :-) It's > supposed to be a clone of Fusion's Duplicate3D node. > > http://pastebin.com/jydVi54t > > EMRE AYPAR.OTOMAT. > VFX. > +90212 2938093. > > > On Mon, May 5, 2014 at 2:50 AM, -emre <[email protected]> wrote: > >> when knobChanged fires, it checks the value of the Int_Knob and creates >> as many axis nodes inside the group. The translate values of each of those >> axis nodes are linked to the XYZ_Knob in the parent. >> >> EMRE AYPAR.OTOMAT. >> VFX. >> +90212 2938093. >> >> >> On Mon, May 5, 2014 at 1:31 AM, Erwan Leroy <[email protected]> wrote: >> >>> Hi, >>> I've had nodes inside a group expression linked to user knobs on the >>> group with no issues at all when copy/pasting. >>> What is your int knob actually doing? >>> >From the description of your problem it sounds like the only thing >>> controlling the axis is the xyz knob. What are the int and knobchanged >>> doing? >>> Cheers >>> Erwan >>> On 4 May 2014 15:23, "-emre" <[email protected]> wrote: >>> >>>> Hello, >>>> >>>> I'm trying to write a python script which creates a group node. I have >>>> an Int_Knob and an XYZ_Kob defined in the group's panel. The Int_Knob is >>>> tied to the knobChanged callback of the group. When the user changes the >>>> value of this knob, it dynamically creates Axis nodes inside the group >>>> which are linked to the XYZ_Knob of the group with expressions. >>>> >>>> Everything is working fine but when i copy/paste the group node or >>>> save/reload the nuke script, even though the expressions in the Axis nodes >>>> are there, they don't work as they should. >>>> >>>> To debug where the problem is, i removed the axis linking expressions >>>> from the python script and all copy/paste and save/load operations work >>>> fine. I believe, this has something to do with group contents being created >>>> before the group panel on load. >>>> >>>> Am i doing something wrong? What would you recommend? >>>> >>>> EMRE AYPAR.OTOMAT. >>>> VFX. >>>> +90212 2938093. >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >> > > _______________________________________________ > 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
