this i think may not be possible, but wanted to check whether anyone knew anyhing:
so basically imagine you have a human (polygon) character and you select a vert on one of the legs. I want to know if it is possible to write a script which, given a specific vector, can analyse the (contiguous) cross section of the surface at that point.
Then to have locators created at regular intervals around that perimeter cross section.
hope this makes some sort of sense. Im working in python, but guess this would be an api sort of job.
Any general hints would be great,
thanks,
Sam
will investigate, thanks,
Sam
so basically imagine you have a human (polygon) character and you select a vert on one of the legs. I want to know if it is possible to write a script which, given a specific vector, can analyse the (contiguous) cross section of the surface at that point.
With a little trickery, you can. :)
Works with polygonal surfaces of any complexity and should compute relatively quickly, given you don’t need too many locators (1000+).
Step 3-7 can be further optimised if you instead utilise the nearestPointOnCurve node to lookup the position along the curve and create the locators by hand. That should give you near-real-time performance. As a next step, you could potentially start looking at utilising the Cut Faces manipulator to run your script interactively.
Good luck!
Best,
Marcus
Sam
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/38699b06-edbf-448f-838d-c5ff8f8e7ea4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
deg = 360.0 / sides # how many rays you want
y = 0.0 #replace with the y position of the source pos
r = 1.0 #radius
for j in xrange(sides):
angle = deg * j / 180.0 * M_PI
x = math.cos( angle ) * r
z = math.sin( angle ) * r
pnt = OpenMaya.MPoint( x, y, z ) #add this to an MPointArraywow thankyou Janos, very useful. Yep im learning about rotation matrixes right now.
Sam;)
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/2ebbaa13-2f16-4bb7-ba58-283e4283393a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sam