Well, that works as long as the node directly connected has a format knob. But if you plug anything else into the group's input, it won't be able to get its format that way.
On Tue, Mar 22, 2011 at 10:19 AM, Ron Ganbar <[email protected]> wrote: > Hi Ean and Julian, > That expression (parent.input0.format) does work! That is the solution to > use! > > > > Ron Ganbar > email: [email protected] > tel: +44 (0)7968 007 309 [UK] > +972 (0)54 255 9765 [Israel] > url: http://ronganbar.wordpress.com/ > > > > On 22 March 2011 19:12, Ean Carr <[email protected]> wrote: > >> 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') >> c.setExpression('parent.input0.format') >> g.end() >> >> Replace mygroup and mycheckerboard with the actual names and that should >> work >> >> -E >> >> >> On Tue, Mar 22, 2011 at 5:03 PM, Julian Van Mil < >> [email protected]> wrote: >> >>> 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 >>> >>> >>> On 2011-03-22, at 12:52 , Ron Ganbar wrote: >>> >>> 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: [email protected] >>> tel: +44 (0)7968 007 309 [UK] >>> +972 (0)54 255 9765 [Israel] >>> url: http://ronganbar.wordpress.com/ >>> >>> >>> >>> On 22 March 2011 18:49, Ivan Busquets <[email protected]> wrote: >>> >>>> 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 expression link between format knobs, >>>> both through python and manually in the UI. >>>> >>>> >>>> >>>> On Tue, Mar 22, 2011 at 9:42 AM, Ean Carr <[email protected]> wrote: >>>> >>>>> 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 cut_paste_input [stack 0] >>>>> version 6.1 v1 >>>>> push $cut_paste_input >>>>> Blur { >>>>> filter {{Blur_master.filter}} >>>>> name Blur_linked >>>>> selected true >>>>> xpos 161 >>>>> ypos -282 >>>>> } >>>>> Blur { >>>>> inputs 0 >>>>> name Blur_master >>>>> selected true >>>>> xpos 282 >>>>> ypos -282 >>>>> >>>>> } >>>>> >>>>> >>>>> >>>>> On Tue, Mar 22, 2011 at 4:28 PM, Ron Ganbar <[email protected]> wrote: >>>>> >>>>>> That's great, Michael. >>>>>> But I'm trying to find something I can use in an expression - not a >>>>>> python script. That would have been the simplest thing to solve Julian's >>>>>> problem. >>>>>> >>>>>> >>>>>> >>>>>> Ron Ganbar >>>>>> email: [email protected] >>>>>> tel: +44 (0)7968 007 309 [UK] >>>>>> +972 (0)54 255 9765 [Israel] >>>>>> url: http://ronganbar.wordpress.com/ >>>>>> >>>>>> >>>>>> >>>>>> On 22 March 2011 18:12, Michael Havart <[email protected]>wrote: >>>>>> >>>>>>> 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 node.name()+' has this format: '+format.name() >>>>>>> >>>>>>> getFormat(nuke.selectedNode()) >>>>>>> >>>>>>> Michael >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> 2011/3/22 Ron Ganbar <[email protected]> >>>>>>> >>>>>>>> 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: [email protected] >>>>>>>> tel: +44 (0)7968 007 309 [UK] >>>>>>>> +972 (0)54 255 9765 [Israel] >>>>>>>> url: http://ronganbar.wordpress.com/ >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 22 March 2011 17:25, Julian Van Mil >>>>>>>> <[email protected]>wrote: >>>>>>>> >>>>>>>>> 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: [email protected] >>>>>>>>> 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 >>>>>>>>> <[email protected]>wrote: >>>>>>>>> >>>>>>>>>> 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 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 Crop_Reformat >>>>>>>>>> > selected true >>>>>>>>>> > xpos -625 >>>>>>>>>> > ypos -501 >>>>>>>>>> > } >>>>>>>>>> > push $cut_paste_input >>>>>>>>>> > Radial { >>>>>>>>>> > area {512 389 1536 1167} >>>>>>>>>> > name Replace_with_Your_Input >>>>>>>>>> > selected true >>>>>>>>>> > xpos -497 >>>>>>>>>> > ypos -569 >>>>>>>>>> > } >>>>>>>>>> > NoOp { >>>>>>>>>> > name Gather_Input_Data >>>>>>>>>> > selected true >>>>>>>>>> > xpos -497 >>>>>>>>>> > ypos -532 >>>>>>>>>> > addUserKnob {20 User} >>>>>>>>>> > addUserKnob {7 myWidth} >>>>>>>>>> > myWidth {{input.width i}} >>>>>>>>>> > addUserKnob {7 myHeight} >>>>>>>>>> > myHeight {{input.height i}} >>>>>>>>>> > } >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > On Tue, Mar 22, 2011 at 6:49 AM, Julian Van Mil >>>>>>>>>> > <[email protected]> wrote: >>>>>>>>>> >> 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 >>>>>>>>>> >> [email protected] >>>>>>>>>> >> >>>>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>>>>>> >> >>>>>>>>>> >> >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > -- >>>>>>>>>> > Frank Fieser >>>>>>>>>> > http://www.frankfieser.com >>>>>>>>>> > Compositor, Lighter, Motion Designer >>>>>>>>>> > Los Angeles | 407.963.0710 >>>>>>>>>> > _______________________________________________ >>>>>>>>>> > Nuke-users mailing list >>>>>>>>>> > [email protected] >>>>>>>>>> > >>>>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Nuke-users mailing list >>>>>>>>>> [email protected] >>>>>>>>>> >>>>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Nuke-users mailing list >>>>>>>>> [email protected] >>>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Nuke-users mailing list >>>>>>>> [email protected] >>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Nuke-users mailing list >>>>>> [email protected] >>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Nuke-users mailing list >>>>> [email protected] >>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Nuke-users mailing list >>>> [email protected] >>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>>> >>>> >>> _______________________________________________ >>> Nuke-users mailing list >>> [email protected] >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>> >>> >>> >>> _______________________________________________ >>> Nuke-users mailing list >>> [email protected] >>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >>> >>> >> >> _______________________________________________ >> Nuke-users mailing list >> [email protected] >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >> >> > > _______________________________________________ > Nuke-users mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users > >
_______________________________________________ Nuke-users mailing list [email protected] http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
