Forum: Poser - OFFICIAL


Subject: The LuxPose Project - Alpha Stage

Khai-J-Bach opened this issue on Aug 27, 2010 · 1684 posts


odf posted Sat, 28 August 2010 at 12:01 AM Online Now!

Quote - odf: to solve my problem, it was sufficient to adjust your code like that (the other code from the other thread wasn't really necessary): nr_tpolys = sum([len(actor.Geometry().TexPolygons()) for actor in actors if actor.Geometry().TexPolygons()])

This prop just returns 'None' for TexPolygons() (and 0 for the NumTex... methods).

D'uh! I should have been using NumPolygons() and NumTexPolygons() all along.

But actually, this issue is a bit more complicated than it may look. If some actors in a figure have UVs and others don't, I can either throw away the UVs for the whole figure, or else I have to make sure that the texture polygons are still in correct correspondence with the regular ones. Apparently broken or partially missing UVs crop up every once in a while, so it would be good if I came up with a strategy for dealing with them and tested that properly. I guess the lesson here is to use the Num.. methods Poser provides rather than len().

-- I'm not mad at you, just Westphalian.