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
04 Jul 2016
367

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:

  1. Open Lines.cpp from the plugin folder.
  2. On Line2, change the upper_limit number to the number you require.
  3. 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)
  4. 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;)
  5. Save the script and restart Nuke.
  6. Place a BlinkScript node, select 'Specify Output format' under the 'Kernel Parameters' tab.
  7. Under the 'Blink Script' tab, press the folder icon and navigate to the Lines.cpp script and press 'Load'.
  8. Under the 'Kernel Parameters' tab, press the 'Publish' button. This will create a new 'Lines' node.
  9. 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.

 

LineDrawer

 

 

Please login in order to download these files.

Comments   

 
# Mads Hagbarth Damsbo 2016-07-03 12:12
Great stuff!
 
 
# dfsfs klj 2018-06-04 09:30
Really nice plugin! But I have problem with the Lines_Callbacks.

When adding or removing point I get:
name 'Lines_Callback s' is not defined

How can I fix this?
 

You have no rights to post comments

We have 1983 guests and 39 members online