Pardon the late reply and my slow progress in my code. 
I had wanted to update and insert my latest code but have forgotten about 
it. I chanced upon this code which is similar to what I had wanted but 
still I am having trouble getting my program to 'wait' for user selection 
before executing the rest of the program..

def printObject(objectList, *args):
    objectName = cmds.optionMenu(objectList, query = True, value = True)
    print objectName

def showUI():
    ...
    ...
    validFormatsLs = cmds.optionMenu (label = 'Select a format')
    cmds.button(label = "Print selected option", command = 
partial(printObject, objectList))


And as for the last question on getting the latest created node...
Currently in my program, there is a custom module which is something as 
follows: *import createCam; createCam.newNode()*
Having that command does create a new node (this command is different from 
cmds.camera()), however after its creation, it does not select the new node
and hence, I am hardcoding it in my current code which is not ideal case, 
in the event if it is either selecting the wrong cam which has already 
existed with the same name, or it will simply duplicate a new camera where 
the naming could 'versioned up' - eg. newCam1, newCam2 etc 

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f3eab61e-28ca-4fca-bb36-da2125da547f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to