I’d like to reference the Maya session variable object from the external class object being called from the newly created panel, created after the session variable object is defined, without passing any arguments into the external class being called from the panel.
You don’t want to use option var but you want essentially a constant defined in the viewport that is hard coded into your class. Either make it an optionVar or pass it into your class. Whats to stop anything from overriding that variable?
Make a class method on job manager have tank and widget inherit from it or instantiate its bound instance as a property. As it seems an important variable make it an optionVar and test for it.
def set_project_folder(cls, folder=None):
if not folder:
# test if the optionVar is valid.
folder = "OptionVar"
cls._folder = folder
self._job_manager = JobManager()
w = Widget()
b = Bob()
Don’t create global variables - they have a pesky ability of breaking other important globals. Instead make them a class or bounded instance variable and reference them through an inheritance paradigm or compositional one.