Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)
Hi!
Try this:
actors = poser.Scene().CurrentFigure().Actors()
loop through the actors and get the first one which is a body part with the "IsBodyPart" method
the internal name of the actor should be PartName:FigureNumber
so you should be able to extract the figure number after the colon
hope that helps
martin
That's a great idea! I was not aware that the number was addended to the internal body part names like that. I'll try it. Thank you!
===========================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.
There's a complication with the suggested approach. I can't make any comparative statements to determine what number is addended to a body part, because PoserPython returns values in computerese. :) It's internal way or thining about things doesn't seem to resemble any of the ways it annotates those thoughts. (Kind of reminds me of myself, that way....)
So, fool that I am, I'm stuck. Now I need to ask if there is a way to convert this list of Actor objects to a list of body parts that can be read. I assume that's some kind of value to string conversion, but I'm not sure these listed parts count as integer values, so I have no idea how to approach the matter....
Am I missing an obvious approach?
Code:
#Find internal figure number----(Thanks, mkrueger!)---------------------------
actors = poser.Scene().CurrentFigure().Actors()
print actors
Result:
[, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ] Well, the list doesn't show up in the post, so I'm addending a text file to the next response....
Message edited on: 10/28/2005 14:56
===========================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.
===========================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.
D'Oh! I just spent all afternoon creating a "counter" method which would keep track of the figure numbers for me. It looks like this will be much simpler. Life's kind of a bummer when you're always just smart enough to keep doing things the hard way.... :) Thank you! Hopefully I'll fare better with this example than I did with the last one. Underestimating me is overestimating me, it seems. :)
===========================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.
"Addend" is not a verb. Thank you to an anonymous guardian of the whaddaycall vocabu-mo-lary. Note to others: Don't be like me!
===========================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.
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.
I'm trying to develop a method to correctly apply JCM pointer poses using Python. This requires that I be able to determine the internal figure number for the parent/target figure. But PoserPython doesn't seem to have any tool to query the figure numbers. I thought I could work around it by assigning a new figure name, but I can't seem to locate anything that will do that, either.... Does anyone know any secret methods or tricky workarounds that might help me with this? I need to find the internal figure number, by which I mean the numbering applied internally to figures in the order in which they load in Poser. example: Figure 1 BODY:1
===========================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.