Re: [Nuke-users] adding a user knob to a default node

2011-03-18 Thread Ivan Busquets
I think the most adequate options would be:

A- Make a onUserCreate callback that adds your custom userKnob every time a
CornerPin node is user-created
or...
B- Override nuke.createNode with your own function, and check in there
whether the node being created is a CornerPin. If it is, then you can
proceed with creating your custom Knob. If not, just call the original
nuke.createNode function.

I would probably choose A for this particular case, but B could be a better
choice if you have other standard nodes that you want to have your custom
version of.

Examples:

A: (using a OnUserCreate callback)

def addCornerPinButton():
n = nuke.thisNode()
k = nuke.PyScript_Knob('userKnob', 'userKnob', '')
n.addKnob(k)

nuke.addOnUserCreate(addCornerPinButton, nodeClass = 'CornerPin2D')


B: (overriding nuke.createNode() with your own function)

def createCustomNodes(nodeClass, knobs = , inpanel = True):
node = nukeOriginalCreateNode(node = nodeClass, knobs = knobs, inpanel =
inpanel)
if nodeClass == CornerPin2D:
k = nuke.PyScript_Knob('userKnob', 'userKnob', '')
node.addKnob(k)
return node

nukeOriginalCreateNode = nuke.createNode
nuke.createNode = createCustomNodes


Hope that helps.

Cheers,
Ivan


On Thu, Mar 17, 2011 at 4:07 PM, glouk gl...@glouk.org wrote:

 Hi,

 I would like to add by default a userKnob (python button) to every
 cornerpin that i create...
 (this button copies the values of the from to the to, which i find very
 practical in everyday compositing)

 is there a way to do that in menu.py ? got any ideas ?

 thanks

  glouk http://www.imdb.com/name/nm0522119/

 Highly illogical, Captain.

 http://demo.glouk.org/



 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] adding a user knob to a default node

2011-03-18 Thread Johan Boije
You are not alone in wanting more copy back and forth functions in the
cornerpin node. So if you are not dying to do this yourself this has already
been done by others:

http://www.nukepedia.com/gizmo-downloads/transform/better_cornerpin/

http://www.nukepedia.com/python-scripts/misc/im_cornerpin/

http://www.creativecrash.com/nuke/downloads/gizmos/transform/c/tunedcp2d

I havent tried all of them.

Cheers,
Johan



On Fri, Mar 18, 2011 at 12:07 AM, glouk gl...@glouk.org wrote:

 Hi,

 I would like to add by default a userKnob (python button) to every
 cornerpin that i create...
 (this button copies the values of the from to the to, which i find very
 practical in everyday compositing)

 is there a way to do that in menu.py ? got any ideas ?

 thanks

  glouk http://www.imdb.com/name/nm0522119/

 Highly illogical, Captain.

 http://demo.glouk.org/



 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] adding a user knob to a default node

2011-03-18 Thread glouk
thank you very much.

i'll try method A

Johan, the code is already written. I'm just looking for a way to include it 
automatically. But thanks for the links, i'll have a look.

cheers

