Hi all, sorry for this noob question but I came to realize that in some of the codings that I have did, I am exceeding the use of the ls command.
In this current code of mine, I have been using cmds.ls(sl=True) in almost all of my 6 functions out of the 9 functions that I writtin in my class function.
Was wondering if there are any better ways that I can reduce the need to do so?
I tried making it “global” by defining it right before my class, but there are some consequences in which if I did not select anything before the code is executed, it is deeming my selection is empty.
selection = cmds.ls(sl=True)
class mainWindow(QDialog):
...
...