diff options
-rw-r--r-- | oscurart_tools/__init__.py | 26 | ||||
-rw-r--r-- | oscurart_tools/oscurart_render.py | 174 |
2 files changed, 9 insertions, 191 deletions
diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py index 7aea8c6f..15321f08 100644 --- a/oscurart_tools/__init__.py +++ b/oscurart_tools/__init__.py @@ -82,7 +82,7 @@ class OscPanelControl(Panel): bl_idname = "Oscurart Panel Control" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_label = "Panels Switcher" #bl_options = {'DEFAULT_CLOSED'} @@ -104,7 +104,7 @@ class OscPanelControl(Panel): class OscPanelObject(Panel): bl_idname = "Oscurart Object Tools" bl_label = "Object Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -157,7 +157,7 @@ class OscPanelObject(Panel): class OscPanelMesh(Panel): bl_idname = "Oscurart Mesh Tools" bl_label = "Mesh Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -192,7 +192,7 @@ class OscPanelMesh(Panel): class OscPanelShapes(Panel): bl_idname = "Oscurart Shapes Tools" bl_label = "Shapes Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -216,7 +216,7 @@ class OscPanelShapes(Panel): class OscPanelRender(Panel): bl_idname = "Oscurart Render Tools" bl_label = "Render Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -230,14 +230,6 @@ class OscPanelRender(Panel): col = layout.column(align=1) colrow = col.row(align=1) - colrow.operator( - "render.copy_render_settings_osc", - icon="LIBRARY_DATA_DIRECT", - text="Copy Render Settings").mode = "render" - colrow.operator( - "render.copy_render_settings_osc", - icon="LIBRARY_DATA_DIRECT", - text="Copy Cycles Settings").mode = "cycles" col.operator( "file.create_batch_maker_osc", icon="LINENUMBERS_ON", @@ -284,7 +276,7 @@ class OscPanelRender(Panel): class OscPanelFiles(Panel): bl_idname = "Oscurart Files Tools" bl_label = "Files Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -309,7 +301,7 @@ class OscPanelFiles(Panel): class OscPanelOverrides(Panel): bl_idname = "Oscurart Overrides" bl_label = "Overrides Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -353,7 +345,7 @@ class OscPanelOverrides(Panel): class OscPanelAnimation(Panel): bl_idname = "Oscurart Animation Tools" bl_label = "Animation Tools" - bl_category = "Custom" + bl_category = "Oscurart Tools" bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' bl_options = {'DEFAULT_CLOSED'} @@ -416,7 +408,7 @@ class OscurartToolsAddonPreferences(bpy.types.AddonPreferences): category = bpy.props.StringProperty( name="Category", description="Choose a name for the category of the panel", - default="Custom", + default="Oscurart Tools", update=update_panel, ) diff --git a/oscurart_tools/oscurart_render.py b/oscurart_tools/oscurart_render.py index 8e7fc05f..f86831ff 100644 --- a/oscurart_tools/oscurart_render.py +++ b/oscurart_tools/oscurart_render.py @@ -477,177 +477,3 @@ class BrokenFramesPanel (Panel): colrow.operator("object.delete_broken_file") -# --------------------------------COPY RENDER SETTINGS-------------------- - -def defCopyRenderSettings(mode): - - sc = bpy.context.scene - sceneslist = bpy.data.scenes[:] - sceneslist.remove(sc) - - excludes = { - 'name', - 'objects', - 'object_bases', - 'has_multiple_engines', - 'display_settings', - 'broken_files', - 'rna_type', - 'frame_subframe', - 'view_settings', - 'tool_settings', - 'render', - 'user_clear', - 'animation_data_create', - 'collada_export', - 'keying_sets', - 'icon_props', - 'image_settings', - 'library', - 'bake', - 'active_layer', - 'frame_current_final', - 'sequence_editor_clear', - 'rigidbody_world', - 'unit_settings', - 'orientations', - '__slots__', - 'ray_cast', - 'sequencer_colorspace_settings', - 'ffmpeg', - 'is_movie_format', - 'frame_path', - 'frame_set', - 'network_render', - 'animation_data_clear', - 'is_nla_tweakmode', - 'keying_sets_all', - 'sequence_editor', - '__doc__', - 'ovlist', - 'file_extension', - 'users', - 'node_tree', - 'is_updated_data', - 'bl_rna', - 'is_library_indirect', - 'cycles_curves', - 'timeline_markers', - 'statistics', - 'use_shading_nodes', - 'use_game_engine', - 'sequence_editor_create', - 'is_updated', - '__module__', - 'update_tag', - 'update', - 'animation_data', - 'cycles', - 'copy', - 'game_settings', - 'layers', - '__weakref__', - 'string', - 'double', - 'overrides', - 'use_render_scene', - 'engine', - 'use_nodes', - 'world'} - - if mode == "render": - scenerenderdict = {} - scenedict = {} - sceneimagesettingdict = {} - for prop in dir(bpy.context.scene.render): - if prop not in excludes: - try: - scenerenderdict[prop] = getattr( - bpy.context.scene.render, prop) - except: - print("%s does not exist." % (prop)) - - for prop in dir(bpy.context.scene): - if prop not in excludes: - try: - scenedict[prop] = getattr(bpy.context.scene, prop) - except: - print("%s does not exist." % (prop)) - - for prop in dir(bpy.context.scene.render.image_settings): - if prop not in excludes: - try: - sceneimagesettingdict[prop] = getattr( - bpy.context.scene.render.image_settings, - prop) - except: - print("%s does not exist." % (prop)) - - """ - scenerenderdict = {prop: getattr(bpy.context.scene.render, prop) for prop in dir(bpy.context.scene.render)} - scenedict = {prop: getattr(bpy.context.scene, prop) for prop in dir(bpy.context.scene) if prop not in excludes} - sceneimagesettingdict = {prop: getattr(bpy.context.scene.render.image_settings, prop) - for prop in dir(bpy.context.scene.render.image_settings)} - """ - - # render - for escena in sceneslist: - for prop, value in scenerenderdict.items(): - try: - setattr(escena.render, prop, value) - except: - print("%s was not copied!" % (prop)) - pass - - # scene - for escena in sceneslist: - for prop, value in scenedict.items(): - try: - setattr(escena, prop, value) - except: - print("%s was not copied!" % (prop)) - pass - # imageSettings - for escena in sceneslist: - for prop, value in sceneimagesettingdict.items(): - try: - setattr(escena.render.image_settings, prop, value) - except: - print("%s was not copied!" % (prop)) - pass - - if mode == "cycles": - scenecyclesdict = {} - for prop in dir(bpy.context.scene.cycles): - if prop not in excludes: - try: - scenecyclesdict[prop] = getattr( - bpy.context.scene.cycles, prop) - except: - print("%s does not exist." % (prop)) - - """ - scenecyclesdict = {prop: getattr(bpy.context.scene.cycles, prop) for prop in dir(bpy.context.scene.cycles)} - """ - # cycles - for escena in sceneslist: - for prop, value in scenecyclesdict.items(): - try: - setattr(escena.cycles, prop, value) - except: - print("%s was not copied!" % (prop)) - pass - - -class copyRenderSettings(Operator): - bl_idname = "render.copy_render_settings_osc" - bl_label = "Copy Render Settings" - # bl_options = {'REGISTER', 'UNDO'} - - mode = bpy.props.StringProperty(default="") - - def execute(self, context): - - defCopyRenderSettings(self.mode) - - return {'FINISHED'} |