def openScene(self, origin, filepath, force=False): if os.path.splitext(filepath)[1] not in self.sceneFormats: return False cleared = nuke.scriptSaveAndClear() if cleared: try: nuke.scriptOpen(filepath) except: pass return True
def openScene(self, origin, filepath): if not filepath.endswith(".nk"): return False cleared = nuke.scriptSaveAndClear() if cleared: try: nuke.scriptOpen(filepath) except: pass return True