Overwrite Variable From Another Class In Another File In Python
I'm trying to update my UI via a variable in another python file. Both are in there own class. Both saved in a folder called: System. As I don't want to re-execute UI, I can't simp
Solution 1:
The right way to do this afaict would be to create an object of the toolsUI
type, and then operate on that instead.
import System
classmaintenance:
def__init__(self):
changeLabel = "Label is Changed"
self.ui = System.toolsUI() # create a new object
self.changeLabelColumn(changeLabel)
defchangeLabelColumn(self, changeLabel):
cmds.frameLayout(
self.ui.UIElements["frameLayout"], # use the object instead
edit=True,
label=changeLabel)
this way you can have multiple toolsUI
objects that don't interfere with each other.
Post a Comment for "Overwrite Variable From Another Class In Another File In Python"