Le vendredi 18 mars 2011 08:14:21, Ivan Busquets a écrit :
 I think the most adequate options would be:
 
 A- Make a onUserCreate callback that adds your custom userKnob every time a
 CornerPin node is user-created
 or...
 B- Override nuke.createNode with your own function, and check in there
 whether the node being created is a CornerPin. If it is, then you can
 proceed with creating your custom Knob. If not, just call the original
 nuke.createNode function.
 
 I would probably choose A for this particular case, but B could be a better
 choice if you have other standard nodes that you want to have your custom
 version of.
 
 Examples:
 
 A: (using a OnUserCreate callback)
 
 def addCornerPinButton():
 n = nuke.thisNode()
 k = nuke.PyScript_Knob('userKnob', 'userKnob', '')
 n.addKnob(k)
 
 nuke.addOnUserCreate(addCornerPinButton, nodeClass = 'CornerPin2D')
 
 
 B: (overriding nuke.createNode() with your own function)
 
 def createCustomNodes(nodeClass, knobs = , inpanel = True):
 node = nukeOriginalCreateNode(node = nodeClass, knobs = knobs, inpanel
  = inpanel)
 if nodeClass == CornerPin2D:
 k = nuke.PyScript_Knob('userKnob', 'userKnob', '')
 node.addKnob(k)
 return node
 
 nukeOriginalCreateNode = nuke.createNode
 nuke.createNode = createCustomNodes
 
 
 Hope that helps.
 
 Cheers,
 Ivan
 
 On Thu, Mar 17, 2011 at 4:07 PM, glouk gl...@glouk.org wrote:
  Hi,
 
  I would like to add by default a userKnob (python button) to every
  cornerpin that i create...
  (this button copies the values of the from to the to, which i find
  very practical in everyday compositing)
 
  is there a way to do that in menu.py ? got any ideas ?
 
  thanks
 
   glouk http://www.imdb.com/name/nm0522119/
 
  Highly illogical, Captain.
 
  http://demo.glouk.org/
 
 
 
  ___
  Nuke-users mailing list
  Nuke-users@support.thefoundry.co.uk
  http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 

-- 

glouk 

Highly illogical, Captain.

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] adding a user knob to a default node

2011-03-18 Thread Johan Boije
Aha. Share on Nukepedia if you can. We can never have too many cornerpins.
That copy functionality should really be there out of the box as well as an
invert button me thinks. But that's the beauty of customization I guess, if
it's not there just build it yourself.

J.

On Fri, Mar 18, 2011 at 2:02 PM, glouk gl...@glouk.org wrote:

  thank you very much.

 i'll try method A

 Johan, the code is already written. I'm just looking for a way to include
 it automatically. But thanks for the links, i'll have a look.

 cheers

 Le vendredi 18 mars 2011 08:14:21, Ivan Busquets a écrit :

  I think the most adequate options would be:

 

  A- Make a onUserCreate callback that adds your custom userKnob every time
 a

  CornerPin node is user-created

  or...

  B- Override nuke.createNode with your own function, and check in there

  whether the node being created is a CornerPin. If it is, then you can

  proceed with creating your custom Knob. If not, just call the original

  nuke.createNode function.

 

  I would probably choose A for this particular case, but B could be a
 better

  choice if you have other standard nodes that you want to have your custom

  version of.

 

  Examples:

 

  A: (using a OnUserCreate callback)

  

  def addCornerPinButton():

  n = nuke.thisNode()

  k = nuke.PyScript_Knob('userKnob', 'userKnob', '')

  n.addKnob(k)

 

  nuke.addOnUserCreate(addCornerPinButton, nodeClass = 'CornerPin2D')

  

 

  B: (overriding nuke.createNode() with your own function)

  

  def createCustomNodes(nodeClass, knobs = , inpanel = True):

  node = nukeOriginalCreateNode(node = nodeClass, knobs = knobs, inpanel

  = inpanel)

  if nodeClass == CornerPin2D:

  k = nuke.PyScript_Knob('userKnob', 'userKnob', '')

  node.addKnob(k)

  return node

 

  nukeOriginalCreateNode = nuke.createNode

  nuke.createNode = createCustomNodes

  

 

  Hope that helps.

 

  Cheers,

  Ivan

 

  On Thu, Mar 17, 2011 at 4:07 PM, glouk gl...@glouk.org wrote:

   Hi,

  

   I would like to add by default a userKnob (python button) to every

   cornerpin that i create...

   (this button copies the values of the from to the to, which i find

   very practical in everyday compositing)

  

   is there a way to do that in menu.py ? got any ideas ?

  

   thanks

  

   glouk http://www.imdb.com/name/nm0522119/

  

   Highly illogical, Captain.

  

   http://demo.glouk.org/

  

  

  

   ___

   Nuke-users mailing list

   Nuke-users@support.thefoundry.co.uk

   http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

 


 --

 glouk http://www.imdb.com/name/nm0522119/

 Highly illogical, Captain.


 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] Greenscreens from Hell.

