[Bf-blender-cvs] [70eac432b7a] master: UI: Add Open Image button to Mask Stencil Image panel
Aaron Carlisle
noreply at git.blender.org
Fri Jul 21 22:53:01 CEST 2017
Commit: 70eac432b7ad5a702c7fb4e4a85433d5ca36e4cf
Author: Aaron Carlisle
Date: Fri Jul 21 16:46:35 2017 -0400
Branches: master
https://developer.blender.org/rB70eac432b7ad5a702c7fb4e4a85433d5ca36e4cf
UI: Add Open Image button to Mask Stencil Image panel
In the future we should make these two buttons on one line
However because we need `gen_context = 'PAINT_STENCIL'`
this is a little hard and we need to find a proper solution.
One might be using `context_pointer_set`
Patch by @craig_jones with edits by @blendify
Differential Revision: https://developer.blender.org/D2710
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 798c3aafe0b..4026bc972fe 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1243,7 +1243,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
uv_text = mesh.uv_textures.active.name if mesh.uv_textures.active else ""
col.label("Canvas Image:")
# todo this should be combinded into a single row
- col.template_ID(settings, "canvas", col.template_ID)
+ col.template_ID(settings, "canvas", open="image.open")
col.operator("image.new", text="New").gen_context = 'PAINT_CANVAS'
col.label("UV Map:")
col.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False)
More information about the Bf-blender-cvs
mailing list