Ejemplo n.º 1
0
 def exportTool(self, category):
     if category == 'frostbite':
         cmds.warning('here is where the Frostbite export will go')
     else:
         if self.getSelection == 'None':
             cmds.Export()
         else:
             cmds.ExportSelection()
     self.setAttributes()
Ejemplo n.º 2
0
 def constrainToParent(self, bakeOrNo='Bake', maintainOffset='No'):
     sl = cmds.ls(selection=True)
     if maintainOffset == 'No':
         cmds.parentConstraint(sl[1], sl[0])
     elif maintainOffset == 'Maintain':
         cmds.parentConstraint(sl[1], sl[0], mo=True)
     cmds.select(sl[0])
     if bakeOrNo == 'bake':
         start = cmds.findKeyframe(self.getSelection(), which="first")
         end = cmds.findKeyframe(self.getSelection(), which="last")
         if start == end:  # this means there's no keyframes
             start = cmds.playbackOptions(q=1, minTime=1)
             end = cmds.playbackOptions(q=1, maxTime=1)
         cmds.bakeResults(sl[0], time=(start, end), simulation=True)
         cmds.delete(cn=True)
         if self.getType(0)[0] == 'camera':
             objectChild = cmds.listRelatives(sl[0], c=True)
             # all attributes for camera child node
             cmds.delete(objectChild, at='hfa', c=True)
             cmds.delete(objectChild, at='vfa', c=True)
             cmds.delete(objectChild, at='fl', c=True)
             cmds.delete(objectChild, at='lsr', c=True)
             cmds.delete(objectChild, at='fs', c=True)
             cmds.delete(objectChild, at='fd', c=True)
             cmds.delete(objectChild, at='sa', c=True)
             cmds.delete(objectChild, at='coi', c=True)
             # all attributes for camera node
             cmds.delete(sl[0], at='FOV', c=True)
             cmds.delete(sl[0], at='v', c=True)
             cmds.delete(sl[0], at='sz', c=True)
             cmds.delete(sl[0], at='sy', c=True)
             cmds.delete(sl[0], at='sx', c=True)
             # now initiate export selection
             cmds.ExportSelection()
     else:
         pass
Ejemplo n.º 3
0
def fileExportSelection():
    cmds.ExportSelection()
Ejemplo n.º 4
0
def export_loc():
    mc.select(final_loc, r=True)
    mc.ExportSelection()
Ejemplo n.º 5
0
 def _exportSelection(self):
     cmds.ExportSelection()