[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13570] trunk/blender/source/blender/src: inverted the uv header mesh-sync-selection button, added face/ vert selection popdown when sync selection is enabled.
Campbell Barton
ideasman42 at gmail.com
Mon Feb 4 23:01:24 CET 2008
Revision: 13570
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13570
Author: campbellbarton
Date: 2008-02-04 23:01:23 +0100 (Mon, 04 Feb 2008)
Log Message:
-----------
inverted the uv header mesh-sync-selection button, added face/vert selection popdown when sync selection is enabled.
Modified Paths:
--------------
trunk/blender/source/blender/src/header_image.c
trunk/blender/source/blender/src/sequence.c
Modified: trunk/blender/source/blender/src/header_image.c
===================================================================
--- trunk/blender/source/blender/src/header_image.c 2008-02-04 21:52:03 UTC (rev 13569)
+++ trunk/blender/source/blender/src/header_image.c 2008-02-04 22:01:23 UTC (rev 13570)
@@ -83,6 +83,7 @@
#include "BSE_filesel.h"
#include "BSE_headerbuttons.h"
#include "BSE_trans_types.h"
+#include "BSE_edit.h"
#include "BPY_extern.h"
#include "BPY_menus.h"
@@ -361,6 +362,26 @@
allqueue(REDRAWIMAGE, 0);
}
+static void do_image_buttons_set_selection_mode_callback(void *mode, void *dummy2)
+{
+ int selectmode = *((int *)mode);
+ if (selectmode==0) {
+ if (G.scene->selectmode == SCE_SELECT_VERTEX) return;
+ G.scene->selectmode = SCE_SELECT_VERTEX;
+ } else {
+ if (G.scene->selectmode == SCE_SELECT_FACE) return;
+ G.scene->selectmode = SCE_SELECT_FACE;
+ }
+
+ EM_selectmode_set();
+ countall();
+
+ BIF_undo_push("Set Selection Mode");
+ allqueue(REDRAWVIEW3D, 0);
+ allqueue(REDRAWBUTSEDIT, 0);
+ allqueue(REDRAWIMAGE, 0);
+}
+
static void do_image_view_viewnavmenu(void *arg, int event)
{
switch(event) {
@@ -1205,21 +1226,28 @@
xco+= XIC + 18;
uiBlockBeginAlign(block);
- uiDefIconButBitI(block, TOGN, SI_SYNC_UVSEL, B_REDR, ICON_NO_GO_LEFT, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Mesh independant selection");
+ uiDefIconButBitI(block, TOG, SI_SYNC_UVSEL, B_REDR, ICON_EDIT, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Sync UV and Mesh Selection");
xco+= XIC;
- if ((G.sima->flag & SI_SYNC_UVSEL)==0) {
+ if (G.sima->flag & SI_SYNC_UVSEL) {
+ static int selectmode;
+ /* would use these if const's could go in strings
+ * SCE_SELECT_VERTEX, SCE_SELECT_FACE */
+ ubut = uiDefIconTextButI(block, ICONTEXTROW, B_REDR, ICON_VERTEXSEL,
+ "Selection Mode: %t|Vertex%x0|Face%x2",
+ xco,0,XIC+10,YIC, &selectmode, 0, 3.0, 0, 0,
+ "Change mesh selection mode");
+ uiButSetFunc(ubut, do_image_buttons_set_selection_mode_callback, &selectmode, NULL);
+ } else {
/* would use these if const's could go in strings
* SI_STICKY_LOC SI_STICKY_DISABLE SI_STICKY_VERTEX */
ubut = uiDefIconTextButC(block, ICONTEXTROW, B_REDR, ICON_STICKY_UVS_LOC,
"Sticky UV Selection: %t|Disable%x1|Shared Location%x0|Shared Vertex%x2",
xco,0,XIC+10,YIC, &(G.sima->sticky), 0, 3.0, 0, 0,
"Sticky UV Selection (Hotkeys: Shift C, Alt C, Ctrl C)");
- xco+= XIC + 16;
- } else {
- xco+= 6;
}
+ xco+= XIC + 16;
uiBlockEndAlign(block);
/* Snap copied right out of view3d header */
Modified: trunk/blender/source/blender/src/sequence.c
===================================================================
--- trunk/blender/source/blender/src/sequence.c 2008-02-04 21:52:03 UTC (rev 13569)
+++ trunk/blender/source/blender/src/sequence.c 2008-02-04 22:01:23 UTC (rev 13570)
@@ -1,4 +1,4 @@
-/**
+ /**
* $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
More information about the Bf-blender-cvs
mailing list