[Bf-blender-cvs] [82b9e1e] master: Show 'Manipulate Center Points' in weight paint mode

Julian Eisel noreply at git.blender.org
Thu Jan 5 00:15:11 CET 2017


Commit: 82b9e1e3126a5c9de36d57d2d04edd11f00de9a5
Author: Julian Eisel
Date:   Thu Jan 5 00:09:42 2017 +0100
Branches: master
https://developer.blender.org/rB82b9e1e3126a5c9de36d57d2d04edd11f00de9a5

Show 'Manipulate Center Points' in weight paint mode

If the active object is in weight paint mode, but some armatures in pose mode, 'manipulate center points' still affects the transformation. See bd2034a749a9a9.

Also removed redundant check, we basically did the same check for paint modes twice.

===================================================================

M	source/blender/editors/space_view3d/view3d_header.c
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 0713377..bf1bdf6 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -337,13 +337,13 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
 	/* Draw type */
 	uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
 
-	if (obedit == NULL && is_paint) {
-		if (ob->mode & OB_MODE_ALL_PAINT) {
-			/* Only for Weight Paint. makes no sense in other paint modes. */
-			row = uiLayoutRow(layout, true);
-			uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
-		}
+	row = uiLayoutRow(layout, true);
+	uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+	if (!ob || ELEM(ob->mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) {
+		uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+	}
 
+	if (obedit == NULL && is_paint) {
 		/* Manipulators aren't used in paint modes */
 		if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) {
 			/* masks aren't used for sculpt and particle painting */
@@ -361,17 +361,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
 		}
 	}
 	else {
-		row = uiLayoutRow(layout, true);
-		uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
-
-		/* pose/object only however we want to allow in weight paint mode too
-		 * so don't be totally strict and just check not-editmode for now 
-		 * XXX We never get here when we are in Weight Paint mode
-		 */
-		if (obedit == NULL) {
-			uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
-		}
-
 		/* Transform widget / manipulators */
 		row = uiLayoutRow(layout, true);
 		uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 1feae9e..5e364a3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2624,7 +2624,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
 	
 	prop = RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
-	RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object and pose mode only)");
+	RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object, pose and weight paint mode only)");
 	RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");




More information about the Bf-blender-cvs mailing list