Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_material_gpencil.py
| Context not available. | |||||
| ma = context.material | ma = context.material | ||||
| if ma is not None and ma.grease_pencil is not None: | if ma is not None and ma.grease_pencil is not None: | ||||
| gpcolor = ma.grease_pencil | gpcolor = ma.grease_pencil | ||||
| self.layout.enabled = not gpcolor.lock | |||||
| self.layout.prop(gpcolor, "show_stroke", text="") | self.layout.prop(gpcolor, "show_stroke", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Context not available. | |||||
| gpcolor = ma.grease_pencil | gpcolor = ma.grease_pencil | ||||
| col = layout.column() | col = layout.column() | ||||
| col.active = not gpcolor.lock | col.enabled = not gpcolor.lock | ||||
| col.prop(gpcolor, "mode") | col.prop(gpcolor, "mode") | ||||
| Context not available. | |||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| ma = context.material | ma = context.material | ||||
| gpcolor = ma.grease_pencil | gpcolor = ma.grease_pencil | ||||
| self.layout.enabled = not gpcolor.lock | |||||
| self.layout.prop(gpcolor, "show_fill", text="") | self.layout.prop(gpcolor, "show_fill", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Context not available. | |||||
| # color settings | # color settings | ||||
| col = layout.column() | col = layout.column() | ||||
| col.active = not gpcolor.lock | col.enabled = not gpcolor.lock | ||||
| col.prop(gpcolor, "fill_style", text="Style") | col.prop(gpcolor, "fill_style", text="Style") | ||||
| if gpcolor.fill_style == 'GRADIENT': | if gpcolor.fill_style == 'GRADIENT': | ||||
| Context not available. | |||||