I got a couple of QPushButton(s) in which their text are changeable as user 
clicks on it. And also,
a couple of QLineEdits that specify the minimum and maximum values for 
scaling.

So when user clicks on the 'Create' button, it will takes in these texts as 
part of the information,
and creates the nodes while applying the information onto the new nodes.

Eg. 

# The default button/ text to be shown will be Sphere
self.geo_btn = QtGui.QPushButton('Sphere')
self.cmd_btn = QtGui.QPushButton('Duplicate')
self.scale_x = QtGui.QCheckBox('Scale')
# If self.scale_x is checked, min_x and max_x will be used
# Else, it will be ignored
self.min_x = QtGui.QLineEdit('1.0')
self.max_x = QtGui.QLineEdit('1.0')

def which_geo(self):
 # Default text is Sphere
 # Switch to Cube if button is hit, and vice verse
    if self.geo_btn.text() == 'Sphere':
        self.geo_btn.setText('Cube')
    else:
        self.geo_btn.setText('Sphere')

def which_cmd(self):
  if self.cmd_btn.text() == 'Duplicate':
    self.cmd_btn.setText('Instance')
    else:
    self.cmd_btn.setText('Duplicate')

def create_node(self):
 # How do I write my function here?



Suppose if the push buttons are 'Cube' and 'Duplicate', and I checked 
scale_x withthe min value being 1.0
while max value is 2.0, how should I write in `create_node()`?
Should I store such variables as a dictionary or some sort so that it will 
be easier for me to call and use
the values?

I am not sure what is the best way for me to call such values.. 
FYI, I have quite some widgets in my ui in which I need them for my new 
node creations

-- 
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/cf106490-d8d7-41c2-82fd-a8312e36cbb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to