thanks for the help Alan, I do need to get more into Python, this script
makes it look soo simple :)
On 10-01-2013 20:25, Alan Fregtman wrote:
On Thu, Jan 10, 2013 at 2:18 PM, Nuno Conceicao
<nunoalexconcei...@gmail.com <mailto:nunoalexconcei...@gmail.com>> wrote:
1. The object to cluster constraint doesn't seem to constrain to
polys, only points, am i missing any option here or I need to
constrain to a point then offset it manually?
2. I have 140 braids and each poly-stripe has 8 polygons,
obviously the way to go here is using scripting, just wondering if
you have or know a plugin or script to do this process of creating
a null for each poly
1. Yes it does. Try it! Select a face, make a cluster, make a null,
Constrain->Object to Cluster and pick the cluster in the Explorer. It
works!
2. Python is your friend:
from win32com.clientimport constants as c
Application.OpenUndo('Nullify faces on selected meshes')
for objin Application.Selection:
geo= obj.ActivePrimitive.Geometry
for idxin range(geo.Facets.Count):
newCls= geo.AddCluster(c.siPolygonCluster, "face_%s" % idx, idx)
newNull= obj.AddNull('%s_faceNull_%s' % (obj.name, idx))
newNull.Parameters("primary_icon").Value= 8
newCns= newNull.Kinematics.AddConstraint("ObjectToCluster", newCls)
newCns.Parameters("tangent").Value= True
newCns.Parameters("upvct_active").Value= True
Application.CloseUndo()
The above code will make a series of nulls, one per face,
clsconstrained per poly, as children of the original mesh object.