def setup(self, pov=None): """ Show the Properties Manager dialog. If <pov> is supplied, get the parameters from it and load the dialog widgets. """ if not self.win.assy.filename: env.history.message(self.cmdname + redmsg( "Can't insert POV-Ray Scene until the current part has been saved." )) return if not pov: self.node_is_new = True from model.PovrayScene import PovrayScene self.node = PovrayScene(self.win.assy, None) else: self.node_is_new = False self.node = pov self.name = self.originalName = self.node.name ini, self.originalPov, out = self.node.get_povfile_trio() self.width, self.height, self.output_type = self.node.get_parameters() self.update_widgets() self.previousParams = params = self.gather_parameters() self.show()
def viewRaytraceScene(self): """ Slot for 'View > POV-Ray'. Raytraces the current scene. This version does not add a POV-Ray Scene node to the model tree. This is preferred since it allows the user to preview POV-Ray renderings without having to save the current part and/or delete unwanted nodes from the model tree. If the user wants to add the node to the model tree, the user must use 'Insert > POV-Ray Scene'. """ assy = self.assy glpane = self.glpane #pov = PovrayScene(assy, None, params = (glpane.width, glpane.height, 'png')) #bruce 060620 revised this pov = PovrayScene(assy, None) pov.raytrace_scene(tmpscene=True) # this emits whatever history messages are needed [bruce 060710 comment]