Re: [Nuke-users] linking formats

2012-10-29 Thread Hugo Léveillé
Salut This seems to work fine for me blur = nuke.createNode(Blur) checker = nuke.createNode(CheckerBoard2) format_name = blur.format().name() checker['format'].setValue(format_name) On Mon, Oct 29, 2012, at 01:30, Xavier Bourque wrote: Hey everyone, I'm bumping up this old thread because

Re: [Nuke-users] linking formats

2012-10-29 Thread Xavier Bourque
Salut Hugo, Thanks for the tip. Yes, this works for me too. However this will fail if the current format of 'blur' is not named (for example by inheriting a format created by a Read node loading some random image). --Xavier On Monday, October 29, 2012, Hugo Léveillé hu...@fastmail.net wrote:

Re: [Nuke-users] linking formats

2012-10-29 Thread Xavier Bourque
Not sure I want to name every random format that might be in someones script. I'm still baffled with my original example. I compare every attribute I can between the format I get from the node.format() method vs. the node['format'].value() and they appear identical in all aspects, yet one fails

Re: [Nuke-users] linking formats

2012-10-28 Thread Xavier Bourque
Hey everyone, I'm bumping up this old thread because I'm not sure what's the current 'best practice' to link the format of a checkerboard/constant/colorwheel/colorbars to the format of some other random node that doesn't have a format knob (like, say, a Blur node). This works: a =

[Nuke-users] linking formats

2011-03-22 Thread Julian Van Mil
I need to create a checkerboard inside a gizmo or group that inherits the format of Input1. Anyone know how to do this easily? I know I'm missing something simple here... Thanks, - jvm___ Nuke-users mailing list Nuke-users@support.thefoundry.co.uk

Re: [Nuke-users] linking formats

