Trees | Indices | Help |
|
---|
|
1 # Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved. 2 3 import nuke 4 import nukescripts 5 import os, os.path 6 import nuke.rotopaint 7 8 # Define the tool menus. This file is loaded by menu.py.10 # This is not currently used but when we support a text-only mode we'll need it. 11 #size = nuke.numvalue("preferences.toolbarTextSize") 12 13 # Get the top-level toolbar 14 toolbar = nuke.menu("Nodes") 15 16 # The "Image" menu 17 m = toolbar.addMenu("Image", "ToolbarImage.png") 18 m.addCommand("Read", "nukescripts.create_read()", "r", icon="Read.png") 19 m.addCommand("Write", "nuke.createNode(\"Write\")", "w", icon="Write.png") 20 m.addCommand("UDIM import", "nukescripts.udim_import()", "u", icon="Read.png") 21 m.addCommand("Constant", "nuke.createNode(\"Constant\")", icon="Constant.png") 22 m.addCommand("CheckerBoard", "nuke.createNode(\"CheckerBoard2\")", icon="CheckerBoard.png") 23 m.addCommand("ColorBars", "nuke.createNode(\"ColorBars\")", icon="ColorBars.png") 24 m.addCommand("ColorWheel", "nuke.createNode(\"ColorWheel\")", icon="ColorWheel.png") 25 m.addCommand("CurveTool", "nukescripts.createCurveTool()", icon="CurveTool.png") 26 m.addCommand("Viewer", "nuke.createNode(\"Viewer\")", icon="Viewer.png") 27 # m.addCommand("Proxy", "nuke.knob(\"root.proxy\", \"!root.proxy\")", icon="proxyfullres.png") 28 29 # The "Draw" menu 30 m = toolbar.addMenu("Draw", "ToolbarDraw.png") 31 m.addCommand("Roto", '''nuke.createNode("Roto")''', "o", icon="Roto.png") 32 m.addCommand("RotoPaint", "nuke.createNode(\"RotoPaint\")", "p", icon="RotoPaint.png") 33 34 m.addCommand("@;&RotoBranch", "nuke.createNode(\"Roto\")", "+o") 35 m.addCommand("@;&RotoPaintBranch", "nuke.createNode(\"RotoPaint\")", "+p") 36 37 m.addCommand("Dither", "nuke.createNode(\"Dither\")", icon="Dither.png") 38 m.addCommand("DustBust", "nuke.createNode(\"DustBust\")", icon="DustBust.png") 39 m.addCommand("Grain", "nuke.createNode(\"Grain2\")", icon="Grain.png") 40 m.addCommand("ScannedGrain", "nuke.createNode(\"ScannedGrain\")", icon="ScannedGrain.png") 41 m.addCommand("Glint", "nuke.createNode(\"Glint\")", icon="Glint.png") 42 m.addCommand("Grid", "nuke.createNode(\"Grid\")", icon="Grid.png") 43 m.addCommand("Flare", "nuke.createNode(\"Flare\")", icon="Flare.png") 44 m.addCommand("LightWrap", "nuke.createNode(\"LightWrap\")", icon="LightWrap.png") 45 m.addCommand("MarkerRemoval", "nuke.createNode(\"MarkerRemoval\")", icon="MarkerRemoval.png") 46 m.addCommand("Noise", "nuke.createNode(\"Noise\")", icon="Noise.png") 47 m.addCommand("Radial", "nuke.createNode(\"Radial\")", icon="Radial.png") 48 m.addCommand("Ramp", "nuke.createNode(\"Ramp\")", icon="Ramp.png") 49 m.addCommand("Rectangle", "nuke.createNode(\"Rectangle\")", icon="Rectangle.png") 50 m.addCommand("Sparkles", "nuke.createNode(\"Sparkles\")", icon="Sparkles.png") 51 m.addCommand("Text", "nuke.createNode(\"Text\")", icon="Text.png") 52 53 m = toolbar.addMenu("Time", "ToolbarTime.png") 54 m.addCommand("Add 3:2 pulldown", "nuke.createNode(\"add32p\")", icon="Add32.png") 55 m.addCommand("Remove 3:2 pulldown", "nuke.createNode(\"remove32p\")", icon="Remove32.png") 56 m.addCommand("AppendClip", "nuke.createNode(\"AppendClip\")", icon="AppendClip.png") 57 m.addCommand("FrameBlend", "nuke.createNode(\"FrameBlend\")", icon="FrameBlend.png") 58 m.addCommand("FrameHold", "nuke.createNode(\"FrameHold\")", icon="FrameHold.png") 59 m.addCommand("FrameRange", "nuke.createNode(\"FrameRange\")", icon="FrameRange.png") 60 m.addCommand("Kronos", "nukescripts.createKronos()", icon="Oflow.png") 61 m.addCommand("OFlow", "nuke.createNode(\"OFXuk.co.thefoundry.time.oflow_v100\")", icon="Oflow.png") 62 m.addCommand("Retime", "nuke.createNode(\"Retime\")", icon="Retime.png") 63 m.addCommand("TemporalMedian", "nuke.createNode(\"TemporalMedian\")", icon="TemporalMedian.png") 64 m.addCommand("TimeBlur", "nuke.createNode(\"TimeBlur\")", icon="TimeBlur.png") 65 m.addCommand("NoTimeBlur", "nuke.createNode(\"NoTimeBlur\")", icon="NoTimeBlur.png") 66 m.addCommand("TimeEcho", "nuke.createNode(\"TimeEcho\")", icon="TimeEcho.png") 67 m.addCommand("TimeOffset", "nuke.createNode(\"TimeOffset\")", icon="TimeOffset.png") 68 69 m.addCommand("TimeWarp", "nukescripts.create_time_warp()", icon="TimeWarp.png") 70 m.addCommand("TimeClip") 71 72 m.addCommand("VectorGenerator", "nuke.createNode(\"VectorGenerator\")") 73 74 75 # The "Channel" menu 76 m = toolbar.addMenu("Channel", "ToolbarChannel.png") 77 m.addCommand("Shuffle", "nuke.createNode(\"Shuffle\")", icon="Shuffle.png") 78 m.addCommand("ShuffleCopy", "nuke.createNode(\"ShuffleCopy\")", icon="ShuffleCopy.png") 79 m.addCommand("Copy", "nuke.createNode(\"Copy\")", "k", icon="Copy.png") 80 m.addCommand("@;&CopyBranch", "nuke.createNode(\"Copy\")", "+k") 81 m.addCommand("ChannelMerge", "nuke.createNode(\"ChannelMerge\")", icon="ChannelMerge.png") 82 m.addCommand("Add", "nuke.createNode(\"AddChannels\")", icon="Add.png") 83 m.addCommand("Remove","nuke.createNode(\"Remove\")", icon="Remove.png") 84 85 86 # The "Color" menu 87 m = toolbar.addMenu("Color", "ToolbarColor.png") 88 89 n = m.addMenu("Math", "ColorMath.png") 90 n.addCommand("Add", "nuke.createNode(\"Add\")", icon="ColorAdd.png") 91 n.addCommand("Multiply", "nuke.createNode(\"Multiply\")", icon="ColorMult.png") 92 n.addCommand("Gamma", "nuke.createNode(\"Gamma\")", icon="ColorGamma.png") 93 n.addCommand("ClipTest", "nuke.createNode(\"ClipTest\")", icon="ClipTest.png") 94 n.addCommand("ColorMatrix", "nuke.createNode(\"ColorMatrix\")", icon="ColorMatrix.png") 95 n.addCommand("Expression", "nuke.createNode(\"Expression\")", icon="Expression.png") 96 97 n = m.addMenu("OCIO", "OCIO.png") 98 n.addCommand("OCIO CDLTransform", "nuke.createNode(\"OCIOCDLTransform\")", icon="OCIO.png") 99 n.addCommand("OCIO ColorSpace", "nuke.createNode(\"OCIOColorSpace\")", icon="OCIO.png") 100 n.addCommand("OCIO Display", "nuke.createNode(\"OCIODisplay\")", icon="OCIO.png") 101 n.addCommand("OCIO FileTransform", "nuke.createNode(\"OCIOFileTransform\")", icon="OCIO.png") 102 n.addCommand("OCIO LogConvert", "nuke.createNode(\"OCIOLogConvert\")", icon="OCIO.png") 103 104 n = m.addMenu("3D LUT", "Toolbar3DLUT.png") 105 n.addCommand("CMSTestPattern", "nuke.createNode(\"CMSTestPattern\")", icon="CMSTestPattern.png") 106 n.addCommand("GenerateLUT", "nuke.createNode(\"GenerateLUT\")", icon="GenerateLUT.png") 107 n.addCommand("Vectorfield (Apply 3D LUT)", "nuke.createNode(\"Vectorfield\")", icon="Vectorfield.png") 108 109 m.addCommand("Clamp", "nuke.createNode(\"Clamp\")", icon="Clamp.png") 110 m.addCommand("ColorLookup", "nuke.createNode(\"ColorLookup\")", icon="ColorLookup.png") 111 m.addCommand("Colorspace", "nuke.createNode(\"Colorspace\")", icon="ColorSpace.png") 112 m.addCommand("ColorTransfer", "nuke.createNode(\"ColorTransfer\")", icon="ColorTransfer.png") 113 m.addCommand("ColorCorrect", "nuke.createNode(\"ColorCorrect\")", "c", icon="ColorCorrect.png") 114 m.addCommand("@;&ColorCorrectBranch", "nuke.createNode(\"ColorCorrect\")", "+c") 115 m.addCommand("Crosstalk", "nuke.createNode(\"CCrosstalk\")", icon="Crosstalk.png") 116 m.addCommand("Exposure", "nuke.createNode(\"EXPTool\")", icon="Exposure.png") 117 m.addCommand("Grade", "nuke.createNode(\"Grade\")", "g", icon="Grade.png") 118 m.addCommand("@;&GradeBranch", "nuke.createNode(\"Grade\")", "+g") 119 m.addCommand("Histogram", "nuke.createNode(\"Histogram\")", icon="Histogram.png") 120 m.addCommand("HistEQ", "nuke.createNode(\"HistEQ\")", icon="HistEQ.png") 121 m.addCommand("HueCorrect", "nuke.createNode(\"HueCorrect\")", icon="HueCorrect.png") 122 m.addCommand("HueShift", "nuke.createNode(\"HueShift\")", icon="HueShift.png") 123 m.addCommand("HSVTool", "nuke.createNode(\"HSVTool\")", icon="HSVTool.png") 124 m.addCommand("Invert", "nuke.createNode(\"Invert\")", icon="Invert.png") 125 m.addCommand("Log2Lin", "nuke.createNode(\"Log2Lin\")", icon="Log2Lin.png") 126 m.addCommand("PLogLin", "nuke.createNode(\"PLogLin\")", icon="Log2Lin.png") 127 m.addCommand("MinColor", "nuke.createNode(\"MinColor\")", icon="MinColor.png") 128 m.addCommand("Posterize", "nuke.createNode(\"Posterize\")", icon="Posterize.png") 129 m.addCommand("RolloffContrast", "nuke.createNode(\"RolloffContrast\")", icon="RolloffContrast.png") 130 m.addCommand("Saturation", "nuke.createNode(\"Saturation\")", icon="Saturation.png") 131 m.addCommand("Sampler", "nuke.createNode(\"Sampler\")", icon="Sampler.png") 132 m.addCommand("SoftClip", "nuke.createNode(\"SoftClip\")", icon="SoftClip.png") 133 m.addCommand("Toe", "nuke.createNode(\"Toe2\")", icon="Toe.png" ) 134 m.addCommand("Truelight", "nuke.createNode(\"Truelight3\")", icon="Truelight.png") 135 136 137 # The "Filter" menu 138 m = toolbar.addMenu("Filter", "ToolbarFilter.png") 139 m.addCommand("Blur", "nuke.createNode(\"Blur\")", "b", icon="Blur.png") 140 m.addCommand("@;&BlurBranch", "nuke.createNode(\"Blur\")", "+b") 141 m.addCommand("Bilateral", "nuke.createNode(\"Bilateral\")", icon="Bilateral.png") 142 m.addCommand("BumpBoss", "nuke.createNode(\"BumpBoss\")", icon="BumpBoss.png") 143 m.addCommand("Convolve", "nuke.createNode(\"Convolve2\")", icon="Convolve.png") 144 m.addCommand("Defocus", "nuke.createNode(\"Defocus\")", icon="Defocus.png") 145 m.addCommand("DegrainBlue", "nuke.createNode(\"DegrainBlue\")", icon="DegrainBlue.png") 146 m.addCommand("DegrainSimple", "nuke.createNode(\"DegrainSimple\")", icon="DegrainSimple.png") 147 m.addCommand("Denoise", "nuke.createNode(\"Denoise2\")", icon="denoise.png") 148 m.addCommand("DirBlur", "nuke.createNode(\"DirBlurWrapper\")", icon="DirBlur.png") 149 m.addCommand("EdgeBlur", "nuke.createNode(\"EdgeBlur\")", icon="EdgeBlur.png") 150 m.addCommand("EdgeDetect", "nuke.createNode(\"EdgeDetectWrapper\")", icon="EdgeDetect.png") 151 m.addCommand("Emboss", "nuke.createNode(\"Emboss\")", icon="Emboss.png") 152 m.addCommand("Erode (fast)", "nuke.createNode(\"Dilate\")", icon="ErodeFast.png") 153 m.addCommand("Erode (filter)", "nuke.createNode(\"FilterErode\")", icon="FilterErode.png") 154 m.addCommand("Erode (blur)", "nuke.createNode(\"Erode\")", icon="ErodeBlur.png") 155 m.addCommand("Glow", "nuke.createNode(\"Glow2\")", icon="Glow.png") 156 m.addCommand("GodRays", "nuke.createNode(\"GodRays\")", icon="GodRays.png") 157 m.addCommand("Laplacian", "nuke.createNode(\"Laplacian\")", icon="Laplacian.png") 158 m.addCommand("LevelSet", "nuke.createNode(\"LevelSet\")", icon="LevelSet.png") 159 160 m.addCommand("Matrix...", "nukescripts.create_matrix()", icon="Matrix.png") 161 m.addCommand("Median", "nuke.createNode(\"Median\")", icon="Median.png") 162 m.addCommand("MotionBlur", "nuke.createNode(\"MotionBlur\")", icon="MotionBlur2D.png") 163 m.addCommand("MotionBlur2D", "nuke.createNode(\"MotionBlur2D\")", icon="MotionBlur2D.png") 164 m.addCommand("MotionBlur3D", "nuke.createNode(\"MotionBlur3D\")", icon="MotionBlur3D.png") 165 m.addCommand("Sharpen", "nuke.createNode(\"Sharpen\")", icon="Sharpen.png") 166 m.addCommand("Soften", "nuke.createNode(\"Soften\")", icon="Soften.png") 167 m.addCommand("VectorBlur", "nuke.createNode(\"VectorBlur\")", icon="VectorBlur.png") 168 m.addCommand("VolumeRays", "nuke.createNode(\"VolumeRays\")", icon="VolumeRays.png") 169 m.addCommand("ZDefocus", "nuke.createNode(\"ZDefocus2\")", icon="ZBlur.png") 170 m.addCommand("ZSlice", "nuke.createNode(\"ZSlice\")", icon="ZSlice.png") 171 172 173 # The "Keyer" menu 174 m = toolbar.addMenu("Keyer", "ToolbarKeyer.png") 175 m.addCommand("Difference", "nuke.createNode(\"Difference\")", icon="DifferenceKeyer.png") 176 m.addCommand("HueKeyer", "nuke.createNode(\"HueKeyer\")", icon="HueKeyer.png") 177 m.addCommand("IBKGizmo", "nuke.tcl(\"IBKGizmoV3\")", icon="IBKGizmo.png") 178 m.addCommand("IBKColour", "nuke.tcl(\"IBKColourV3\")", icon="IBKColour.png") 179 m.addCommand("Keyer", "nuke.createNode(\"Keyer\")", icon="Keyer.png") 180 m.addCommand("Primatte", "nuke.createNode(\"Primatte3\")", icon="Primatte.png") 181 m.addCommand("Keylight", 'nuke.createNode("OFXuk.co.thefoundry.keylight.keylight_v201")', icon="Keylight.png") 182 m.addCommand("Ultimatte", "nuke.createNode(\"Ultimatte\")", icon="Ultimatte.png") 183 184 185 # The "Merge" menu 186 m = toolbar.addMenu("Merge", "ToolbarMerge.png") 187 m.addCommand("AddMix", "nuke.createNode(\"AddMix\")", "+a", icon="AddMix.png") 188 m.addCommand("KeyMix", "nuke.createNode(\"Keymix\")", icon="Keymix.png") 189 m.addCommand("ContactSheet", "nuke.createNode(\"ContactSheet\")", icon="ContactSheet.png") 190 m.addCommand("CopyBBox", "nuke.createNode(\"CopyBBox\")", icon="CopyBBox.png") 191 m.addCommand("CopyRectangle", "nuke.createNode(\"CopyRectangle\")", icon="CopyRectangle.png") 192 m.addCommand("Dissolve", "nuke.createNode(\"Dissolve\")", icon="Dissolve.png") 193 m.addCommand("LayerContactSheet", "nuke.createNode(\"LayerContactSheet\")", icon="LayerContactSheet.png") 194 m.addCommand("Merge", "nuke.createNode(\"Merge2\")", "m", icon="Merge.png") 195 m.addCommand("@;&MergeBranch", "nuke.createNode(\"Merge2\")", "+m") 196 n = m.addMenu("Merges", "Merge.png") 197 n.addCommand("Plus", "nuke.createNode(\"Merge2\", \"operation plus name Plus\", False)", icon="MergePlus.png") 198 n.addCommand("Matte", "nuke.createNode(\"Merge2\", \"operation matte name Matte\", False)", icon="MergeMatte.png") 199 n.addCommand("Multiply", "nuke.createNode(\"Merge2\", \"operation multiply name Multiply\", False)", icon="MergeMultiply.png") 200 n.addCommand("In", "nuke.createNode(\"Merge2\", \"operation in name In\", False)", icon="MergeIn.png") 201 n.addCommand("Out", "nuke.createNode(\"Merge2\", \"operation out name Out\", False)", icon="MergeOut.png") 202 n.addCommand("Screen", "nuke.createNode(\"Merge2\", \"operation screen name Scrn\", False)", icon="MergeScreen.png") 203 n.addCommand("Max", "nuke.createNode(\"Merge2\", \"operation max name Max\", False)", icon="MergeMax.png") 204 n.addCommand("Min", "nuke.createNode(\"Merge2\", \"operation min name Min\", False)", icon="MergeMin.png") 205 n.addCommand("Absminus", "nuke.createNode(\"Merge2\", \"operation difference name Difference\", False)", icon="MergeDifference.png") 206 m.addCommand("MergeExpression", "nuke.createNode(\"MergeExpression\")", icon="MergeExpression.png") 207 m.addCommand("Switch", "nuke.createNode(\"Switch\")", icon="Switch.png") 208 m.addCommand("TimeDissolve", "nuke.createNode(\"TimeDissolve\")", icon="TimeDissolve.png") 209 m.addCommand("Premult", "nuke.createNode(\"Premult\")", icon="Premult.png") 210 m.addCommand("Unpremult", "nuke.createNode(\"Unpremult\")", icon="Unpremult.png") 211 m.addCommand("Blend", "nuke.createNode(\"Blend\")", icon="Blend.png") 212 m.addCommand("ZMerge", "nuke.createNode(\"ZMerge\")", icon="ZMerge.png") 213 214 215 # The "Transform" menu 216 m = toolbar.addMenu("Transform", "ToolbarTransform.png") 217 m.addCommand("Transform", "nuke.createNode(\"Transform\")", "t", icon="2D.png") 218 m.addCommand("@;&Transform Branch", "nuke.createNode(\"Transform\")", "+t") 219 m.addCommand("TransformMasked", "nuke.createNode(\"TransformMasked\")", icon="2DMasked.png") 220 m.addCommand("Card3D", "nuke.createNode(\"Card3D\")", icon="3D.png") 221 m.addCommand("AdjustBBox", "nuke.createNode(\"AdjBBox\")", icon="AdjBBox.png") 222 m.addCommand("BlackOutside", "nuke.createNode(\"BlackOutside\")", icon="BlackOutside.png") 223 m.addCommand("CameraShake", "nuke.createNode(\"CameraShake2\")", icon="CameraShake.png") 224 m.addCommand("Crop", "nuke.createNode(\"Crop\")", icon="Crop.png") 225 m.addCommand("CornerPin", "nuke.createNode(\"CornerPin2D\")", icon="CornerPin.png") 226 m.addCommand("SphericalTransform", "nuke.createNode(\"SphericalTransform\")", icon="EnvironMaps.png") 227 m.addCommand("IDistort", "nuke.createNode(\"IDistort\")", icon="IDistort.png") 228 m.addCommand("LensDistortion", "nuke.createNode(\"LensDistortion\")", icon="LensDistort.png") 229 m.addCommand("Mirror", "nuke.createNode(\"Mirror\")", icon="Mirror.png") 230 m.addCommand("Position", "nuke.createNode(\"Position\")", icon="Position.png") 231 m.addCommand("Reformat", "nuke.createNode(\"Reformat\")", icon="Reformat.png") 232 m.addCommand("Reconcile3D", "nuke.createNode(\"Reconcile3D\")", icon="Reconcile3D.png") 233 m.addCommand("PointsTo3D", "nuke.createNode(\"PointsTo3D\")", icon="PointsTo3D.png") 234 m.addCommand("PlanarTracker", "nukescripts.create_planartracker()", icon="planar_tracker.png") 235 m.addCommand("Tracker", "nuke.createNode(\"Tracker4\")", icon="Tracker.png") 236 m.addCommand("TVIScale", "nuke.createNode(\"TVIscale\")", icon="TVIScale.png") 237 m.addCommand("GridWarp", "nuke.createNode(\"GridWarp3\")", icon="GridWarp.png") 238 m.addCommand("SplineWarp", "nuke.createNode(\"SplineWarp3\")", icon="SplineWarp.png") 239 m.addCommand("Stabilize", "nuke.createNode(\"Stabilize2D\")", icon="Stabilize.png") 240 m.addCommand("STMap", "nuke.createNode(\"STMap\")", icon="STMap.png") 241 m.addCommand("Tile", "nuke.createNode(\"Tile\")", icon="Tile.png") 242 243 #m.addCommand("AutoCrop", "nukescripts.autocrop()", icon="AutoCrop.png") 244 245 246 # The "3D" menu 247 m = toolbar.addMenu("3D", "Cube.png") 248 249 m.addCommand("Axis", "nuke.createNode(\"Axis2\")", icon="Axis.png") 250 251 n = m.addMenu("Geometry", "Geometry.png") 252 n.addCommand("Card", "nuke.createNode(\"Card2\")", icon="Card.png") 253 n.addCommand("Cube", "nuke.createNode(\"Cube\")", icon="Cube.png") 254 n.addCommand("Cylinder", "nuke.createNode(\"Cylinder\")", icon="Cylinder.png") 255 n.addCommand("DepthToPoints", "nuke.createNode(\"DepthToPoints\")", icon="DepthToPoints.png") 256 #n.addCommand("Modeler", "nuke.createNode(\"Modeler\")", icon="Modeler.png") 257 n.addCommand("ModelBuilder", "nuke.createNode(\"ModelBuilder\")", icon="Modeler.png") 258 n.addCommand("PointCloudGenerator", "nuke.createNode(\"PointCloudGenerator\")", icon="PointCloudGenerator.png") 259 n.addCommand("PositionToPoints", "nuke.createNode(\"PositionToPoints2\")", icon="PositionToPoints.png") 260 n.addCommand("PoissonMesh", "nuke.createNode(\"PoissonMesh\")", icon="PoissonMesh.png") 261 n.addCommand("Sphere", "nuke.createNode(\"Sphere\")", icon="Sphere.png") 262 n.addCommand("ReadGeo", "nuke.createNode(\"ReadGeo2\")", icon="ReadGeo.png") 263 n.addCommand("WriteGeo", "nuke.createNode(\"WriteGeo\")", icon="WriteGeo.png") 264 265 n = m.addMenu("Lights", "Toolbar3DLights.png") 266 n.addCommand("Light", "nuke.createNode(\"Light2\")", icon="PointLight.png") 267 n.addCommand("Point", "nuke.createNode(\"Light\")", icon="PointLight.png") 268 n.addCommand("Direct", "nuke.createNode(\"DirectLight\")", icon="DirectLight.png") 269 n.addCommand("Spot", "nuke.createNode(\"Spotlight\")", icon="SpotLight.png") 270 n.addCommand("Environment", "nuke.createNode(\"Environment\")", icon="Environment.png") 271 n.addCommand("Relight", "nuke.createNode(\"ReLight\")", icon="ReLight.png") 272 273 n = m.addMenu("Modify", "Modify.png") 274 n.addCommand("TransformGeo", "nuke.createNode(\"TransformGeo\")", icon="Modify.png") 275 n.addCommand("MergeGeo", "nuke.createNode(\"MergeGeo\")", icon="Modify.png") 276 n.addCommand("CrosstalkGeo", "nuke.createNode(\"CrosstalkGeo\")", icon="Modify.png") 277 #n.addCommand("Connect Points", "nuke.createNode(\"ConnectPointsGeo\")", icon="Modify.png") 278 n.addCommand("DisplaceGeo", "nuke.createNode(\"DisplaceGeo\")", icon="Modify.png") 279 n.addCommand("GeoSelect", """nuke.createNode("GeoSelect")""", icon="Modify.png") 280 n.addCommand("LookupGeo", "nuke.createNode(\"LookupGeo\")", icon="Modify.png") 281 n.addCommand("LogGeo", "nuke.createNode(\"LogGeo\")", icon="Modify.png") 282 n.addCommand("Normals", "nuke.createNode(\"Normals\")", icon="Modify.png") 283 n.addCommand("ProceduralNoise", "nuke.createNode(\"ProcGeo\")", icon="Modify.png") 284 n.addCommand("RadialDistort", "nuke.createNode(\"RadialDistort\")", icon="Modify.png") 285 n.addCommand("Trilinear", "nuke.createNode(\"Trilinear\")", icon="Modify.png") 286 n.addCommand("UVProject", "nuke.createNode(\"UVProject\")", icon="Modify.png") 287 #n.addCommand("VectorfieldGeo", "nuke.createNode(\"VectorfieldGeo\")", icon="Modify.png") 288 #n.addCommand("Vectorfield Create", "nuke.createNode(\"VectorfieldCreateGeo\")", icon="Modify.png") 289 n = n.addMenu("RenderMan", "Modify.png") 290 n.addCommand("ModifyRIB", "nuke.createNode(\"ModifyRIB\")", icon="Modify.png") 291 292 n = m.addMenu("Shader", "Shaders.png") 293 n.addCommand("ApplyMaterial", "nuke.createNode(\"ApplyMaterial\")", icon="Shader.png") 294 n.addCommand("BasicMaterial", "nuke.createNode(\"BasicMaterial\")", icon="Shader.png") 295 n.addCommand("FillMat", "nuke.createNode(\"FillMat\")", icon="Shader.png") 296 n.addCommand("MergeMat", "nuke.createNode(\"MergeMat\")", icon="Shader.png") 297 n.addCommand("BlendMat", "nuke.createNode(\"BlendMat\")", icon="Shader.png") 298 n.addCommand("Project3D", "nuke.createNode(\"Project3D\")", icon="Shader.png") 299 n.addCommand("Diffuse", "nuke.createNode(\"Diffuse\")", icon="Shader.png") 300 n.addCommand("Emission", "nuke.createNode(\"Emission\")", icon="Shader.png") 301 n.addCommand("Phong", "nuke.createNode(\"Phong\")", icon="Shader.png") 302 n.addCommand("Specular", "nuke.createNode(\"Specular\")", icon="Shader.png") 303 n.addCommand("Displacement", "nuke.createNode(\"Displacement\")", icon="Shader.png") 304 n.addCommand("UVTile", "nukescripts.createUVTile()", icon="Shader.png") 305 n = n.addMenu("RenderMan", "Shaders.png") 306 n.addCommand("Reflection", "nuke.createNode(\"Reflection\")", icon="Shader.png") 307 n.addCommand("Refraction", "nuke.createNode(\"Refraction\")", icon="Shader.png") 308 309 m.addCommand("Camera", "nuke.createNode(\"Camera2\")", icon="Camera.png") 310 m.addCommand("CameraTracker", "nuke.createNode(\"CameraTracker\")", icon="CameraTracker.png") 311 m.addCommand("DepthGenerator", "nuke.createNode(\"DepthGenerator\")", icon="DepthGenerator.png") 312 m.addCommand("DepthToPosition", "nuke.createNode(\"DepthToPosition\")", icon="DepthToPosition.png") 313 m.addCommand("ProjectionSolver", "nuke.createNode(\"ProjectionSolver\")", icon="Camera.png") 314 m.addCommand("Scene", "nuke.createNode(\"Scene\")", icon="Scene.png") 315 m.addCommand("ScanlineRender", "nuke.createNode(\"ScanlineRender\")", icon="Render.png") 316 317 m = m.addMenu("RenderMan", "Toolbar3D.png") 318 m.addCommand("PrmanRender","nukescripts.createPrmanRender()", icon="Render.png") 319 320 # particles menu 321 m = toolbar.addMenu("Particles", "ToolbarParticles.png") 322 m.addCommand("ParticleEmitter") 323 324 m.addCommand("ParticleBounce") 325 m.addCommand("ParticleCurve") 326 m.addCommand("ParticleDirectionalForce") 327 m.addCommand("ParticleDrag") 328 m.addCommand("ParticleExpression") 329 m.addCommand("ParticleMerge") 330 m.addCommand("ParticleMotionAlign") 331 m.addCommand("ParticleGravity") 332 333 #Disable ParticleLineForce for now as it is not ready for being included in the bundle - Bug 30000 334 # m.addCommand("ParticleLineForce") 335 336 m.addCommand("ParticleLookAt") 337 m.addCommand("ParticlePointForce") 338 m.addCommand("ParticleSpeedLimit") 339 m.addCommand("ParticleSpawn") 340 m.addCommand("ParticleTurbulence") 341 m.addCommand("ParticleVortex") 342 m.addCommand("ParticleWind") 343 344 m.addCommand("ParticleSettings", icon="particle_settings.png") 345 346 m.addCommand("ParticleToGeo") 347 348 # deep menu 349 m = toolbar.addMenu("Deep", "ToolbarDeep.png") 350 m.addCommand("DeepColorCorrect", "nuke.createNode('DeepColorCorrect2')" ) 351 m.addCommand("DeepCrop") 352 m.addCommand("DeepExpression") 353 m.addCommand("DeepFromFrames") 354 m.addCommand("DeepFromImage") 355 m.addCommand("DeepHoldout", "nuke.createNode('DeepHoldout2')" ) 356 m.addCommand("DeepMerge") 357 m.addCommand("DeepRead", '''nukescripts.create_read("DeepRead")''') 358 m.addCommand("DeepRecolor") 359 m.addCommand("DeepReformat") 360 m.addCommand("DeepSample") 361 m.addCommand("DeepToImage") 362 m.addCommand("DeepToPoints") 363 m.addCommand("DeepTransform") 364 m.addCommand("DeepWrite") 365 366 # Views menu 367 m = toolbar.addMenu("Views", "ToolbarViews.png") 368 n = m.addMenu("Stereo", "ToolbarStereo.png") 369 n.addCommand("Anaglyph", "nuke.createNode(\"Anaglyph\")", icon="Anaglyph.png") 370 n.addCommand("MixViews", "nuke.createNode(\"MixViews\")", icon="MixViews.png") 371 n.addCommand("SideBySide", "nuke.createNode(\"SideBySide\")", icon="SideBySide.png") 372 n.addCommand("ReConverge", "nuke.createNode(\"ReConverge\")", icon="ReConverge.png") 373 374 m.addCommand("JoinViews", "nuke.createNode(\"JoinViews\")", icon="JoinViews.png") 375 m.addCommand("OneView", "nuke.createNode(\"OneView\")", icon="OneView.png") 376 m.addCommand("ShuffleViews", "nuke.createNode(\"ShuffleViews\")", icon="ShuffleViews.png") 377 m.addCommand("Split and Join", "nukescripts.create_viewsplitjoin()", icon="SplitAndJoin.png") 378 379 m = toolbar.addMenu("MetaData", "MetaData.png") 380 m.addCommand("ViewMetaData", "nuke.createNode(\"ViewMetaData\")", icon="ViewMetaData.png") 381 m.addCommand("CompareMetaData", "nuke.createNode(\"CompareMetaData\")", icon="CompareMetaData.png") 382 m.addCommand("ModifyMetaData", "nuke.createNode(\"ModifyMetaData\")", icon="ModifyMetaData.png") 383 m.addCommand("CopyMetaData", "nuke.createNode(\"CopyMetaData\")", icon="CopyMetaData.png") 384 m.addCommand("AddTimeCode", "nuke.createNode(\"AddTimeCode\")", icon="AddTimeCode.png") 385 386 import nukescripts.toolsets 387 nukescripts.toolsets.createToolsetsMenu(toolbar) 388 nukescripts.createNodePresetsMenu() 389 390 391 # The "Other" menu 392 m = toolbar.addMenu("Other", "ToolbarOther.png") 393 m.addCommand("AudioRead", "nuke.createNode(\"AudioRead\")", icon="Read.png") 394 m.addCommand("Assert", "nuke.createNode(\"Assert\")", icon="Assert.png") 395 m.addCommand("Backdrop", "nukescripts.autoBackdrop()", icon="Backdrop.png") 396 m.addCommand("DiskCache", "nuke.createNode(\"DiskCache\")", ".", icon="DiskCache.png") 397 m.addCommand("Dot", "nuke.createNode(\"Dot\", inpanel=False)", ".", icon="Dot.png") 398 m.addCommand("Input", "nuke.createNode(\"Input\")", icon="Input.png") 399 m.addCommand("Output", "nuke.createNode(\"Output\")", icon="Output.png") 400 m.addCommand("NoOp", "nuke.createNode(\"NoOp\")", icon="NoOp.png") 401 m.addCommand("PostageStamp", "nuke.createNode(\"PostageStamp\")", icon="PostageStamp.png") 402 m.addCommand("Group", "nuke.collapseToGroup()", icon="Group.png") 403 m.addCommand("Precomp", "nukescripts.precomp_selected()","^+p", icon="Precomp.png") 404 405 m.addCommand("StickyNote", "nukescripts.toolbar_sticky_note()", "#n", icon="StickyNote.png") 406 n = m.addMenu("All plugins", "AllPlugins.png") 407 n.addCommand("Update", "nukescripts.update_plugin_menu(\"All plugins\")") 408 409 # The OFX plugins menus 410 nuke.ofxMenu("") 411 412 # Have to remove some of the furnace core nodes that get added automatically in nuke.ofxMenu() 413 m = toolbar.menu("FurnaceCore") 414 if (m != None): 415 m.removeItem("F_DeGrain") 416 m.removeItem("F_DeNoise") 417 m.removeItem("F_Kronos") 418 m.removeItem("F_MotionBlur") 419 m.removeItem("F_VectorGenerator") 420 421 m = toolbar.menu( 'Filter' ) 422 if m != None: 423 m.addCommand("Denoise", "nuke.createNode(\"Denoise2\")", icon="denoise.png") 424 425 m = None 426 n = None427 428 433 438 439 440 # Some helper functions that we can call from the toolbar items. 441443 t = nuke.createNode("TimeWarp") 444 a = nuke.value(t.name()+".first_frame") 445 e = nuke.value(t.name()+".last_frame") 446 if float(e)<=float(a): 447 a = nuke.value("root.first_frame") 448 e = nuke.value("root.last_frame") 449 cmd = "{curve C x"+a+" "+a+" x"+e+" "+e+"}" 450 t.knob("lookup").fromScript(cmd)451 452454 p = nuke.Panel("Enter desired matrix size:") 455 p.addSingleLineInput("width", 3) 456 p.addSingleLineInput("height", 3) 457 ret = p.show() 458 if ret == 1: 459 wdt = p.value("width") 460 hgt = p.value("height") 461 a = " { "+" 0 "*int(wdt)+" } " 462 a = "{ " + a*int(hgt) + " }" 463 nuke.createNode("Matrix", "matrix "+a)464 465467 sticky = nuke.createNode("StickyNote") 468 sticky.knob("label").setValue("type note here") 469 sticky.knob("selected").setValue(False)470472 try: 473 nuke.createNode( "PrmanRender" ) 474 except: 475 msg = "Could not create PrmanRender node.\n\nThis is usually because the library search path environment variable is not set correctly so Nuke can't link with the prman libraries.\n" 476 if not os.environ.has_key('RMANTREE'): 477 msg = msg + "\nAlso, the RMANTREE environment variable is not set.\n" 478 479 if nuke.env['MACOS']: 480 msg = msg + "\nIf you are launching Nuke from an icon on Mac OSX you may need to add environment variable settings to your environment plist file (~/.MacOSX/environment.plist).\n" 481 msg = msg + "\nCheck your Pixar Photorealistic Renderman documentation section \"RenderMan Pro Server > Administration > Installation\" for platform-specific installation instructions." 482 483 nuke.message( msg )484486 uvtile_node = nuke.createNode("UVTile2") 487 n = uvtile_node.input(0) 488 489 if n != None and n.Class() == 'Read': 490 filename = n['file'].getValue() 491 udim = nukescripts.parseUdimFile(filename) 492 if udim != None: 493 uvtile_node['udim_enable'].setValue(True) 494 uvtile_node['udim'].setValue(udim)495497 498 rotoNode = nuke.createNode("Roto", "output {rgba.alpha none none mask_planartrack.a}", False) 499 rotoLayerId = 1 500 rotoLayerName = "PlanarTrackLayer"+str(rotoLayerId) 501 502 highestId = 0 503 planarTrackerNodes = nuke.allNodes("PlanarTracker") + nuke.allNodes("PlanarTracker1_0") 504 for p in planarTrackerNodes: 505 rotoTrackLayer = p["rotoTrackLayer"].getText() 506 rotoTrackLayerSplit = rotoTrackLayer.split('.') 507 if len(rotoTrackLayerSplit) == 3: 508 try: 509 highestId = max(int(rotoTrackLayerSplit[1]), highestId) 510 except: 511 pass 512 rotoLayerId = highestId + 1 513 514 rotoTrackLayer = rotoNode.name() + "." + str(rotoLayerId) + "." + rotoLayerName 515 516 rotoCurves = rotoNode["curves"] 517 rotoCurveRoot = rotoCurves.rootLayer 518 planarLayer = nuke.rotopaint.Layer(rotoCurves) 519 rotoCurveRoot.append(planarLayer) 520 atr = planarLayer.getAttributes() 521 planarLayer.name = rotoLayerName 522 planarLayer.getAttributes().set(nuke.rotopaint.AnimAttributes.kPlanarTrackLayerAttribute,rotoLayerId) 523 524 rotoNode.showControlPanel() 525 planarLayer.setFlag(nuke.rotopaint.FlagType.eSelectedFlag, 1) 526 rotoCurves.changed() 527 528 planarTrackerNode = nuke.createNode("PlanarTracker", "rotoTrackLayer "+rotoTrackLayer + " ignoreMaskId " + str(rotoLayerId) + " label " + rotoLayerName, False) 529 planarTrackerNode.setXYpos( rotoNode.xpos() + 120, rotoNode.ypos() ) 530 531 if rotoNode.inputs() > 0: 532 aViewer = nuke.activeViewer() 533 vIndex = None 534 if aViewer != None: 535 vIndex = aViewer.activeInput() 536 if vIndex == None: 537 vIndex = 0 538 nuke.connectViewer(vIndex, rotoNode)539
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Nov 23 08:52:28 2012 | http://epydoc.sourceforge.net |