Changeset View
Changeset View
Standalone View
Standalone View
oscurart_tools/oscurart_render.py
| Context not available. | |||||
| with open(CALLFILE, "w") as CALLFILEBATCH: | with open(CALLFILE, "w") as CALLFILEBATCH: | ||||
| SCRIPT = "python %s" % (SHFILE) | SCRIPT = "python %s" % SHFILE | ||||
| CALLFILEBATCH.writelines(SCRIPT) | CALLFILEBATCH.writelines(SCRIPT) | ||||
| if EXTSYS == ".sh": | if EXTSYS == ".sh": | ||||
| Context not available. | |||||
| scenerenderdict[prop] = getattr( | scenerenderdict[prop] = getattr( | ||||
| bpy.context.scene.render, prop) | bpy.context.scene.render, prop) | ||||
| except: | except: | ||||
| print("%s does not exist." % (prop)) | print("%s does not exist." % prop) | ||||
| for prop in dir(bpy.context.scene): | for prop in dir(bpy.context.scene): | ||||
| if prop not in excludes: | if prop not in excludes: | ||||
| try: | try: | ||||
| scenedict[prop] = getattr(bpy.context.scene, prop) | scenedict[prop] = getattr(bpy.context.scene, prop) | ||||
| except: | except: | ||||
| print("%s does not exist." % (prop)) | print("%s does not exist." % prop) | ||||
| for prop in dir(bpy.context.scene.render.image_settings): | for prop in dir(bpy.context.scene.render.image_settings): | ||||
| if prop not in excludes: | if prop not in excludes: | ||||
| Context not available. | |||||
| bpy.context.scene.render.image_settings, | bpy.context.scene.render.image_settings, | ||||
| prop) | prop) | ||||
| except: | except: | ||||
| print("%s does not exist." % (prop)) | print("%s does not exist." % prop) | ||||
| """ | """ | ||||
| scenerenderdict = {prop: getattr(bpy.context.scene.render, prop) for prop in dir(bpy.context.scene.render)} | scenerenderdict = {prop: getattr(bpy.context.scene.render, prop) for prop in dir(bpy.context.scene.render)} | ||||
| Context not available. | |||||
| try: | try: | ||||
| setattr(escena.render, prop, value) | setattr(escena.render, prop, value) | ||||
| except: | except: | ||||
| print("%s was not copied!" % (prop)) | print("%s was not copied!" % prop) | ||||
| pass | pass | ||||
| # scene | # scene | ||||
| Context not available. | |||||
| try: | try: | ||||
| setattr(escena, prop, value) | setattr(escena, prop, value) | ||||
| except: | except: | ||||
| print("%s was not copied!" % (prop)) | print("%s was not copied!" % prop) | ||||
| pass | pass | ||||
| # imageSettings | # imageSettings | ||||
| for escena in sceneslist: | for escena in sceneslist: | ||||
| Context not available. | |||||
| try: | try: | ||||
| setattr(escena.render.image_settings, prop, value) | setattr(escena.render.image_settings, prop, value) | ||||
| except: | except: | ||||
| print("%s was not copied!" % (prop)) | print("%s was not copied!" % prop) | ||||
| pass | pass | ||||
| if mode == "cycles": | if mode == "cycles": | ||||
| Context not available. | |||||
| scenecyclesdict[prop] = getattr( | scenecyclesdict[prop] = getattr( | ||||
| bpy.context.scene.cycles, prop) | bpy.context.scene.cycles, prop) | ||||
| except: | except: | ||||
| print("%s does not exist." % (prop)) | print("%s does not exist." % prop) | ||||
| """ | """ | ||||
| scenecyclesdict = {prop: getattr(bpy.context.scene.cycles, prop) for prop in dir(bpy.context.scene.cycles)} | scenecyclesdict = {prop: getattr(bpy.context.scene.cycles, prop) for prop in dir(bpy.context.scene.cycles)} | ||||
| Context not available. | |||||
| try: | try: | ||||
| setattr(escena.cycles, prop, value) | setattr(escena.cycles, prop, value) | ||||
| except: | except: | ||||
| print("%s was not copied!" % (prop)) | print("%s was not copied!" % prop) | ||||
| pass | pass | ||||
| Context not available. | |||||