Forum: Poser - OFFICIAL


Subject: Morph Cleanup Script

Cage opened this issue on Feb 24, 2010 · 592 posts


Cage posted Mon, 22 March 2010 at 2:11 PM

Quote - ...can you tell me what you mean by "...if you add dummy entries into any empty slots in the vpolys list before calling the function" ?  Why would there be empty slots?

[snip]
                pgons = psrPolygonList(self.geom)
                pnorms = PolyFaceNormals(pgons,verts)
                vpolys = VertexPolys(pgons,self.mesh.NumVertices())
                if vpolys.count([]):
                    app.status_update("Stray Vertex Found.")                   
                    for vi in range(self.mesh.NumVertices()):
                        if not vpolys[vi]:                           
                            vpolys[vi].append(0)
                self.vnorms = PolyVertexNormals(pnorms,vpolys)
[/snip]

The above is from the current Comparison script, in the setup for the .pyd version of the normals test.  I'm not sure PolyVertexNormals() has the same crash bug, but I put in the protection, just in case.

For more on my understanding of the problem, check the myMesh class in the smoother script, which is on the "Additional Python Scripts" page linked at the bottom of the TDMT site.

===========================sigline======================================================

Cage can be an opinionated jerk who posts without thinking.  He apologizes for this.  He's honestly not trying to be a turkeyhead.

Cage had some freebies, compatible with Poser 11 and below.  His Python scripts were saved at archive.org, along with the rest of the Morphography site, where they were hosted.