Page Menu
Home
Search
Configure Global Search
Log In
Files
F7977
objectpanel_vgroup_ui_enhancement.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Teppo Känsälä (teppoka)
Nov 13 2013, 1:50 PM
Size
2 KB
Subscribers
None
objectpanel_vgroup_ui_enhancement.patch
View Options
Index: source/blender/src/drawview.c
===================================================================
--- source/blender/src/drawview.c (revision 16197)
+++ source/blender/src/drawview.c (working copy)
@@ -129,6 +129,7 @@
#include "BIF_retopo.h"
#include "BIF_screen.h"
#include "BIF_space.h"
+#include "BIF_editdeform.h"
#ifdef WITH_VERSE
#include "BIF_verse.h"
@@ -149,6 +150,7 @@
#include "BSE_trans_types.h"
#include "BSE_time.h"
#include "BSE_view.h"
+#include "BSE_edit.h"
#include "BPY_extern.h"
@@ -1744,8 +1746,11 @@
uiBlockEndAlign(block);
if(defstr[0]) {
- uiDefBut(block, LABEL, 1, "Vertex Deform Groups", 10, 40, 290, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, LABEL, 1, "Vertex Deform Groups", 10, 40, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefBut(block, BUT,B_OBJECTPANEL_VGROUPSET, "Set", 160, 40, 70, 20, 0, 0, 0, 0, 0, "Sets vertex group as active");
+ uiDefBut(block, BUT,B_OBJECTPANEL_VGROUPSEL, "Select", 230, 40, 70, 20, 0, 0, 0, 0, 0, "Selects vertices of vertex group");
+
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_NOP, "Weight:", 10, 20, 150, 19, tfp->defweightp, 0.0f, 1.0f, 10, 3, "Weight value");
uiDefButI(block, MENU, REDRAWVIEW3D, defstr, 160, 20, 140, 19, &tfp->curdef, 0.0, 0.0, 0, 0, "Current Vertex Group");
@@ -2257,6 +2262,27 @@
case B_TRANSFORMSPACECLEAR:
BIF_clearTransformOrientation();
allqueue(REDRAWVIEW3D, 1);
+ break;
+ case B_OBJECTPANEL_VGROUPSET:
+ {
+ ob->actdef = tfp->curdef+1;
+ allqueue(REDRAWBUTSEDIT, 1);
+ allqueue(REDRAWOOPS, 0);
+ break;
+ }
+ case B_OBJECTPANEL_VGROUPSEL:
+ {
+ int oldactdef = ob->actdef;
+ // there's no need to clear selection since this button is showed only when exactly
+ // one vertex is selected and that belongs to the group that we are about to select
+ ob->actdef = tfp->curdef+1;
+ sel_verts_defgroup(1);
+ ob->actdef = oldactdef;
+ allqueue(REDRAWVIEW3D, 1);
+ allqueue(REDRAWOOPS, 0);
+ countall();
+ break;
+ }
}
}
Index: source/blender/include/butspace.h
===================================================================
--- source/blender/include/butspace.h (revision 16197)
+++ source/blender/include/butspace.h (working copy)
@@ -171,6 +171,8 @@
#define B_OBJECTPANELDIMS 1015
#define B_TRANSFORMSPACEADD 1016
#define B_TRANSFORMSPACECLEAR 1017
+#define B_OBJECTPANEL_VGROUPSET 1018
+#define B_OBJECTPANEL_VGROUPSEL 1019
/* *********************** */
#define B_LAMPBUTS 1200
Index: source/blender/src/editdeform.c
===================================================================
--- source/blender/src/editdeform.c (revision 16197)
+++ source/blender/src/editdeform.c (working copy)
@@ -132,8 +132,6 @@
break;
}
- countall();
-
}
/* check if deform vertex has defgroup index */
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
68/c7/b41c0e679090a5f0fd7ffbe6a871
Event Timeline
Log In to Comment