Changeset View
Changeset View
Standalone View
Standalone View
space_view3d_display_tools/__init__.py
| Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
| class DisplayToolsPanel(Panel): | class DisplayToolsPanel(Panel): | ||||
| bl_label = "Display Tools" | bl_label = "Display Tools" | ||||
| bl_space_type = "VIEW_3D" | bl_space_type = "VIEW_3D" | ||||
| bl_region_type = "TOOLS" | bl_region_type = "TOOLS" | ||||
| bl_category = "Display" | bl_category = "Display" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| draw_type_icons = { | display_type_icons = { | ||||
| 'BOUNDS': 'BBOX', | 'BOUNDS': 'BBOX', | ||||
| 'WIRE': 'WIRE', | 'WIRE': 'WIRE', | ||||
| 'SOLID': 'SOLID', | 'SOLID': 'SOLID', | ||||
| 'TEXTURED': 'POTATO' | 'TEXTURED': 'POTATO' | ||||
| } | } | ||||
| bounds_icons = { | bounds_icons = { | ||||
| 'BOX': 'MESH_CUBE', | 'BOX': 'MESH_CUBE', | ||||
| 'SPHERE': 'MATSPHERE', | 'SPHERE': 'MATSPHERE', | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.alignment = 'EXPAND' | col.alignment = 'EXPAND' | ||||
| col.prop(view, "show_only_render", toggle=True) | col.prop(view, "show_only_render", toggle=True) | ||||
| col.prop(view, "show_world", toggle=True) | col.prop(view, "show_world", toggle=True) | ||||
| col.prop(view, "show_outline_selected", toggle=True) | col.prop(view, "show_outline_selected", toggle=True) | ||||
| col.prop(view, "show_all_objects_origin", toggle=True) | col.prop(view, "show_all_objects_origin", toggle=True) | ||||
| col.prop(view, "show_backface_culling", toggle=True) | col.prop(view, "show_backface_culling", toggle=True) | ||||
| if obj: | if obj: | ||||
| col.prop(obj, "show_x_ray", text="X-Ray", toggle=True) | col.prop(obj, "show_in_front", text="X-Ray", toggle=True) | ||||
| if obj and obj_type == 'MESH': | if obj and obj_type == 'MESH': | ||||
| col.prop(obj, "show_transparent", text="Transparency", toggle=True) | col.prop(obj, "show_transparent", text="Transparency", toggle=True) | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(render, "use_simplify", "Simplify", toggle=True) | col.prop(render, "use_simplify", "Simplify", toggle=True) | ||||
| if render.use_simplify is True: | if render.use_simplify is True: | ||||
| Show All 17 Lines | def draw(self, context): | ||||
| show_wires = row.operator("ut.wire_show_hide", icon="MESH_UVSPHERE", text="") | show_wires = row.operator("ut.wire_show_hide", icon="MESH_UVSPHERE", text="") | ||||
| show_wires.show = True | show_wires.show = True | ||||
| show_wires.selected = False | show_wires.selected = False | ||||
| row.operator("ut.all_edges", icon="MESH_GRID", text="").on = True | row.operator("ut.all_edges", icon="MESH_GRID", text="").on = True | ||||
| else: | else: | ||||
| if obj: | if obj: | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.alignment = 'EXPAND' | col.alignment = 'EXPAND' | ||||
| col.label(text="Maximum:") | col.label(text="Display As:") | ||||
| col.prop(obj, "draw_type", text="", icon=self.draw_type_icons[obj.draw_type]) | col.prop(obj, "display_type", text="", icon=self.display_type_icons[obj.display_type]) | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.alignment = 'CENTER' | col.alignment = 'CENTER' | ||||
| col.label(text="Selected Object(s):") | col.label(text="Selected Object(s):") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.operator("view3d.display_draw_change", text="Wire", | row.operator("view3d.display_draw_change", text="Wire", | ||||
| icon='WIRE').drawing = 'WIRE' | icon='WIRE').drawing = 'WIRE' | ||||
| row.operator("view3d.display_draw_change", text="Solid", | row.operator("view3d.display_draw_change", text="Solid", | ||||
| ▲ Show 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| # Selection options | # Selection options | ||||
| box1 = self.layout.box() | box1 = self.layout.box() | ||||
| col = box1.column(align=True) | col = box1.column(align=True) | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop(display_tools, "UiTabDrop", index=4, text="Selection", icon=icon_active_4) | row.prop(display_tools, "UiTabDrop", index=4, text="Selection", icon=icon_active_4) | ||||
| if not SELECT2DROP: | if not SELECT2DROP: | ||||
| row.operator("view3d.select_border", text="", icon="MESH_PLANE") | row.operator("view3d.select_box", text="", icon="MESH_PLANE") | ||||
| row.operator("view3d.select_circle", text="", icon="MESH_CIRCLE") | row.operator("view3d.select_circle", text="", icon="MESH_CIRCLE") | ||||
| row.label(text="", icon="BLANK1") | row.label(text="", icon="BLANK1") | ||||
| else: | else: | ||||
| if obj and obj.mode == 'OBJECT': | if obj and obj.mode == 'OBJECT': | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.label(text="Render Visibility:") | col.label(text="Render Visibility:") | ||||
| col.operator("op.render_show_all_selected", icon="RESTRICT_VIEW_OFF") | col.operator("op.render_show_all_selected", icon="RESTRICT_VIEW_OFF") | ||||
| col.operator("op.render_hide_all_selected", icon="RESTRICT_VIEW_ON") | col.operator("op.render_hide_all_selected", icon="RESTRICT_VIEW_ON") | ||||
| ▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines | |||||