[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13869] trunk/blender/source/blender/src: Popup menus for displaying names of groups available for selection now draw with multiple columns when the number of entries cannot fit in a single column (and be editable).
Joshua Leung
aligorith at gmail.com
Tue Feb 26 07:33:07 CET 2008
Revision: 13869
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13869
Author: aligorith
Date: 2008-02-26 07:33:06 +0100 (Tue, 26 Feb 2008)
Log Message:
-----------
Popup menus for displaying names of groups available for selection now draw with multiple columns when the number of entries cannot fit in a single column (and be editable).
Modified Paths:
--------------
trunk/blender/source/blender/src/editgroup.c
trunk/blender/source/blender/src/poselib.c
trunk/blender/source/blender/src/poseobject.c
Modified: trunk/blender/source/blender/src/editgroup.c
===================================================================
--- trunk/blender/source/blender/src/editgroup.c 2008-02-26 00:04:54 UTC (rev 13868)
+++ trunk/blender/source/blender/src/editgroup.c 2008-02-26 06:33:06 UTC (rev 13869)
@@ -244,7 +244,7 @@
strp1 += sprintf(strp1, "%s %%x%d|", group->id.name+2, tot);
}
}
- tot= pupmenu(strp);
+ tot= pupmenu_col(strp, 20);
MEM_freeN(strp);
if(tot>0) group= BLI_findlink(&G.main->group, tot-1);
else return;
Modified: trunk/blender/source/blender/src/poselib.c
===================================================================
--- trunk/blender/source/blender/src/poselib.c 2008-02-26 00:04:54 UTC (rev 13868)
+++ trunk/blender/source/blender/src/poselib.c 2008-02-26 06:33:06 UTC (rev 13869)
@@ -327,7 +327,7 @@
/* get the pose to replace */
menustr= poselib_build_poses_menu(act, "Replace PoseLib Pose");
- val= pupmenu(menustr);
+ val= pupmenu_col(menustr, 20);
if (menustr) MEM_freeN(menustr);
if (val <= 0) return;
@@ -431,7 +431,7 @@
/* get index (and pointer) of pose to remove */
if (marker == NULL) {
menustr= poselib_build_poses_menu(act, "Remove PoseLib Pose");
- val= pupmenu(menustr);
+ val= pupmenu_col(menustr, 20);
if (menustr) MEM_freeN(menustr);
if (val <= 0) return;
@@ -496,7 +496,7 @@
/* get index of pose to remove */
menustr= poselib_build_poses_menu(act, "Rename PoseLib Pose");
- val= pupmenu(menustr);
+ val= pupmenu_col(menustr, 20);
if (menustr) MEM_freeN(menustr);
if (val <= 0) return;
Modified: trunk/blender/source/blender/src/poseobject.c
===================================================================
--- trunk/blender/source/blender/src/poseobject.c 2008-02-26 00:04:54 UTC (rev 13868)
+++ trunk/blender/source/blender/src/poseobject.c 2008-02-26 06:33:06 UTC (rev 13869)
@@ -1024,7 +1024,7 @@
/* get group to affect */
if ((active==0) || (pose->active_group <= 0)) {
menustr= build_posegroups_menustr(pose, 1);
- nr= pupmenu(menustr);
+ nr= pupmenu_col(menustr, 20);
MEM_freeN(menustr);
if (nr < 0)
@@ -1220,17 +1220,10 @@
/* Shift-G in 3D-View while in PoseMode */
void pose_select_grouped_menu (void)
{
- char *str;
short nr;
-
- /* make menu string */
- str= MEM_mallocN(512, "groupmenu");
- strcpy(str, "Select Grouped%t|In Same Group%x1|In Same Layer%x2");
-
- /* here we go */
- nr= pupmenu(str);
- MEM_freeN(str);
+ /* here we go */
+ nr= pupmenu("Select Grouped%t|In Same Group%x1|In Same Layer%x2");
pose_select_grouped(nr);
}
@@ -1297,7 +1290,7 @@
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWBUTSEDIT, 0);
allqueue(REDRAWBUTSOBJECT, 0);
- allqueue (REDRAWACTION, 0);
+ allqueue(REDRAWACTION, 0);
allqueue(REDRAWOOPS, 0);
BIF_undo_push("Flip names");
}
@@ -1448,7 +1441,8 @@
{
if (!icu) {
return 0;
- } else {
+ }
+ else {
BezTriple *bezt = icu->bezt;
BezTriple *bezt_prev=NULL, *bezt_next=NULL;
More information about the Bf-blender-cvs
mailing list