Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)
import poser
poser.Scene().SelectActor(pillar3) #-- Selects an Actor, then ...
poser.ProcessCommand(1568) #-- 1568 is the menu code for duplicating an object. ProcessCommand, this function executes a menu command
For a figure use poser.Scene().SelectFigure(...)
Whereby the use of menucodes is such a thing. There is always the possibility that these can be changed. I have not experienced it yet, but the possibility exists.
You can find the codes in "Poser Software\Poser 13\Runtime\ui\Poseer.xrc"
Have a nice Sunday
Hmm. Trying to select the actor fails with:
Traceback (most recent call last):
File "C:\Program Files\Poser Software\Poser 13\Runtime\Python\poserScripts\My Light Scripts\LayoutColumns.py", line 5, in <module>
actor = poser.Scene().SelectActor("pillar3")
poser.error: Error parsing SetCurrentActor()
Usage: <NoneType> SetCurrentActor(<ActorType> actor)
Could it be that I've built my prop badly? It consists of multiple pipe sections and a couple of toruses.
You must not use the name "Pillar3", you must use the real object.
import poser
realpillar3object = poser.Scene().ActorByInternalName("Pillar3internname")
#-- the string Pillar3internname is only an example, you have to replace
#-- it with the real internalname.
#-- The method ActorByInternalName returns
#-- the real object.
poser.Scene().SelectActor(realpillar3object)
poser.ProcessCommand(1568)
You can find the internal name in the propertie panel:
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.
Sorry for the newbie question, but I only recently started playing with Python under Poser and I get stuck a lot.
I have an actor, a greek-like column called pillar3. I can find it in script just fine. I want to duplicate it in script and add the duplicate to the current scene. Part of trying to create and lay out a matrix of columns. All I've been able to find are suggestions to use copy, as in newActor = copy("pillar3") or a variant using copy.deepcopy, but copy isn't recognized so I'm doing it all wrong.
Could someone tell me how to do this?