Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 593 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| row = layout.row() | row = layout.row() | ||||
| sub = row.row(align=True) | sub = row.row(align=True) | ||||
| sub.prop(tool_settings, "use_gpencil_draw_onback", text="", icon='MOD_OPACITY') | sub.prop(tool_settings, "use_gpencil_draw_onback", text="", icon='MOD_OPACITY') | ||||
| sub.separator(factor=0.4) | sub.separator(factor=0.4) | ||||
| sub.prop(tool_settings, "use_gpencil_weight_data_add", text="", icon='WPAINT_HLT') | sub.prop(tool_settings, "use_gpencil_weight_data_add", text="", icon='WPAINT_HLT') | ||||
| sub.separator(factor=0.4) | sub.separator(factor=0.4) | ||||
| sub.prop(tool_settings, "use_gpencil_draw_additive", text="", icon='FREEZE') | sub.prop(tool_settings, "use_gpencil_draw_additive", text="", icon='FREEZE') | ||||
| # Select mode for Editing | |||||
| if gpd.use_stroke_edit_mode: | if gpd.use_stroke_edit_mode: | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(tool_settings, "gpencil_selectmode", text="", expand=True) | row.prop(tool_settings, "gpencil_selectmode_edit", text="", expand=True) | ||||
| if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode: | |||||
| row = layout.row(align=True) | |||||
| # Select mode for Sculpt | |||||
| if gpd.is_stroke_sculpt_mode: | if gpd.is_stroke_sculpt_mode : | ||||
| row.prop(tool_settings.gpencil_sculpt, "use_select_mask", text="") | row = layout.row(align=True) | ||||
| row.separator() | row.prop(tool_settings, "use_gpencil_select_mask_point", text="") | ||||
| row.prop(tool_settings, "use_gpencil_select_mask_stroke", text="") | |||||
| row.prop(tool_settings, "use_gpencil_select_mask_segment", text="") | |||||
| if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode: | |||||
| row = layout.row(align=True) | |||||
| row.prop(gpd, "use_multiedit", text="", icon='GP_MULTIFRAME_EDITING') | row.prop(gpd, "use_multiedit", text="", icon='GP_MULTIFRAME_EDITING') | ||||
| sub = row.row(align=True) | sub = row.row(align=True) | ||||
| sub.active = gpd.use_multiedit | sub.active = gpd.use_multiedit | ||||
| sub.popover( | sub.popover( | ||||
| panel="VIEW3D_PT_gpencil_multi_frame", | panel="VIEW3D_PT_gpencil_multi_frame", | ||||
| text="Multiframe", | text="Multiframe", | ||||
| ) | ) | ||||
| if gpd.use_stroke_edit_mode: | if gpd.use_stroke_edit_mode: | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(tool_settings.gpencil_sculpt, "use_select_mask", text="") | |||||
| row.popover( | row.popover( | ||||
| panel="VIEW3D_PT_tools_grease_pencil_interpolate", | panel="VIEW3D_PT_tools_grease_pencil_interpolate", | ||||
| text="Interpolate", | text="Interpolate", | ||||
| ) | ) | ||||
| overlay = view.overlay | overlay = view.overlay | ||||
| VIEW3D_MT_editor_menus.draw_collapsible(context, layout) | VIEW3D_MT_editor_menus.draw_collapsible(context, layout) | ||||
| ▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| gp_edit = obj and obj.mode in {'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'} | gp_edit = obj and obj.mode in {'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'} | ||||
| ts = context.scene.tool_settings | ts = context.scene.tool_settings | ||||
| layout.menu("VIEW3D_MT_view") | layout.menu("VIEW3D_MT_view") | ||||
| # Select Menu | # Select Menu | ||||
| if gp_edit: | if gp_edit: | ||||
| if mode_string not in {'PAINT_GPENCIL', 'WEIGHT_GPENCIL'}: | if mode_string not in {'PAINT_GPENCIL', 'WEIGHT_GPENCIL'}: | ||||
| if mode_string == 'SCULPT_GPENCIL' and ts.gpencil_sculpt.use_select_mask: | if mode_string == 'SCULPT_GPENCIL' and \ | ||||
| (ts.use_gpencil_select_mask_point or | |||||
| ts.use_gpencil_select_mask_stroke or | |||||
| ts.use_gpencil_select_mask_segment): | |||||
| layout.menu("VIEW3D_MT_select_gpencil") | layout.menu("VIEW3D_MT_select_gpencil") | ||||
| elif mode_string == 'EDIT_GPENCIL': | elif mode_string == 'EDIT_GPENCIL': | ||||
| layout.menu("VIEW3D_MT_select_gpencil") | layout.menu("VIEW3D_MT_select_gpencil") | ||||
| elif mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}: | elif mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}: | ||||
| mesh = obj.data | mesh = obj.data | ||||
| if mesh.use_paint_mask: | if mesh.use_paint_mask: | ||||
| layout.menu("VIEW3D_MT_select_paint_mask") | layout.menu("VIEW3D_MT_select_paint_mask") | ||||
| elif mesh.use_paint_mask_vertex and mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX'}: | elif mesh.use_paint_mask_vertex and mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX'}: | ||||
| ▲ Show 20 Lines • Show All 5,974 Lines • Show Last 20 Lines | |||||