93 lines
3.1 KiB
Python
Executable File
93 lines
3.1 KiB
Python
Executable File
import bpy
|
|
|
|
from bpy.types import Panel
|
|
|
|
|
|
class RT_PT_render_toolbox_ui(Panel):
|
|
bl_space_type = "NODE_EDITOR"
|
|
bl_region_type = "UI"
|
|
bl_category = "Render" # Wrangler
|
|
bl_label = "Render Toolbox"
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
layout.operator("rt.create_output_layers", icon="NODE")
|
|
layout.operator("rt.outputs_search_and_replace", text='Search and replace outputs', icon="BORDERMOVE")
|
|
|
|
# Base panel for drawing
|
|
class RT_PT_visibility_check_ui_base(bpy.types.Panel):
|
|
bl_space_type = "VIEW_3D"
|
|
bl_region_type = "UI"
|
|
bl_category = "View"
|
|
bl_label = "Visibility Checks"
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
def draw_header_preset(self, context):
|
|
layout = self.layout
|
|
layout.operator('rt.scene_checker', text="", icon='CHECKMARK') #, depress=True
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
# layout.label(text="Visibily Checks:")
|
|
layout.operator("rt.list_object_visibility_conflicts", icon="OBJECT_DATAMODE")
|
|
layout.operator("rt.list_viewport_render_visibility", text="List Viewport Vs Render Visibility", icon="OBJECT_DATAMODE")
|
|
|
|
layout.operator("rt.list_modifier_visibility", text="List Modifiers Visibility Conflicts", icon="MODIFIER")
|
|
|
|
layout.operator("rt.list_collection_visibility_conflicts", text="List Collections Visibility Conflicts", icon="OUTLINER_COLLECTION")
|
|
|
|
layout.separator()
|
|
layout.operator("rt.list_object_affected_by_simplify", text="List Object Affected By Simplify", icon="MOD_SIMPLIFY")
|
|
|
|
class RT_PT_visibility_check_ui_viewport(RT_PT_visibility_check_ui_base):
|
|
bl_space_type = "VIEW_3D"
|
|
bl_region_type = "UI"
|
|
bl_category = "View"
|
|
|
|
class RT_PT_visibility_check_ui_node(RT_PT_visibility_check_ui_base):
|
|
bl_space_type = 'NODE_EDITOR'
|
|
# bl_parent_id = "RT_PT_render_toolbox_ui"
|
|
bl_region_type = 'UI'
|
|
bl_category = "Render" # Wrangler ?
|
|
|
|
## Unused, only exposed in Create output panel
|
|
class RT_PT_output_template(Panel):
|
|
bl_space_type = "3D_VIEW"
|
|
bl_region_type = "UI"
|
|
bl_category = "Render" # Wrangler
|
|
bl_label = "File Output Templates"
|
|
bl_parent_id = "RT_PT_render_toolbox_ui"
|
|
# bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
settings = context.scene.render_toolbox
|
|
|
|
col = layout.column(align=True)
|
|
col.label(text='Single file:')
|
|
col.prop(settings, "default_base_path", text="Base Path")
|
|
col.prop(settings, "default_file_slot", text="File Slot")
|
|
|
|
col.separator()
|
|
col = layout.column(align=True)
|
|
col.label(text='Multilayers:')
|
|
col.prop(settings, "default_multilayer_base_path", text="Base Path")
|
|
col.prop(settings, "default_multilayer_name", text="Layer Name")
|
|
|
|
## Handle separate tech passes names ?
|
|
|
|
|
|
classes = (
|
|
RT_PT_render_toolbox_ui,
|
|
RT_PT_visibility_check_ui_viewport,
|
|
RT_PT_visibility_check_ui_node
|
|
# RT_PT_output_template,
|
|
)
|
|
|
|
def register():
|
|
for cls in classes:
|
|
bpy.utils.register_class(cls)
|
|
|
|
def unregister():
|
|
for cls in reversed(classes):
|
|
bpy.utils.unregister_class(cls) |