3dcheapskate opened this issue on Mar 22, 2012 · 3 posts
3dcheapskate posted Fri, 23 March 2012 at 12:03 PM
Thanks. The 'PropGoto' script I'm doing is for the Renderosity Freestuff, so a CR2 edit isn't an option.
But as luck would have it I actually want to treat V4, A4, etc as one item (the hand position of the zeroed V4 and the V4 hand pose I've created work just as well for A4 and She-Freak 4. Same goes for M4, H4, etc). So using the geometry file name seems a good option for my particular purposes.
Having just started writing Python and DAZ Scripts, I think trying to understand tkinter (or wxPython) as well would probably be a step too far at the present time.
So a quick rethink with the AskMenu() - adding a YesNo() if a match is found prevents the need for an askmenu() provided the match is accurate. And if the match is bad (or no match is found) then checking to ensure the user actually makes a valid selection from the AskMenu() should do it.
# Ask user to select/confirm figure
if iMatch == -1:
* # If no match was found then user must select a figure from the dropdown or cancel*
action = ""
while action == "":
action = poser.DialogSimple.AskMenu("Select Figure","Figure: "+fig.Name()+"nUnable to match figure.nPlease select match from list:",optlist)
else:
# If a match was found simply display the match and ask user to confirm it
yn = poser.DialogSimple.YesNo("Figure: "+fig.Name()+"nMatch: "+optlist[iMatch]+"nYes to confirm, No to select match manually")
# If user confirms, then use the match
if yn:
action = optlist[iMatch]
# if user refuses the match then they must select a figure from the dropdown or cancel
else:
action = ""
while action == "":
action = poser.DialogSimple.AskMenu("Select Figure","Figure: "+fig.Name()+"nPlease select match from list:",optlist)
(Note: selecting the default "None" in the AskMenu() and clicking OK returns an empty string, whereas clicking Cancel returns the NoneType)
I think that ought to do it - except that AskMenu() only seems to allow a 16 character message!
The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.
*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).