nanaxdavid.blogg.se

Maya python ls ignore namespace
Maya python ls ignore namespace














Print 'Charcter Version : %s' % characterVersionįileIteration = filename.split(fileExt).split("_")įilenameList = filename.split(fileExt).Go to: Synopsis. If "pl_" or "mob_" or "bs_" in characterVersion: Print 'Character is : %s' % characterFolderĬharacterVersion = fileloc.split("/") fbx export filename : file extension : maįilename=os.path.basename(pm.system.sceneName())įileExt=os.path.splitext(pm.system.sceneName())įileloc=os.path.dirname(pm.system.sceneName()) filepath : D://Unnamed/scenes/pl_dod/01_original import maya.cmds as cmdsĬmds.confirmDialog(title='Selection Error',message='\n'+'You should select something',button = 'Ok',messageAlign='left',icon = 'warning')Ĭmds.confirmDialog(title='Selection Error',message='\n'+'You should select one thing',button = 'Ok',messageAlign='left',icon = 'warning')Įg for character file D://Unnamed/scenes/pl_dod/01_original/pl_dod01_original_flinch_02.ma So we can copy the result of the playblasts / FBX files into multiple locations.

maya python ls ignore namespace

The only issue is, I want my UI to pass a string to my "Redeye_FBXBaker" function. Basically It will bake the animation ready to use for Unity. Pm.textField(self.unityPath,edit = True, text = str(pathholder))Īnd the next snip is my animation bake code. Pathholder = pm.fileDialog2(caption = "Unity Character Directory", dialogStyle=2, fileMode = 2, okCaption = "Select") Pm.textField(rverPath,edit = True, text = str(pathholder)) Pathholder = pm.fileDialog2(caption = "Character Directory", dialogStyle=2, fileMode = 2, okCaption = "Select") Pm.button(parent=self.rowco25, label = "AnimBake", command=pm.Callback(self.animBakeFn)) Self.gmoviesBrowse = pm.button(parent=self.rowco25, height = 20,label = ".", command=pm.Callback(self.browseUnityFn)) Self.gmoviesPath = pm.textField(parent = self.rowco25,width = 240,text = 'D:/GoogleDrive/Character Anim Movies/Milestone 1') Self.gmoviesChkbox = pm.checkBox(parent=self.rowco25,height = 25,label = 'GDrive Movies', value = True) Pm.text(label=' Local Unity Char folder') Self.unityBrowse = pm.button(parent=self.rowco25, height = 20,label = ".", command=pm.Callback(self.browseUnityFn)) Self.unityPath = pm.textField(parent = self.rowco25,width = 240,text = 'D://Assets/ArtistFolder/LFS/Models/Characters') Self.unit圜hkbox = pm.checkBox(parent=self.rowco25,height = 25,label = 'Unity Location', value = True) #self.cleanupBtn = pm.button(parent = self.rowco25, label = 'AnimBake',command = pm.Callback(self.animBakeFn)) rverBrowse = pm.button(parent=self.rowco25, label = ".", command=pm.Callback(self.browseServFn)) Pm.separator(parent=self.rowco25,width = 10,visible=False) rverPath = pm.textField(parent = self.rowco25,width = 240,text = 'R:/Prototype/characters') rvChkbox = pm.checkBox(parent=self.rowco25,label = 'Server location', value = True ) Self.rowco25 = pm.rowColumnLayout(parent=self.endframe01,numberOfColumns=5,height = 100,columnAttach=) Self.endframe01 = pm.frameLayout(parent=self.mainLay,label='End',cll=1,cl=False,mh=5) Self.mainLay = pm.columnLayout(adjustableColumn=True) #blabla this middle part is not important. Pm.window(self.winName, w=200,h=300,mnb=True,mxb=False,sizeable=True,resizeToFitChildren=True) If pm.dockControl("animHubDock", label = "TIP_Animhub", exists = True) = True:

#MAYA PYTHON LS IGNORE NAMESPACE CODE#

Ya sure sorry it took so long, but i had to try and snip my code to something more manageable the first code is my UI code. I really need more info about your code to understand what you need. textField(sampleScript.variable, query=True, value=True)īut this is a very bad solution for that. That variable, obviously, stores the hierarchy address of that field in the UI (window|layout|bla|bla|bla.|field)Ĭmds. If you don't have a function and all is in the root of the file (no identation), you should have a global variable in your script for that field: Create a function for that and call it through sampleScript.gatherValue() or something like that. In case your tool is created inside the script but with no OOP, You shouldn't access internal UI of that tool from outside. there's a lot to ask about what you know here. The field must be an attribute of the class to access it through a instance.field way.

maya python ls ignore namespace

In case it's OOP: I suppose your tool is a class, so create an instance of your tool and add a method in that class to gather that data. Is the creation of your field inside a function or outside it in the root of the file? Are you using OOP (classes, objects, object oriented?) or not?Īre you using maya cmds or PySide or PyQt for the UI?














Maya python ls ignore namespace