test = AC3DExport(OBJS, file) except: file.close() raise else: file.close() endtime = bsys.time() - starttime REPORT_DATA['main'].append("Done. Saved to: %s" % filename) REPORT_DATA['main'].append("Data exported in %.3f seconds." % endtime) if VERBOSE: report_data() Blender.Window.WaitCursor(0) # -- End of definitions scn = Blender.Scene.GetCurrent() if ONLY_SELECTED: OBJS = list(scn.objects.context) else: OBJS = list(scn.objects) if not OBJS: Blender.Draw.PupMenu('ERROR: no objects selected') else: fname = bsys.makename(ext=".ac") if EXPORT_DIR: fname = bsys.join(EXPORT_DIR, bsys.basename(fname)) FileSelector(fs_callback, "Export AC3D", fname)
test = ASCIISTLExport(OBJS, file) except: file.close() raise else: file.close() endtime = bsys.time() - starttime REPORT_DATA['main'].append("Done. Saved to: %s" % filename) REPORT_DATA['main'].append("Data exported in %.3f seconds." % endtime) if VERBOSE: report_data() Blender.Window.WaitCursor(0) # -- End of definitions scn = Blender.Scene.GetCurrent() if ONLY_SELECTED: OBJS = list(scn.objects.context) else: OBJS = list(scn.objects) if not OBJS: Blender.Draw.PupMenu('ERROR: no objects selected') else: fname = bsys.makename(ext=".stl") if EXPORT_DIR: fname = bsys.join(EXPORT_DIR, bsys.basename(fname)) FileSelector(fs_callback, "Export ASCII STL", fname)
""" % (sce.name, "author", "version", "url", "bpydoc")) for lay in rend.renderLayers: # fout.write("\nlay = rend.addRenderLayer()\n") fout.write("lay.name = \"%s\"\n" % lay.name) exec("vars = dir(lay)") for var in vars: if var.startswith('_'): continue v = "lay.%s" % var exec("value = %s" % v) if type(value) == str: fout.write("%s = '%s'\n" % (v, value)) else: fout.write("%s = %s\n" % (v, value)) fout.write('\nBlender.Redraw(-1)') fout.close() try: Blender.UpdateMenus() except: Blender.Draw.PupMenu( "Warning - check console!%t|Menus could not be automatically updated" ) FileSelector(write_renderlayers, "Save RenderLayers", default_fname)
o_count = 0 for gr_o in groups_ordered: if gr_o.obj_count > 0: o_count += 1 file.write("\nMeshes = %d\n\n" % o_count) for gr_o in groups_ordered: save_file(file, gr_o) file.close() endtime = bsys.time() - starttime print "Data exported in %.3f seconds." % endtime Blender.Window.WaitCursor(0) return groups = [] mat_list = [] tp = Scene.GetCurrent() objs = tp.getChildren() if not objs: Blender.Draw.PupMenu('ERROR: no objects in scene') else: fname = "*.fef" if EXPORT_DIR: fname = bsys.join(EXPORT_DIR, bsys.basename(fname)) FileSelector(fs_callback, "Export FEF", fname)
import Blender from Blender.Window import Theme theme = Theme.New('%s') """ % (theme.name, "author", "version", "url", "bpydoc", theme.name)) for tsp in theme.get(): # command = "\n%s = theme.get('%s')" % (tsp, tsp) fout.write(command + "\n") exec(command) exec("vars = dir(%s)" % tsp) vars.remove('theme') for var in vars: v = "%s.%s" % (tsp, var) exec("value = %s" % v) if type(value) == str: fout.write("%s = '%s'\n" % (v, value)) else: fout.write("%s = %s\n" % (v, value)) fout.write('\nBlender.Redraw(-1)') fout.close() try: Blender.UpdateMenus() except: Blender.Draw.PupMenu("Warning - check console!%t|Menus could not be automatically updated") FileSelector(write_theme, "Save Current Theme", default_fname)