Hi Frank, thanks for your reply.

Attached is the gizmo as a group. If the replace_NaN checkbox is checked,
the inputs are disconnected upon launch. It's probably something really
obvious, but I can't seem to figure it out. Thank you.

#! /net/sw/opt/thefoundry/Nuke6.3v7/Nuke6.3 -nx
version 6.3 v7
Group {
 inputs 3
 knobChanged "\n\nfrom __future__ import with_statement\n\nn =
nuke.thisNode()\nk = nuke.thisKnob()\n\nif k.name() == \"replace_nan\":\n
 with n:\n        if n\[\"replace_nan\"].value() == True:\n
 n\[\"nan_val_replace\"].setEnabled(True)\n            exp =
nuke.toNode(\"replace_nan_expression\")\n
 exp\[\"disable\"].setValue(False)\n        else:\n
 n\[\"nan_val_replace\"].setEnabled(False)\n            exp =
nuke.toNode(\"replace_nan_expression\")\n
 exp\[\"disable\"].setValue(True)\n\n"
 tile_color 0xff00ffff
 note_font "Bitstream Vera Sans Bold Bold Bold Bold Bold Bold Bold Bold
Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold"
 mapsize {0.15 0.15}
 addUserKnob {20 controls}
 addUserKnob {20 overall_controls l "overall controls" n 1}
 addUserKnob {41 depthChannel l "depth channel" T pgBokeh3.depthChannel}
 addUserKnob {41 outputType l "output type" T pgBokeh3.outputType}
 addUserKnob {6 replace_nan l "replace NaN" +STARTLINE}
 addUserKnob {3 nan_val_replace l "replace NaN value" +DISABLED}
 nan_val_replace 20000
 addUserKnob {20 endGroup_overall_controls l endGroup n -1}
 addUserKnob {20 lens n 1}
 lens 0
 addUserKnob {41 bloom T pgBokeh3.bloom}
 addUserKnob {41 bloomCurvature l Curvature T pgBokeh3.bloomCurvature}
 addUserKnob {41 bloomThreshold l "Bloom Threshold" T
pgBokeh3.bloomThreshold}
 addUserKnob {20 endGroup_lens l endGroup n -1}
 addUserKnob {20 kernel n 1}
 kernel 0
 addUserKnob {41 kernelType l "kernel type" T pgBokeh3.kernelType}
 addUserKnob {41 max_kernelsize l "maximum kernel size" T
pgBokeh3.max_kernelsize}
 addUserKnob {41 expandBBoxToMaxKernelSize l "expand bounding box to max
kernel size" T pgBokeh3.expandBBoxToMaxKernelSize}
 addUserKnob {41 kAspectRatio l "aspect ratio" T pgBokeh3.kAspectRatio}
 addUserKnob {41 kSoftness l softness T pgBokeh3.kSoftness}
 addUserKnob {41 kNumSides l sides T pgBokeh3.kNumSides}
 addUserKnob {41 kRotation l rotation T pgBokeh3.kRotation}
 addUserKnob {41 kSphAbb l "spherical aberration" T pgBokeh3.kSphAbb}
 addUserKnob {41 kChrAbb l "chromic aberration" T pgBokeh3.kChrAbb}
 addUserKnob {41 kChrAbbOff l "chromic aberration offset" T
pgBokeh3.kChrAbbOff}
 addUserKnob {20 endGroup_kernel l endGroup n -1}
}
 Input {
  inputs 0
  name camera
  xpos -1167
  ypos -8
  number 1
 }
 Input {
  inputs 0
  name kernel
  xpos -704
  ypos -8
  number 2
 }
 Input {
  inputs 0
  name img
  xpos -921
  ypos -269
 }
 Expression {
  channel0 depth
  expr0 "isnan(z) ? nan_val_replace : z"
  name replace_nan_expression
  tile_color 0xff00ff
  xpos -921
  ypos -142
  disable true
 }
 pgBokeh {
  inputs 3
  focusOutput Back
  realWorldLens true
  filmFormat Custom
  apertureWidth {{parent.input1.haperture i}}
  apertureHeight {{parent.input1.vaperture i}}
  bloomCurvature 0
  bloomThreshold 0
  kSphAbb 0.2
  kChrAbb 0.5
  kChrAbbOff {0.6 1 1}
  name pgBokeh3
  xpos -921
  ypos -8
 }
 Output {
  name Output1
  xpos -921
  ypos 133
 }
end_group




2012/6/22 Frank Rueter <fr...@beingfrank.info>

>  Check the gizmo file and see if the Input nodes' "input" knobs have a
> consecutive numbering (i.e. 1,2,3, not 1, 3,4 etc).
> If you can share the gizmo file it will be easier to help.
>
>
>
> On 21/06/12 7:43 PM, Simon Björk wrote:
>
> When I launch my script some of my custom gizmos loose their inputs and I
> have to manually connect them again. Anyone seen this? They are just simple
> gizmos with a few knobChanged callbacks. Using Nuke 6.3v7 on Linux.
>
>  Best regards,
> Simon
>
>
> _______________________________________________
> Nuke-python mailing listnuke-pyt...@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
>
>
_______________________________________________
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