Hi guys,

I'm trying to build a gizmo with a mask input (as most of Nuke standard nodes). 
I have two questions:

Is it possible to customise the 'mask' input to be at the side of the node 
(just the small triangle instead of the top arrow)? And of course, how?

My other question is how to customise the a pulldown choice knob (channels) to 
change dynamically as soon as you connect something into the 'mask' input. For 
instance the same behaviour as the 'Grade' node, as soon as you plug the 'mask' 
input into a roto node the 'mask' knob is activated and set as 'rgba.alpha' in 
the pulldown choice.

I've copy a simple script containing the group, with the inputs and the 'mask' 
knob.

Thanks for your help.

Cheers,

Victor


set cut_paste_input [stack 0]
version 6.2 v4
push $cut_paste_input
Roto {
 curves {AnimTree: "" {
 Version: 1.2
 Flag: 0
 RootNode: 1
 Node: {
  NodeName: "Root" {
   Flag: 512
   NodeType: 1
   Transform: 0 0 S 0 0 S 0 0 S 0 0 S 0 1 S 0 1 S 0 0 S 0 1024 S 0 778 
   NumOfAttributes: 10
   "vis" S 0 1 "opc" S 0 1 "mbo" S 0 1 "mb" S 0 1 "mbs" S 0 0.5 "fo" S 0 1 "fx" 
S 0 0 "fy" S 0 0 "ff" S 0 1 "ft" S 0 0 
  }
  NumOfChildren: 1
  Node: {
   NodeName: "Ellipse1" {
    Flag: 576
    NodeType: 3
    CurveGroup: "" {
     Transform: 0 0 S 1 1 0 S 1 1 0 S 1 1 0 S 1 1 1 S 1 1 1 S 1 1 0 S 1 1 997.5 
S 1 1 757.5 
     Flag: 0
     NumOfCubicCurves: 2
     CubicCurve: "" {
      Type: 0 Flag: 8192 Dim: 2
      NumOfPoints: 12
      0 S 1 1 -230.579 S 1 1 0 0 0 S 1 1 997.5 S 1 1 340 0 0 S 1 1 230.579 S 1 
1 0 0 0 S 1 1 0 S 1 1 -230.579 0 0 S 1 1 1415 S 1 1 757.5 0 0 S 1 1 0 S 1 1 
230.579 0 0 S 1 1 230.579 S 1 1 0 0 0 S 1 1 997.5 S 1 1 1175 0 0 S 1 1 -230.579 
S 1 1 0 0 0 S 1 1 0 S 1 1 230.579 0 0 S 1 1 580 S 1 1 757.5 0 0 S 1 1 0 S 1 1 
-230.579 0 
     }
     CubicCurve: "" {
      Type: 0 Flag: 8192 Dim: 2
      NumOfPoints: 12
      0 S 1 1 -230.579 S 1 1 0 0 0 S 1 1 0 S 1 1 0 0 0 S 1 1 230.579 S 1 1 0 0 
0 S 1 1 0 S 1 1 -230.579 0 0 S 1 1 0 S 1 1 0 0 0 S 1 1 0 S 1 1 230.579 0 0 S 1 
1 230.579 S 1 1 0 0 0 S 1 1 0 S 1 1 0 0 0 S 1 1 -230.579 S 1 1 0 0 0 S 1 1 0 S 
1 1 230.579 0 0 S 1 1 0 S 1 1 0 0 0 S 1 1 0 S 1 1 -230.579 0 
     }
     NumOfAttributes: 43
     "vis" S 0 1 "r" S 0 1 "g" S 0 1 "b" S 0 1 "a" S 0 1 "ro" S 0 0 "go" S 0 0 
"bo" S 0 0 "ao" S 0 0 "opc" S 0 1 "bm" S 0 0 "inv" S 0 0 "mbo" S 0 0 "mb" S 0 1 
"mbs" S 0 0.5 "mbsot" S 0 0 "mbso" S 0 0 "fo" S 0 1 "fx" S 0 0 "fy" S 0 0 "ff" 
S 0 1 "ft" S 0 0 "src" S 0 0 "stx" S 0 0 "sty" S 0 0 "str" S 0 0 "sr" S 0 0 
"ssx" S 0 1 "ssy" S 0 1 "ss" S 0 0 "spx" S 0 1024 "spy" S 0 778 "stot" S 0 0 
"sto" S 0 0 "sv" S 0 0 "sf" S 0 1 "sb" S 0 1 "nv" S 0 1 "view1" S 0 1 "ltn" S 0 
1 "ltm" S 0 1 "ltt" S 0 0 "tt" S 0 6 
    }
   }
   NumOfChildren: 0
  }
 }
}
}
 toolbox {selectAll {
  { selectAll ssx 1 ssy 1 sf 1 }
  { createBezier ssx 1 ssy 1 sf 1 sb 1 tt 4 }
  { createBSpline ssx 1 ssy 1 sf 1 sb 1 }
  { createEllipse ssx 1 ssy 1 sf 1 sb 1 tt 6 }
  { createRectangle ssx 1 ssy 1 sf 1 sb 1 }
  { brush ssx 1 ssy 1 sf 1 sb 1 }
  { eraser src 2 ssx 1 ssy 1 sf 1 sb 1 }
  { clone src 1 ssx 1 ssy 1 sf 1 sb 1 }
  { reveal src 3 ssx 1 ssy 1 sf 1 sb 1 }
  { dodge src 1 ssx 1 ssy 1 sf 1 sb 1 }
  { burn src 1 ssx 1 ssy 1 sf 1 sb 1 }
  { blur src 1 ssx 1 ssy 1 sf 1 sb 1 }
  { sharpen src 1 ssx 1 ssy 1 sf 1 sb 1 }
  { smear src 1 ssx 1 ssy 1 sf 1 sb 1 }
} }
 toolbar_brush_hardness 0.200000003
 toolbar_lifetime_type all
 toolbar_source_transform_scale {1 1}
 toolbar_source_transform_center {320 240}
 colorOverlay 0
 lifetime_type "all frames"
 motionblur_shutter_offset_type centred
 source_black_outside true
 name Roto1
 selected true
 xpos -40
 ypos -171
}
Constant {
 inputs 0
 channels rgb
 name Constant1
 selected true
 xpos 120
 ypos -87
}
Group {
 inputs 2
 name Group1
 selected true
 xpos -40
 ypos -63
 addUserKnob {20 User}
 addUserKnob {41 from0 l "Copy channel" T Copy1.from0}
}
 Input {
  inputs 0
  name mask
  xpos 183
  ypos 153
  number 1
 }
 Input {
  inputs 0
  name Input
  xpos 0
  ypos 45
 }
 Copy {
  inputs 2
  to0 rgba.alpha
  name Copy1
  selected true
  xpos 0
  ypos 148
 }
 Output {
  name Output1
  xpos 0
  ypos 225
 }
end_group_______________________________________________
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

Reply via email to