Changeset View
Changeset View
Standalone View
Standalone View
paint_palette.py
| Context not available. | |||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
| class WriteGimpPalette(): | class WriteGimpPalette: | ||||
| """Base preset class, only for subclassing | """Base preset class, only for subclassing | ||||
| subclasses must define | subclasses must define | ||||
| - preset_values | - preset_values | ||||
| Context not available. | |||||
| pass | pass | ||||
| class BrushButtonsPanel(): | class BrushButtonsPanel: | ||||
| bl_space_type = 'IMAGE_EDITOR' | bl_space_type = 'IMAGE_EDITOR' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| Context not available. | |||||
| return sima.show_paint and toolsettings.brush | return sima.show_paint and toolsettings.brush | ||||
| class PaintPanel(): | class PaintPanel: | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'TOOLS' | bl_region_type = 'TOOLS' | ||||
| bl_category = 'Tools' | bl_category = 'Tools' | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return (context.image_paint_object or context.vertex_paint_object) | return context.image_paint_object or context.vertex_paint_object | ||||
| def draw(self, context): | def draw(self, context): | ||||
| color_palette_draw(self, context) | color_palette_draw(self, context) | ||||
| Context not available. | |||||