2011-03-18 Thread fredd hidef
We should have a Worst Green/Blue screens of our life competition with
collection of screen dumps... Could be nice to show whining juniors :)

Oh yeah, You think U have it bad? Well, boy, look at this! haha

I surely have a few candidates...

//fredd

On Thu, Mar 17, 2011 at 3:47 PM, Manuel Gonzalez
nosweats...@earthlink.netwrote:

 Thanks for all the answers.


 I usually don't like to premult before keying but this was a desperate
 measure for what hands down has to be the worst greenscreens I ever seen in
 my life, and boy I seen bad stuff before but this one takes the cake.
  Thanks for all the input, I end up using Frank's suggestion it works like a
 charm.
 Back to more greenscreen hell on St Patrick's day, what an irony !


 Happy Green Beer day for you all  !!!.



 Manuel Gonzalez



 ***
 Support Bacteria;
 The only culture some people have.
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users




-- 
__
Fredrik Pihl
digital compositor
+46-708-559 559
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] Greenscreens from Hell.

2011-03-18 Thread pixelcowbo...@gmail.com
It should be divided in categories though, as almost 50% of SD video
greenscreens qualified.

On Fri, Mar 18, 2011 at 8:59 AM, fredd hidef fre...@gmail.com wrote:
 We should have a Worst Green/Blue screens of our life competition with
 collection of screen dumps... Could be nice to show whining juniors :)
 Oh yeah, You think U have it bad? Well, boy, look at this! haha
 I surely have a few candidates...
 //fredd

 On Thu, Mar 17, 2011 at 3:47 PM, Manuel Gonzalez nosweats...@earthlink.net
 wrote:

 Thanks for all the answers.


 I usually don't like to premult before keying but this was a desperate
 measure for what hands down has to be the worst greenscreens I ever seen in
 my life, and boy I seen bad stuff before but this one takes the cake.
  Thanks for all the input, I end up using Frank's suggestion it works like a
 charm.
 Back to more greenscreen hell on St Patrick's day, what an irony !


 Happy Green Beer day for you all  !!!.



 Manuel Gonzalez



 ***
 Support Bacteria;
 The only culture some people have.
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users



 --
 __
 Fredrik Pihl
 digital compositor
 +46-708-559 559

 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] Greenscreens from Hell.

2011-03-18 Thread Johan Boije
Ah those good ol' chromas shot on DV.  And why not throw in the new black...
5D green screen :-)

On Fri, Mar 18, 2011 at 5:01 PM, pixelcowbo...@gmail.com 
pixelcowbo...@gmail.com wrote:

 It should be divided in categories though, as almost 50% of SD video
 greenscreens qualified.

 On Fri, Mar 18, 2011 at 8:59 AM, fredd hidef fre...@gmail.com wrote:
  We should have a Worst Green/Blue screens of our life competition with
  collection of screen dumps... Could be nice to show whining juniors :)
  Oh yeah, You think U have it bad? Well, boy, look at this! haha
  I surely have a few candidates...
  //fredd
 
  On Thu, Mar 17, 2011 at 3:47 PM, Manuel Gonzalez 
 nosweats...@earthlink.net
  wrote:
 
  Thanks for all the answers.
 
 
  I usually don't like to premult before keying but this was a desperate
  measure for what hands down has to be the worst greenscreens I ever seen
 in
  my life, and boy I seen bad stuff before but this one takes the cake.
   Thanks for all the input, I end up using Frank's suggestion it works
 like a
  charm.
  Back to more greenscreen hell on St Patrick's day, what an irony !
 
 
  Happy Green Beer day for you all  !!!.
 
 
 
  Manuel Gonzalez
 
 
 
 
 ***
  Support Bacteria;
  The only culture some people have.
  ___
  Nuke-users mailing list
  Nuke-users@support.thefoundry.co.uk
  http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 
  --
  __
  Fredrik Pihl
  digital compositor
  +46-708-559 559
 
  ___
  Nuke-users mailing list
  Nuke-users@support.thefoundry.co.uk
  http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
 
 
 ___
 Nuke-users mailing list
 Nuke-users@support.thefoundry.co.uk
 http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users