We couldn't find any threads matching the specified search criteria.
1 comments found!
Would something like this be what you are looking for? Call SelectActorsFromFigure() and this will give you a selected actor name. Then call GetActorFromFigure() with the same figure object and the name that was returned and you should have a reference to your actor object. Of course you'll want to check that an actor has been selected and the user didn't cancel, but this works for me without having to create any custom dialogs.
def GetActorsForFigure(figure):
actorList = figure.Actors()
return actorList
def GetActorNamesForFigure(figure):
actorList = GetActorsForFigure(figure)
actorNameList = []
for actor in actorList:
actorNameList.append(actor.Name())
return actorNameList
def SelectActorFromFigure(figure):
names = GetActorNamesForFigure(figure)
choice = AskMenu(title="Select Actor", message="Please Select an Actor", options=names)
return choice
def GetActorFromFigure(fig,actorName):
return fig.Actor(actorName)
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.
Thread: Looking for an actor selector... | Forum: Poser Python Scripting