[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19715] branches/blender2.5/blender/source /blender: 2.5
Ton Roosendaal
ton at blender.org
Tue Apr 14 17:59:52 CEST 2009
Revision: 19715
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19715
Author: ton
Date: 2009-04-14 17:59:52 +0200 (Tue, 14 Apr 2009)
Log Message:
-----------
2.5
More cleanup!
- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
(was only in use for radiosity buttons)
And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:
- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
a several calls using different args.
Further just added the missing includes, and removed unused vars.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/blenlib/BLI_string.h
branches/blender2.5/blender/source/blender/blenlib/intern/string.c
branches/blender2.5/blender/source/blender/editors/armature/armature_intern.h
branches/blender2.5/blender/source/blender/editors/armature/editarmature_retarget.c
branches/blender2.5/blender/source/blender/editors/armature/reeb.c
branches/blender2.5/blender/source/blender/editors/include/UI_interface.h
branches/blender2.5/blender/source/blender/editors/interface/interface.c
branches/blender2.5/blender/source/blender/editors/interface/interface_draw.c
branches/blender2.5/blender/source/blender/editors/interface/interface_intern.h
branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c
branches/blender2.5/blender/source/blender/editors/interface/interface_panel.c
branches/blender2.5/blender/source/blender/editors/interface/interface_regions.c
branches/blender2.5/blender/source/blender/editors/interface/interface_utils.c
branches/blender2.5/blender/source/blender/editors/mesh/editdeform.c
branches/blender2.5/blender/source/blender/editors/object/object_edit.c
branches/blender2.5/blender/source/blender/editors/screen/area.c
branches/blender2.5/blender/source/blender/editors/space_action/action_draw.c
branches/blender2.5/blender/source/blender/editors/space_action/action_header.c
branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_header.c
branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_scene.c
branches/blender2.5/blender/source/blender/editors/space_buttons/space_buttons.c
branches/blender2.5/blender/source/blender/editors/space_file/file_draw.c
branches/blender2.5/blender/source/blender/editors/space_file/file_header.c
branches/blender2.5/blender/source/blender/editors/space_file/file_ops.c
branches/blender2.5/blender/source/blender/editors/space_file/filesel.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_buttons.c
branches/blender2.5/blender/source/blender/editors/space_graph/graph_header.c
branches/blender2.5/blender/source/blender/editors/space_image/image_header.c
branches/blender2.5/blender/source/blender/editors/space_image/image_panels.c
branches/blender2.5/blender/source/blender/editors/space_info/info_header.c
branches/blender2.5/blender/source/blender/editors/space_nla/nla_header.c
branches/blender2.5/blender/source/blender/editors/space_node/drawnode.c
branches/blender2.5/blender/source/blender/editors/space_node/node_draw.c
branches/blender2.5/blender/source/blender/editors/space_node/node_header.c
branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
branches/blender2.5/blender/source/blender/editors/space_outliner/outliner_header.c
branches/blender2.5/blender/source/blender/editors/space_script/script_header.c
branches/blender2.5/blender/source/blender/editors/space_script/space_script.c
branches/blender2.5/blender/source/blender/editors/space_sequencer/sequencer_header.c
branches/blender2.5/blender/source/blender/editors/space_sound/sound_header.c
branches/blender2.5/blender/source/blender/editors/space_text/text_header.c
branches/blender2.5/blender/source/blender/editors/space_time/time_header.c
branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_buttons.c
branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_header.c
branches/blender2.5/blender/source/blender/editors/transform/transform_constraints.c
branches/blender2.5/blender/source/blender/editors/transform/transform_conversions.c
branches/blender2.5/blender/source/blender/editors/util/editmode_undo.c
branches/blender2.5/blender/source/blender/makesdna/DNA_userdef_types.h
branches/blender2.5/blender/source/blender/makesrna/intern/rna_nodetree.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c
branches/blender2.5/blender/source/blender/python/intern/bpy_interface.c
branches/blender2.5/blender/source/blender/python/intern/bpy_ui.c
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_operators.c
Modified: branches/blender2.5/blender/source/blender/blenlib/BLI_string.h
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/BLI_string.h 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/blenlib/BLI_string.h 2009-04-14 15:59:52 UTC (rev 19715)
@@ -84,14 +84,14 @@
*
* @retval True if the strings are equal, false otherwise.
*/
-int BLI_streq(char *a, char *b);
+int BLI_streq(const char *a, const char *b);
/**
* Compare two strings without regard to case.
*
* @retval True if the strings are equal, false otherwise.
*/
-int BLI_strcaseeq(char *a, char *b);
+int BLI_strcaseeq(const char *a, const char *b);
char *BLI_strcasestr(const char *s, const char *find);
int BLI_strcasecmp(const char *s1, const char *s2);
Modified: branches/blender2.5/blender/source/blender/blenlib/intern/string.c
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/intern/string.c 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/blenlib/intern/string.c 2009-04-14 15:59:52 UTC (rev 19715)
@@ -100,10 +100,13 @@
return n;
}
-int BLI_streq(char *a, char *b) {
+int BLI_streq(const char *a, const char *b)
+{
return (strcmp(a, b)==0);
}
-int BLI_strcaseeq(char *a, char *b) {
+
+int BLI_strcaseeq(const char *a, const char *b)
+{
return (BLI_strcasecmp(a, b)==0);
}
Modified: branches/blender2.5/blender/source/blender/editors/armature/armature_intern.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/armature_intern.h 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/editors/armature/armature_intern.h 2009-04-14 15:59:52 UTC (rev 19715)
@@ -75,8 +75,8 @@
struct ListBase;
void make_boneList(struct ListBase *edbo, struct ListBase *bones, struct EditBone *parent);
-
struct EditBone *addEditBone(struct bArmature *arm, char *name);
+void BIF_sk_selectStroke(struct bContext *C, short mval[2], short extend);
/* duplicate method */
void preEditBoneDuplicate(struct ListBase *editbones);
Modified: branches/blender2.5/blender/source/blender/editors/armature/editarmature_retarget.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/editarmature_retarget.c 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/editors/armature/editarmature_retarget.c 2009-04-14 15:59:52 UTC (rev 19715)
@@ -64,9 +64,9 @@
#include "BKE_context.h"
#include "ED_armature.h"
+#include "ED_util.h"
+
#include "BIF_retarget.h"
-//#include "BIF_space.h"
-//#include "BIF_toolbox.h"
#include "PIL_time.h"
@@ -1645,6 +1645,7 @@
}
/************************************ GENERATING *****************************************************/
+#if 0
static EditBone *add_editbonetolist(char *name, ListBase *list)
{
EditBone *bone= MEM_callocN(sizeof(EditBone), "eBone");
@@ -1668,6 +1669,7 @@
return bone;
}
+#endif
void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit)
{
@@ -2733,7 +2735,7 @@
arm->edbo = rigg->editbones;
ED_armature_from_edit(scene, rigg->ob);
- ED_undo_push("Retarget Skeleton");
+ ED_undo_push(C, "Retarget Skeleton");
}
static void retargetGraphs(bContext *C, RigGraph *rigg)
@@ -2890,7 +2892,7 @@
printf("retarget: \t%.3f (%.1f%%)\n", retarget_time, retarget_time / total_time * 100);
printf("-----------\n");
- ED_undo_push("Retarget Skeleton");
+ ED_undo_push(C, "Retarget Skeleton");
// XXX
// allqueue(REDRAWVIEW3D, 0);
Modified: branches/blender2.5/blender/source/blender/editors/armature/reeb.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/armature/reeb.c 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/editors/armature/reeb.c 2009-04-14 15:59:52 UTC (rev 19715)
@@ -1740,10 +1740,10 @@
int filterSmartReebGraph(ReebGraph *rg, float threshold)
{
+ int value = 0;
+#if 0 //XXX
ReebArc *arc = NULL, *nextArc = NULL;
- int value = 0;
- #if 0 //XXX
BLI_sortlist(&rg->arcs, compareArcs);
#ifdef DEBUG_REEB
@@ -3402,7 +3402,7 @@
if (weightFromDistance(em, &indexed_edges) == 0)
{
- error("No selected vertex\n");
+ // XXX error("No selected vertex\n");
freeEdgeIndex(&indexed_edges);
return NULL;
}
Modified: branches/blender2.5/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/editors/include/UI_interface.h 2009-04-14 15:59:52 UTC (rev 19715)
@@ -57,15 +57,11 @@
/* Defines */
/* uiBlock->dt */
-#define UI_EMBOSS 0 /* use one of the themes for drawing */
-#define UI_EMBOSSN 1 /* Nothing */
-#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */
-#define UI_EMBOSSP 3 /* Pulldown */
-#define UI_EMBOSSR 4 /* Rounded */
-#define UI_EMBOSST 5 /* Table */
+#define UI_EMBOSS 0 /* use widget style for drawing */
+#define UI_EMBOSSN 1 /* Nothing, only icon and/or text */
+#define UI_EMBOSSP 2 /* Pulldown menu style */
+#define UI_EMBOSST 3 /* Table */
-#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */
-
/* uiBlock->direction */
#define UI_TOP 1
#define UI_DOWN 2
@@ -98,10 +94,6 @@
/* block->flag bits 12-15 are identical to but->flag bits */
-/* block->font, for now: bold = medium+1 */
-#define UI_HELV 0
-#define UI_HELVB 1
-
/* panel controls */
#define UI_PNL_TRANSP 1
#define UI_PNL_SOLID 2
@@ -282,12 +274,14 @@
*
* */
-uiBlock *uiBeginBlock(const struct bContext *C, struct ARegion *region, char *name, short dt, short font);
+uiBlock *uiBeginBlock(const struct bContext *C, struct ARegion *region, const char *name, short dt);
void uiEndBlock(const struct bContext *C, uiBlock *block);
void uiDrawBlock(const struct bContext *C, struct uiBlock *block);
uiBlock *uiGetBlock(char *name, struct ARegion *ar);
+void uiBlockSetEmboss(uiBlock *block, short dt);
+
void uiFreeBlock(const struct bContext *C, uiBlock *block);
void uiFreeBlocks(const struct bContext *C, struct ListBase *lb);
void uiFreeInactiveBlocks(const struct bContext *C, struct ListBase *lb);
@@ -305,10 +299,7 @@
void uiMenuPopupBoundsBlock(uiBlock *block, int addvall, int mx, int my);
int uiBlocksGetYMin (struct ListBase *lb);
-int uiBlockGetCol (uiBlock *block);
-void uiBlockSetCol (uiBlock *block, int col);
-void uiBlockSetEmboss (uiBlock *block, int emboss);
void uiBlockSetDirection (uiBlock *block, int direction);
void uiBlockFlipOrder (uiBlock *block);
void uiBlockSetFlag (uiBlock *block, int flag);
@@ -320,8 +311,6 @@
void uiButSetFlag (uiBut *but, int flag);
void uiButClearFlag (uiBut *but, int flag);
-void uiAutoBlock(uiBlock *block, float minx, float miny, float sizex, float sizey, int flag);
-
/* Buttons
*
* Functions to define various types of buttons in a block. Postfixes:
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-04-14 12:34:39 UTC (rev 19714)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-04-14 15:59:52 UTC (rev 19715)
@@ -392,68 +392,6 @@
block->my= my;
}
-void ui_autofill(uiBlock *block)
-{
- uiBut *but;
- float *maxw, *maxh, startx = 0, starty, height = 0;
- float totmaxh;
- int rows=0, /* cols=0, */ i, lasti;
-
- /* first count rows */
- but= block->buttons.last;
- rows= but->x1+1;
-
- /* calculate max width / height for each row */
- maxw= MEM_callocN(sizeof(float)*rows, "maxw");
- maxh= MEM_callocN(sizeof(float)*rows, "maxh");
- but= block->buttons.first;
- while(but) {
- i= but->x1;
- if( maxh[i] < but->y2) maxh[i]= but->y2;
- maxw[i] += but->x2;
- but= but->next;
- }
-
- totmaxh= 0.0;
- for(i=0; i<rows; i++) totmaxh+= maxh[i];
-
- /* apply widths/heights */
- starty= block->maxy;
- but= block->buttons.first;
- lasti= -1;
- while(but) {
- // signal for aligning code
- but->flag |= UI_BUT_ALIGN_DOWN;
-
- i= but->x1;
-
- if(i!=lasti) {
- startx= block->minx;
- height= (maxh[i]*(block->maxy-block->miny))/totmaxh;
- starty-= height;
- lasti= i;
- }
-
- but->y1= starty+but->aspect;
- but->y2= but->y1+height-but->aspect;
-
- but->x2= (but->x2*(block->maxx-block->minx))/maxw[i];
- but->x1= startx+but->aspect;
-
- startx+= but->x2;
- but->x2+= but->x1-but->aspect;
-
- ui_check_but(but);
-
- but= but->next;
- }
-
- uiBlockEndAlign(block);
-
- MEM_freeN(maxw); MEM_freeN(maxh);
- block->autofill= 0;
-}
-
/* ************** LINK LINE DRAWING ************* */
/* link line drawing is not part of buttons or theme.. so we stick with it here */
@@ -469,7 +407,7 @@
vec2[0]= (line->to->x1+line->to->x2)/2.0;
vec2[1]= (line->to->y1+line->to->y2)/2.0;
- if(line->flag & UI_SELECT) UI_ThemeColorShade(but->themecol, 80);
+ if(line->flag & UI_SELECT) glColor3ub(100,100,100);
else glColor3ub(0,0,0);
fdrawline(vec1[0], vec1[1], vec2[0], vec2[1]);
}
@@ -628,7 +566,6 @@
else if(block->dobounds == 2) ui_text_bounds_block(block, 0.0f);
else if(block->dobounds) ui_popup_bounds_block(C, block, (block->dobounds == 4));
- if(block->autofill) ui_autofill(block);
if(block->minx==0.0 && block->maxx==0.0) uiBoundsBlock(block, 0);
if(block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block);
@@ -1788,7 +1725,7 @@
}
}
-uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, short font)
+uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, short dt)
{
ListBase *lb;
uiBlock *block, *oldblock= NULL;
@@ -1814,6 +1751,7 @@
block= MEM_callocN(sizeof(uiBlock), "uiBlock");
block->oldblock= oldblock;
block->active= 1;
+ block->dt= dt;
/* at the beginning of the list! for dynamical menus/blocks */
if(lb)
@@ -1821,9 +1759,6 @@
BLI_strncpy(block->name, name, sizeof(block->name));
- block->dt= dt;
- block->themecol= TH_AUTO;
-
/* window matrix and aspect */
if(region->swinid) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list