(self)
| 560 | |
| 561 | |
| 562 | def redoIt(self): |
| 563 | sphConfigList = cmds.ls( type='SPHConfigurationNode', long=True ) |
| 564 | if len(sphConfigList) == 0: |
| 565 | cmds.warning("Not saved since no SPH configuration node was found.") |
| 566 | return |
| 567 | |
| 568 | if not cmds.pluginInfo("objExport", query=True, loaded=True): |
| 569 | cmds.loadPlugin("objExport") |
| 570 | |
| 571 | fileName = cmds.fileDialog2(ff="*.json", fm=0, dir="") |
| 572 | scenePath = os.path.dirname(fileName[0]) |
| 573 | |
| 574 | scene=self.generateScene(scenePath) |
| 575 | if scene == None: |
| 576 | return |
| 577 | |
| 578 | f = open(fileName[0], 'w') |
| 579 | json_str = json.dumps(scene, sort_keys=True,indent=4, separators=(',', ': ')) |
| 580 | f.write(json_str) |
| 581 | f.close() |
| 582 | |
| 583 | def isUndoable(self): |
| 584 | return False |
no test coverage detected