LineDrawer v1.1
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Matthew Shaw
Draws lines that can be dashed, animated and customised.
Requirements:
9.0 or later
Windows
9.0 or later
Windows
04 Jul 2016
895
Simple line drawing utility. Can draw straight or adjustable dashed lines, can be animated to draw / move. Uses python callbacks to keep the interface tidy, simply click a button to add, insert or remove a point.
Updated to fix a couple of bugs:
- A dashed line with only two points will no longer draw over itself.
- Fixed the Insert / Delete buttons not correctly handling animated points.
- Time no longer draws anything at 0 value.
To install, unzip the folder into your plugins folder and add it's path in your init.py, eg:
1 |
nuke.pluginAddPath('./plugins/LineDrawer') |
The tool is currently limited to 16 points but can be easily increased as follows:
- Open Lines.cpp from the plugin folder.
- On Line2, change the upper_limit number to the number you require.
- On Line 40, duplicate the above line, increasing the number of the pt until you are one less than your the upper_limit you set in step 2 (eg, pt24 for 25 points)
- On Line 89 (This will have increased by the number of lines you added in step 3), duplicate the above line, this time incrementing both numbers (eg, points[24] = pt24;)
- Save the script and restart Nuke.
- Place a BlinkScript node, select 'Specify Output format' under the 'Kernel Parameters' tab.
- Under the 'Blink Script' tab, press the folder icon and navigate to the Lines.cpp script and press 'Load'.
- Under the 'Kernel Parameters' tab, press the 'Publish' button. This will create a new 'Lines' node.
- Select the new 'Lines' node, and in a script editor, enter and run the following:
|
node = nuke.toNode('Lines')
Lines_Callbacks.initialiseNode(node)
|
This is a helper function which will automaticallly add the python callbacks and their buttons, as well as tidy up the interface. You can export the gizmo as normal from here.
Please login in order to download these files.
Comments
When adding or removing point I get:
name 'Lines_Callback s' is not defined
How can I fix this?
Just change all instances of 'xrange' to 'range'.
RSS feed for comments to this post