Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
The Python trick your looking for to get things on the same line, is to have a "," at the end of the print statement.
Assuming you've managed to get to the point where you have a Geometry object (if not just say so), you want something like this :-
verts = geom.Vertices()<br></br>sets = geom.Sets()<br></br>polys = geom.Polygons()<br></br>for poly in polys:<br></br> start = poly.Start()<br></br> numv = poly.NumVertices()<br></br> if numv == 3:<br></br> print "TRI",<br></br> elif numv == 4:<br></br> print "QUAD",<br></br> else:<br></br> print "HELP",<br></br> for idx in range(start, start + numv):<br></br> vert = verts[sets[idx]]<br></br> print vert.X(), vert.Y(), vert.Z(),
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
Attached Link: http://rise.sourceforge.net/cgi-bin/makepage.cgi?Home
I need help in writing a script to export Rise. What I am trying to do is write out the geometry of a model in Poser to the Rise format.http://rise.sourceforge.net/
The Rise format starts with the letters "TRI" if the geometry is a triangle and "QUAD" if the geometry is a square.
The problem I am have is more of a Python question where I can print out a line at a time for each of the X,Y,Z coordinates. What I want to do is print them all out on one line.
Any help would be appreciated.
My main goal is to get a Poser character into Rise and find out if texturing works. If not textured, find out if I can use the techniques of Henrik Jensen's photonmap to add more realism to a character.
Thanks,
Sam