def runPoseLibrary(): """ launches studio library """ superusers = [] # try and read the config file configFilePath = os.path.join("/jobs", _jobTools.jobName(), "config", "animationTools", "poseLibrary", "superusers.conf") if os.path.exists(configFilePath): with open(configFilePath, "r") as f: for line in f.readlines(): superusers.append(line.rstrip()) # launch studio library import studioLibrary if superusers: studioLibrary.main(root="/jobs/ttu/library/studioLibrary", superusers=superusers, lockFolder="approved") else: studioLibrary.main(root="/jobs/ttu/library/studioLibrary")
raise AnimationPluginError(msg) if mutils.getDurationFromNodes( nodes=maya.cmds.ls(selection=True) or []) <= 0: msg = 'No animation was found on the selected objects! Please create a pose instead!' raise AnimationPluginError(msg) path = studioLibrary.tempDir(make=True, clean=True, subdir='animation.anim') objects = maya.cmds.ls(selection=True) bakeConnected = int(self.ui.bakeCheckBox.isChecked()) a = mutils.Animation.createFromObjects(objects) a.save(path, time=(self.startFrame(), self.endFrame()), bakeConnected=bakeConnected) content = a.paths() record.set('start', self.startFrame()) record.set('end', self.endFrame()) if self._sequence: sequence = os.path.dirname(self._sequence) if os.path.exists(sequence): content.append(sequence) record.save(content=content, icon=self.thumbnail()) except Exception: self.record().window().setError(msg) raise if __name__ == '__main__': import studioLibrary studioLibrary.main()
def animlib(*args): import studioLibrary studioLibrary.main() return
def go(): library_path = os.path.join(os.environ['PRODUCTION_DIR'], "studio_library") studioLibrary.main(root=library_path)
def go(): library_path = os.path.join(os.environ['PRODUCTION_DIR'],"studio_library") studioLibrary.main(root=library_path)
self.window().setLocked(False) return if self._lockFolder.match('') and self._unlockFolder.match(''): if self._superusers: self.window().setLocked(True) else: self.window().setLocked(False) return folders = self.window().selectedFolders() if not self._lockFolder.match(''): for folder in folders or []: if self._lockFolder.search(folder.dirname()): self.window().setLocked(True) return self.window().setLocked(False) if not self._unlockFolder.match(''): for folder in folders or []: if self._unlockFolder.search(folder.dirname()): self.window().setLocked(False) return self.window().setLocked(True) if __name__ == '__main__': import studioLibrary superusers = ['kurt.rathjen'] plugins = ['examplePlugin'] studioLibrary.main(superusers=superusers, plugins=plugins, add=True)