Sun, Feb 16, 10:23 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Duplicate figure


ironsoul ( ) posted Fri, 02 June 2017 at 12:57 AM · edited Sat, 08 February 2025 at 6:49 PM

Hi Is there a way to duplicate an existing figure + child objects in a scene using the Python API, I can only see delete figure in the documentation.



structure ( ) posted Fri, 02 June 2017 at 2:54 AM · edited Fri, 02 June 2017 at 3:06 AM
Forum Coordinator

try this

# -*- coding: utf-8 -*- 

import poser

scene = poser.Scene()
figure = scene.CurrentFigure()
scene.SelectFigure( scene.Figure( figure.Name() ) ) 
if figure:
    poser.ProcessCommand( 1568 )

Locked Out


bagginsbill ( ) posted Fri, 02 June 2017 at 5:58 AM

Heheh. You have a little bit of extra, unnecessary code there. The expression

scene.Figure( figure.Name() )

is just going to give you back what you already have in figure, which is the currently selected figure.

As well, doing

scene.SelectFigure( scene.Figure( figure.Name() ) )

is just selecting the figure that is already selected.

That whole line doesn't do anything at all.


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)


ironsoul ( ) posted Fri, 02 June 2017 at 11:51 AM

Structure posted at 5:51PM Fri, 02 June 2017 - #4306486

try this

# -*- coding: utf-8 -*- 

import poser

scene = poser.Scene()
figure = scene.CurrentFigure()
scene.SelectFigure( scene.Figure( figure.Name() ) ) 
if figure:
  poser.ProcessCommand( 1568 )

Perfect, thank you.



structure ( ) posted Sat, 03 June 2017 at 2:50 AM
Forum Coordinator

bagginsbill posted at 8:49AM Sat, 03 June 2017 - #4306493

Heheh. You have a little bit of extra, unnecessary code there. The expression

scene.Figure( figure.Name() )

is just going to give you back what you already have in figure, which is the currently selected figure.

As well, doing

scene.SelectFigure( scene.Figure( figure.Name() ) )

is just selecting the figure that is already selected.

That whole line doesn't do anything at all.

Thanks Ted.

ironsoul posted at 8:49AM Sat, 03 June 2017 - #4306525

Structure posted at 5:51PM Fri, 02 June 2017 - #4306486

try this

# -*- coding: utf-8 -*- 

import poser

scene = poser.Scene()
figure = scene.CurrentFigure()
scene.SelectFigure( scene.Figure( figure.Name() ) ) 
if figure:
    poser.ProcessCommand( 1568 )

Perfect, thank you.

You're Welcome.

Locked Out


Privacy Notice

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.