2011-03-22 Thread Frank Fieser
This is how I like to do it within my tools... set cut_paste_input [stack 0] version 6.1 v2 CheckerBoard2 { inputs 0 name CheckerBoard1 selected true xpos -625 ypos -613 } Crop { box {0 0 {Gather_Input_Data.myWidth i} {Gather_Input_Data.myHeight i}} reformat true crop false name

Re: [Nuke-users] linking formats

2011-03-22 Thread Julian Van Mil
thanks for this - I'm doing something similar right now (just with reformat nodes... and it works), but I'm trying to get the checkerboard to get drawn initially at the proper res without having to filter it. Any ideas? - jvm On 2011-03-22, at 10:58 , Frank Fieser wrote: This is how I like

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
Python button and a callback for onCreate? Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 22 March 2011 17:02, Julian Van Mil maill...@julianvanmil.com wrote: thanks for this - I'm doing something

Re: [Nuke-users] linking formats

2011-03-22 Thread Julian Van Mil
maybe... I know absolutely nothing about python :( That of course, is another problem for me entirely. - jvm On 2011-03-22, at 11:13 , Ron Ganbar wrote: Python button and a callback for onCreate? Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968 007 309 [UK] +972 (0)54 255

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
Hmmm... OK, anyone: is there a way to call up in an expression the current format of a node? Not the height and width, but the whole format? Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 22 March 2011

Re: [Nuke-users] linking formats

2011-03-22 Thread Ean Carr
I've tried to link pulldown knobs before in nodes like CheckerBoard using setExpression() without success.The only way I have ever figured out how to make this work is through a knobChanged callback. The approach is similar whether it's a group or gizmo. Here are some examples to try in your

Re: [Nuke-users] linking formats

2011-03-22 Thread Michael Havart
Hi Ron, just trying to match the width and height of the node with the width and height of one of the formats: def getFormat(node): w,h = int(node.width()), int(node.height()) for format in nuke.formats(): if w == format.width() and h == format.height(): print

Re: [Nuke-users] linking formats

2011-03-22 Thread Michael Havart
this works on a label: [python {[format.name() for format in nuke.formats() if nuke.thisNode().width() == format.width() and nuke.thisNode().height() == format.height()]}] don't know how to write that in tcl 2011/3/22 Ron Ganbar ron...@gmail.com That's great, Michael. But I'm trying to find

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
I can't get it to work in a format expression panel myself. Maybe somebody else here try? Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 22 March 2011 18:36, Michael Havart michael.hav...@gmail.com

Re: [Nuke-users] linking formats

2011-03-22 Thread Ean Carr
AFAIK, you can't expression link certain types of pulldown knobs in Nuke. Some work, some don't. This doesn't work: checkerboard_linked['format'].setExpression('checkerboard_master.format') But this does: nuke.toNode('Blur_linked')['filter'].setExpression('Blur_master.filter') -E set

Re: [Nuke-users] linking formats

2011-03-22 Thread Ivan Busquets
FYI, there is now a node.format() method that returns the a format object. Can't remember when it was introduced, but it's fairly recent (6.1v5?) So you can do something like: [python nuke.thisNode().format().name()] ...if you just want the name. Or... [python nuke.thisNode().format().width()]

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
Hmmm... Shame. The main problem here is that the format property's expression panel isn't like other expression panels. It doesn't accept any scripting, TCL or Python. Only expressions. Guess it's really down to one of those Python solutions. Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968

Re: [Nuke-users] linking formats

2011-03-22 Thread Ivan Busquets
Format knobs are the only ones you can't expression link (up until 6.2). Other enumerations, including channel knobs , filter knobs, etc. were fine. Pre 6.2, a knobChanged callback was the best (only?) way to make a format knob drive changes to another format knob. In 6.2, though, you can set an

Re: [Nuke-users] linking formats

2011-03-22 Thread Michael Havart
That's nice I need to look more into Nuke6.1 and6.2 ... 2011/3/22 Ivan Busquets ivanbusqu...@gmail.com Format knobs are the only ones you can't expression link (up until 6.2). Other enumerations, including channel knobs , filter knobs, etc. were fine. Pre 6.2, a knobChanged callback was the

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
Correct, Ivan. But if you look at other types of properties, you can type python and tcl commands in the expression panel instead of writing an expression. The format enumeration doesn't allow for that, which makes the solution for Julian's problem a much more difficult one. Ron Ganbar email:

Re: [Nuke-users] linking formats

2011-03-22 Thread Ean Carr
Ah, cool. I'm on 6.1 so that makes sense. Nice to see this is fixed in 6.2. On Tue, Mar 22, 2011 at 4:49 PM, Ivan Busquets ivanbusqu...@gmail.comwrote: Format knobs are the only ones you can't expression link (up until 6.2). Other enumerations, including channel knobs , filter knobs, etc.

Re: [Nuke-users] linking formats

2011-03-22 Thread Julian Van Mil
I'm on 6.2... and next to every format pulldown in checkerboards and pulls downs there's a little '=' button that allows me to 'set-link' I figured this has got to solve my problem, but entering what I would expect to be the normal solution... i.e. 'Input1.format' returns nothing... - jvm

Re: [Nuke-users] linking formats

2011-03-22 Thread Ron Ganbar
Julian, that's what I was trying to figure out for you, by using the expression panel (that's what comes up by choosing the set link). Seems like it's no use in this case though. Ron Ganbar email: ron...@gmail.com tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url:

Re: [Nuke-users] linking formats

2011-03-22 Thread Ean Carr
So from what you guys have said, if you're on 6.2, this is the expression to use, Julian: parent.input0.format But Ron says that setting the format knob through the interface isn't working, so I would try through python: g = nuke.toNode('mygroup') g.begin() c = nuke.toNode('myCheckerboard')

Re: [Nuke-users] linking formats

2011-03-22 Thread Julian Van Mil
thanks for the help guys got it working with that... It's so close to what I was doing before :) cheers, - jvm On 2011-03-22, at 13:19 , Ron Ganbar wrote: Hi Ean and Julian, That expression (parent.input0.format) does work! That is the solution to use! Ron Ganbar email:

Re: [Nuke-users] linking formats

2011-03-22 Thread Ivan Busquets
Ooops, saw your reply too late. You just realized that too. :) On Tue, Mar 22, 2011 at 10:27 AM, Ron Ganbar ron...@gmail.com wrote: Ivan, of course you're right. The test I was doing had a format knob in the input, so it worked. But actually we want a format object rather than a knob.