Forum: Poser Python Scripting


Subject: Adding function to poser.Scene()

semidieu opened this issue on Apr 22, 2011 · 8 posts


semidieu posted Fri, 22 April 2011 at 4:19 AM

Is there a way to add a function to poser.Scene() ?

For example, I would like to create a function/method that returns the currently selected object (prop or figure).

So, I create a function:

 

def CurrentSelection():

_____obj = poser.Scene().CurrentActor()

_____if obj.IsBodyPart():

__________obj = poser.Scene().CurrentFigure()

_____return obj

 

 

Now, I would like to use it like this:

poser.Scene().CurrentSelection()

 

Is this possible ?