diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-01-28 16:42:47 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-01-28 16:43:07 +0300 |
commit | 5d044708514d43ce6973da46f7690bdd561b460c (patch) | |
tree | ae12af000ec64df99cbad6c27e6ddb5dda39b7c3 /release/scripts | |
parent | 7c72ba60d7556f611501e288adc5cc1ee5f214c1 (diff) |
Texture painting, support cycles UV Map nodes:
Support UV Map nodes for determining active UV layer. Now when an image
node is enocuntered, the system will recursively search the node's input
sockets for any UV Map nodes. Obviously this won't fetch any coordinate
transforms into painting, and it will only choose the first UV Map node
encountered if more than one UV Map nodes are combined.
However it should allow custom UV setups per materials and tweaking of
the UV Map node's UV layer from the Slots panel.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 4b4599bb28a..774d21e89b5 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1124,18 +1124,21 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): 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 in {'BLENDER_RENDER', 'BLENDER_GAME'}: 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 mat.texture_paint_slots: - slot = mat.texture_paint_slots[mat.paint_active_slot] - + if 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="") + + if slot and slot.index != -1: + col.label("UV Map") + col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") elif settings.mode == 'IMAGE': mesh = ob.data |