Good timing on this issue - I've just spend a day trying to hack out a fix as to why I'm only getting a right eye when I unsplit, when I wanted the left. I've ended up doing a very unhappy toScript/fromScript approach. Glad, but sad, it's not just me. ;)
Cheers JRAB On Jan 8, 2013, at 11:39 PM, Ben Dickson <ben.dick...@rsp.com.au> wrote: > Strange - are you sure? Tested in 6.3v8 and 7.0v1 on Linux, doesn't seem to > work for both views. > > Support explained the problem better: > >> It looks like the unsplitView() command only works if the supplied view >> (either with the view argument or by defaulting to the selected view in the >> viewer) is the same view that was selected when the knob was split. >> >> This is now logged as bug #33372 in our database and I've included your email >> in the record. I'm afraid that I've not been able to find a workaround so >> far. > > > > On 09/01/13 07:56, Frank Rueter wrote: >> both splitView and unsplitView seem to work as expected for me (osx Nuke >> 7.0v2). >> >> On 1/8/13 10:07 PM, Ben Dickson wrote: >>> Am I doing something silly, or is unsplitView(view=...) buggy? >>> >>> I want to "explode" a node with split parameters into a "left" and a >>> "right node" >>> >>> So I tried: >>> >>> knob = nuke.selectedNode()['size'] >>> knob.unsplitView("left") >>> >>> ..which drops the right-eye value as expected. However: >>> >>> knob.unsplitView("right") >>> >>> ..does nothing. Also tried using an integer for the view, >>> >>> knob.unsplitView(0) >>> knob.unsplitView(1) >>> knob.unsplitView(2) >>> >>> ..but none of these seem to do anything sensible. >>> >>> >>> The workarounds I've found didn't really work: >>> >>> 1. Manually copy the parameters over, handling all the cases like a >>> single value, expressions, animated, 2D-pos/RGB knob with differing >>> values etc. Possible, but a lot of work >>> >>> 2. Use toScript to serialise the values for each eye, then restore >>> with fromScript.. However if I specify an OutputContext() with the >>> view set, I only get one frame of values: >>> >>> ctx = nuke.OutputContext() >>> ctx.setView(view_idx + 1) >>> >>> # Serialise knob in correct view >>> scriptval = knob.toScript(context = ctx) >>> >>> # Unsplit and shove serialised value into new node's knob >>> newnodes[view][kname].unsplitView() >>> newnodes[view][kname].fromScript(scriptval) >>> >>> I could parse the knob.toScript() and remove the other eye with >>> string-processing, but.. that's awful. >> >> _______________________________________________ >> 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 > > -- > ben dickson > 2D TD | ben.dick...@rsp.com.au > rising sun pictures | www.rsp.com.au > _______________________________________________ > 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