diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-08-28 18:40:38 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-08-28 22:41:05 +0400 |
commit | cf3ce7322a9b6c1453869a369eba02f4fd077234 (patch) | |
tree | 94f11f57da8c00ce780e878767517cf4e428c907 /release/scripts/startup/bl_ui/space_view3d_toolbar.py | |
parent | 512b7383525d7b9ccdca93816a08a579db148f23 (diff) |
Texture painting:
Include explicit control for texturing:
This commit introduces a painting mode option, available in
the slots panel. The default value "Material" will create slots from the
blender material, same as just merged from the paint branch.
The new option "Image", will use an explicit image field that artists can use
to select the image to paint on. This will should allow painting regardless
of the renderer used or for use in modifiers.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 65 |
1 files changed, 30 insertions, 35 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 59c68fc615d..6b0c5b1e993 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1026,31 +1026,39 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): ob = context.active_object col = layout.column() - if len(ob.material_slots) > 1: - col.label("Materials") - col.template_list("MATERIAL_UL_matslots", "layers", - ob, "material_slots", - ob, "active_material_index", rows=2) - - mat = ob.active_material - if mat: - col.label("Available Paint Slots") - col.template_list("TEXTURE_UL_texpaintslots", "", - mat, "texture_paint_images", - mat, "paint_active_slot", rows=2) + col.label("Painting Mode") + col.prop(settings, "mode", text = "") + col.separator() - if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'): - row = col.row(align=True) - row.operator_menu_enum("paint.add_texture_paint_slot", "type") - row.operator("paint.delete_texture_paint_slot", text="", icon='X') + if settings.mode == 'MATERIAL': + if len(ob.material_slots) > 1: + col.label("Materials") + col.template_list("MATERIAL_UL_matslots", "layers", + ob, "material_slots", + ob, "active_material_index", rows=2) + + mat = ob.active_material + if mat: + col.label("Available Paint Slots") + col.template_list("TEXTURE_UL_texpaintslots", "", + mat, "texture_paint_images", + mat, "paint_active_slot", rows=2) - if mat.texture_paint_slots: - slot = mat.texture_paint_slots[mat.paint_active_slot] + if (not mat.use_nodes) and (context.scene.render.engine == 'BLENDER_RENDER'): + row = col.row(align=True) + row.operator_menu_enum("paint.add_texture_paint_slot", "type") + row.operator("paint.delete_texture_paint_slot", text="", icon='X') - col.prop(mat.texture_slots[slot.index], "blend_type") - col.separator() - col.label("UV Map") - col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") + if mat.texture_paint_slots: + slot = mat.texture_paint_slots[mat.paint_active_slot] + + col.prop(mat.texture_slots[slot.index], "blend_type") + col.separator() + col.label("UV Map") + col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") + + elif settings.mode == 'IMAGE': + col.template_ID(settings, "canvas") col.separator() col.operator("image.save_dirty", text="Save All Images") @@ -1089,7 +1097,6 @@ class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel): col.label("Image") row = col.row(align=True) - row.operator("image.new", icon='ZOOMIN', text="Add New").texstencil = True; row.template_ID(ipaint, "stencil_image") col.label("Visualization") @@ -1643,18 +1650,6 @@ class VIEW3D_PT_imagepaint_options(View3DPaintPanel): self.unified_paint_settings(col, context) -class VIEW3D_MT_tools_projectpaint_clone(Menu): - bl_label = "Clone Layer" - - def draw(self, context): - layout = self.layout - - for i, tex in enumerate(context.active_object.data.uv_textures): - props = layout.operator("wm.context_set_int", text=tex.name, translate=False) - props.data_path = "active_object.data.uv_texture_clone_index" - props.value = i - - class VIEW3D_MT_tools_projectpaint_stencil(Menu): bl_label = "Mask Layer" |