Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
The set of all material names is pretty unique to Daz Mil4.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)
True. Have a check on 2_SkinTorso.
Looked at two different scripts and both used two different methods. One was troubling because it created a figureList which also picked the first character that matched "2_SkinTorso". So if you had V4 and SP4 in the scene and tried to apply the script to SP4 it was a no go if they were in the scene after V4. Same applied to 2 V4's. Like the script was designed for there never to be more then one figure in the scene. Which then lead me to look in another script that looked for the various blmilwom_v4 object files.
Guess I should revert to keep it simple stupid, instead of trying to be overly complex for no apparent reason.
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"
My test scene had 2 V4's and 1 SP4 in it and using f = poser.Scene().CurrentFigure() to start my figure check and then test the material zones allows me to apply a second skin IE: BB's nylons textures with a pantyhose displacement map I created etc to any valid fgure (hip, leg and foot) in the scene that is selected.
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"
I would use this method:-
import poser
import os
scene = poser.Scene()
for fig in scene.Figures():
geomFile = os.path.split(fig.GeomFileName())[1]
if geomFile == "blMilMan_m4b.obj":
print "%s based on %s IS an M4 figure" % (fig.Name(),geomFile)
else:
print "%s based on %s IS NOT an M4 figure" % (fig.Name(),geomFile)
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.
Not at my python computer so might have this backwards. You can check by internal name which I believe returns just figure1, etc. Or by external name ala V4.2, but the user can change that (which I have myself done). Plus if you add more then one figure of the same name it adds the 1 etc on the end of the figure name.
So is the best way to check the object file to make sure the character you are about to run a script on belongs to V4 (A4, G4, SP4) or is there another sure-fire way that everybody uses? Have a script I am studying that uses the object file method, which I have yet to try. But everything else I have dreamed up based on trying to use figure names has failed so far.
TIA
Gary
"Those who lose themselves in a passion lose less than those who lose their passion"