Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | if context.space_data.type != 'VIEW_3D': | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop_enum(tool_settings, propname, 'VIEW') | row.prop_enum(tool_settings, propname, 'VIEW') | ||||
| row.prop_enum(tool_settings, propname, 'CURSOR', text="Cursor") | row.prop_enum(tool_settings, propname, 'CURSOR', text="Cursor") | ||||
| def gpencil_active_brush_settings_simple(context, layout): | def gpencil_active_brush_settings_simple(context, layout): | ||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| brush = tool_settings.gpencil_paint.brush | brush = tool_settings.gpencil_paint.brush | ||||
| mode = tool_settings.gpencil_paint.color_mode | |||||
| if brush is None: | if brush is None: | ||||
| layout.label(text="No Active Brush") | layout.label(text="No Active Brush") | ||||
| return | return | ||||
| col = layout.column() | col = layout.column() | ||||
| col.label(text="Active Brush: ") | col.label(text="Active Brush: ") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| Show All 12 Lines | def gpencil_active_brush_settings_simple(context, layout): | ||||
| row.prop(brush, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') | row.prop(brush, "use_strength_pressure", text="", icon='STYLUS_PRESSURE') | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop(brush, "jitter", slider=True) | row.prop(brush, "jitter", slider=True) | ||||
| row.prop(brush, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') | row.prop(brush, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE') | ||||
| row = col.row() | row = col.row() | ||||
| row.prop(brush, "angle", slider=True) | row.prop(brush, "angle", slider=True) | ||||
| row.prop(brush, "angle_factor", text="Factor", slider=True) | row.prop(brush, "angle_factor", text="Factor", slider=True) | ||||
| col = layout.column() | |||||
| col.enabled = mode == 'VERTEXCOLOR' | |||||
| row = col.row(align=True) | |||||
| row.prop(gp_settings, "random_hue_factor", slider=True) | |||||
| row.prop(gp_settings, "use_stroke_random_hue", text="", icon='GP_SELECT_STROKES') | |||||
| row = col.row(align=True) | |||||
| row.prop(gp_settings, "random_saturation_factor", slider=True) | |||||
| row.prop(gp_settings, "use_stroke_random_sat", text="", icon='GP_SELECT_STROKES') | |||||
| row = col.row(align=True) | |||||
| row.prop(gp_settings, "random_value_factor", slider=True) | |||||
| row.prop(gp_settings, "use_stroke_random_val", text="", icon='GP_SELECT_STROKES') | |||||
| # XXX: To be replaced with active tools | # XXX: To be replaced with active tools | ||||
| class AnnotationDrawingToolsPanel: | class AnnotationDrawingToolsPanel: | ||||
| # subclass must set | # subclass must set | ||||
| # bl_space_type = 'IMAGE_EDITOR' | # bl_space_type = 'IMAGE_EDITOR' | ||||
| bl_label = "Annotation" | bl_label = "Annotation" | ||||
| bl_category = "Annotation" | bl_category = "Annotation" | ||||
| bl_region_type = 'TOOLS' | bl_region_type = 'TOOLS' | ||||
| ▲ Show 20 Lines • Show All 893 Lines • Show Last 20 Lines | |||||