I coded this up in pymel and used qt designer for the GUI in maya. This GUI sets up the normals on curves for rendering in renderman / 3delight – and is used in conjunction with primitive variables on each curve and a curve shader.
A regular curve that hasn’t been processed will have its normals face in the direction of the viewer (1) – and as you can see it just looks “wonky”. With this technique the ‘Face Camera’ of the normals are disabled and they can be set to all face the direction selected.
GUI enables per item or selection
2 set direction
5 Animation of Curve based on curve length proportion or custom set. Start and end frames
can also be set.
6 Width for start and end can be adjusted
import pymel.core as pm
pm.connectAttr ("curveRamp_place2dTexture.outUV", "curveRamp.uv");
pm.connectAttr( "curveRamp_place2dTexture.outUvFilterSize", "curveRamp.uvFilterSize");
pm.disconnectAttr ("curveRamp_place2dTexture.outUV", "curveRamp.uvCoord");
dialog2 = pm.loadUI(f="C:/Users/luke/Documents/QTDESIGNER/rebuild_curve.ui")
allowedAreas = ['right', 'left']