Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Context not available. | |||||
| VIEW3D_HT_header.draw_xform_template(layout, context) | VIEW3D_HT_header.draw_xform_template(layout, context) | ||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| obj = context.object | |||||
| if obj: | |||||
| object_mode = obj.mode | |||||
| tool_settings = context.tool_settings | |||||
| ob = context.active_object | |||||
| mesh = ob.data | |||||
| if object_mode == 'EDIT': | |||||
| row = layout.row(align=True) | |||||
| #row.alignment = 'RIGHT' | |||||
| row.label(icon="MOD_MIRROR") | |||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 0.6 | |||||
| sub.prop(mesh, "use_mirror_x", text="X", toggle=True) | |||||
| if tool_settings.use_mesh_automerge: | |||||
| layout.prop(tool_settings, "use_mesh_automerge", text="", icon="AUTOMERGE_ON") | |||||
| else: | |||||
| layout.prop(tool_settings, "use_mesh_automerge", text="", icon="AUTOMERGE_OFF") | |||||
| elif object_mode == 'SCULPT': | |||||
| sculpt = context.tool_settings.sculpt | |||||
| row = layout.row(align=True) | |||||
| # row.alignment = 'RIGHT' | |||||
| row.label(icon="MOD_MIRROR") | |||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 0.6 | |||||
| sub.prop(sculpt, "use_symmetry_x", text="X", toggle=True) | |||||
| sub.prop(sculpt, "use_symmetry_y", text="Y", toggle=True) | |||||
| sub.prop(sculpt, "use_symmetry_z", text="Z", toggle=True) | |||||
| sub.popover( | |||||
| panel="VIEW_3D_PT_sculpt_symmetry", | |||||
| text="", | |||||
| ) | |||||
| elif object_mode == 'TEXTURE_PAINT': | |||||
| ipaint = tool_settings.image_paint | |||||
| row = layout.row(align=True) | |||||
| #row.alignment = 'RIGHT' | |||||
| row.label(icon="MOD_MIRROR") | |||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 0.6 | |||||
| sub.prop(ipaint, "use_symmetry_x", text="X", toggle=True) | |||||
| sub.prop(ipaint, "use_symmetry_y", text="Y", toggle=True) | |||||
| sub.prop(ipaint, "use_symmetry_z", text="Z", toggle=True) | |||||
| elif object_mode in {'VERTEX_PAINT', 'WEIGHT_PAINT'}: | |||||
| vpaint = tool_settings.vertex_paint | |||||
| row = layout.row(align=True) | |||||
| #row.alignment = 'RIGHT' | |||||
| row.label(icon="MOD_MIRROR") | |||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 0.6 | |||||
| sub.prop(vpaint, "use_symmetry_x", text="X", toggle=True) | |||||
| sub.prop(vpaint, "use_symmetry_y", text="Y", toggle=True) | |||||
| sub.prop(vpaint, "use_symmetry_z", text="Z", toggle=True) | |||||
| self.draw_mode_settings(context) | self.draw_mode_settings(context) | ||||
| Context not available. | |||||