[Bf-blender-cvs] [7e4ce1e8042] greasepencil-object: Make Vertex Group operator available in Sculpt mode
Antonio Vazquez
noreply at git.blender.org
Tue Aug 22 19:11:35 CEST 2017
Commit: 7e4ce1e804258df0d30f25c7d3799ad0ec5460cb
Author: Antonio Vazquez
Date: Tue Aug 22 19:11:25 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7e4ce1e804258df0d30f25c7d3799ad0ec5460cb
Make Vertex Group operator available in Sculpt mode
As vertex group tools are used to manage vertices is good to have these tools available in Sculpt mode too.
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index cf635021415..2a97e848572 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -1330,7 +1330,7 @@ class GreasePencilVertexGroupPanel:
col.operator("object.vertex_group_add", icon='ZOOMIN', text="")
col.operator("object.vertex_group_remove", icon='ZOOMOUT', text="").all = False
- if ob.vertex_groups: # and (ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex)):
+ if ob.vertex_groups:
row = layout.row()
sub = row.row(align=True)
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index bbec0aafb40..0d4be4c4225 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1571,7 +1571,8 @@ static int gpencil_vertex_group_poll(bContext *C)
if ((ob) && (ob->type == OB_GPENCIL)) {
return (!ID_IS_LINKED_DATABLOCK(ob) &&
!ID_IS_LINKED_DATABLOCK(ob->gpd) &&
- ob->defbase.first && (ob->mode == OB_MODE_GPENCIL_EDIT));
+ ob->defbase.first &&
+ ((ob->mode == OB_MODE_GPENCIL_EDIT) || (ob->mode == OB_MODE_GPENCIL_SCULPT)));
}
else {
return false;
More information about the Bf-blender-cvs
mailing list