[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50396] trunk/blender/source/blender: stule cleanup

Campbell Barton ideasman42 at gmail.com
Tue Sep 4 20:47:09 CEST 2012


Revision: 50396
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50396
Author:   campbellbarton
Date:     2012-09-04 18:47:08 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
stule cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
    trunk/blender/source/blender/compositor/intern/COM_compositor.cpp
    trunk/blender/source/blender/editors/include/UI_interface.h
    trunk/blender/source/blender/editors/interface/interface_layout.c
    trunk/blender/source/blender/editors/interface/interface_templates.c
    trunk/blender/source/blender/editors/io/io_collada.c
    trunk/blender/source/blender/editors/mesh/editmesh_knife.c
    trunk/blender/source/blender/editors/space_clip/clip_toolbar.c
    trunk/blender/source/blender/editors/space_logic/logic_window.c
    trunk/blender/source/blender/editors/space_node/drawnode.c
    trunk/blender/source/blender/editors/space_node/node_buttons.c
    trunk/blender/source/blender/editors/space_node/node_templates.c
    trunk/blender/source/blender/editors/space_view3d/view3d_toolbar.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp	2012-09-04 18:47:08 UTC (rev 50396)
@@ -120,8 +120,7 @@
 
 int COM_isHighlightedbNode(bNode *bnode)
 {
-	if (!g_highlightInitialized)
-	{
+	if (!g_highlightInitialized) {
 		return false;
 	}
 	
@@ -129,7 +128,7 @@
 		return false;
 	}
 
-	for (int i = 0 ; i < MAX_HIGHLIGHT; i++) {
+	for (int i = 0; i < MAX_HIGHLIGHT; i++) {
 		void *p = g_highlightedNodesRead[i];
 		if (!p) return false;
 		if (p == bnode) return true;
@@ -409,14 +408,12 @@
 	/* deinitialize highlighting */
 	if (g_highlightInitialized) {
 		g_highlightInitialized = false;
-		if (g_highlightedNodes) 
-		{
+		if (g_highlightedNodes) {
 			MEM_freeN(g_highlightedNodes);
 			g_highlightedNodes = NULL;
 		}
 
-		if (g_highlightedNodesRead) 
-		{
+		if (g_highlightedNodesRead) {
 			MEM_freeN(g_highlightedNodesRead);
 			g_highlightedNodesRead = NULL;
 		}

Modified: trunk/blender/source/blender/compositor/intern/COM_compositor.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_compositor.cpp	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/compositor/intern/COM_compositor.cpp	2012-09-04 18:47:08 UTC (rev 50396)
@@ -68,7 +68,7 @@
 	/* set progress bar to 0% and status to init compositing */
 	editingtree->progress(editingtree->prh, 0.0);
 
-	bool twopass = (editingtree->flag&NTREE_TWO_PASS) > 0 && !rendering;
+	bool twopass = (editingtree->flag & NTREE_TWO_PASS) > 0 && !rendering;
 	/* initialize execution system */
 	if (twopass) {
 		ExecutionSystem *system = new ExecutionSystem(rd, editingtree, rendering, twopass);
@@ -93,8 +93,7 @@
 
 void COM_freeCaches() 
 {
-	if (is_compositorMutex_init)
-	{
+	if (is_compositorMutex_init) {
 		BLI_mutex_lock(&s_compositorMutex);
 		intern_freeCompositorCaches();
 		BLI_mutex_unlock(&s_compositorMutex);

Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/include/UI_interface.h	2012-09-04 18:47:08 UTC (rev 50396)
@@ -745,7 +745,9 @@
 void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr);
 void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context);
 const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing
-void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag);
+void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op,
+                          int (*check_prop)(struct PointerRNA *, struct PropertyRNA *),
+                          const char label_align, const short flag);
 struct MenuType *uiButGetMenuType(uiBut *but);
 
 void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c	2012-09-04 18:47:08 UTC (rev 50396)
@@ -2837,7 +2837,9 @@
 }
 
 /* this function does not initialize the layout, functions can be called on the layout before and after */
-void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag)
+void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,
+                          int (*check_prop)(struct PointerRNA *, struct PropertyRNA *),
+                          const char label_align, const short flag)
 {
 	if (!op->properties) {
 		IDPropertyTemplate val = {0};

Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c	2012-09-04 18:47:08 UTC (rev 50396)
@@ -1024,7 +1024,7 @@
 	uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco + 10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
 
 	if (con->flag & CONSTRAINT_DISABLE)
-		uiLayoutSetRedAlert(row, 1);
+		uiLayoutSetRedAlert(row, TRUE);
 	
 	if (proxy_protected == 0) {
 		uiItemR(row, &ptr, "name", 0, "", ICON_NONE);
@@ -1032,7 +1032,7 @@
 	else
 		uiItemL(row, con->name, ICON_NONE);
 	
-	uiLayoutSetRedAlert(row, 0);
+	uiLayoutSetRedAlert(row, FALSE);
 	
 	/* proxy-protected constraints cannot be edited, so hide up/down + close buttons */
 	if (proxy_protected) {
@@ -1200,7 +1200,7 @@
 	block = uiLayoutGetBlock(layout);
 	row = uiLayoutRow(layout, FALSE);
 	col = uiLayoutColumn(row, FALSE);
-	uiLayoutSetKeepAspect(col, 1);
+	uiLayoutSetKeepAspect(col, TRUE);
 	
 	/* add preview */
 	uiDefBut(block, BUT_EXTRA, 0, "", 0, 0, UI_UNIT_X * 6, UI_UNIT_Y * 6, pid, 0.0, 0.0, 0, 0, "");
@@ -1894,7 +1894,7 @@
 	}
 
 	if (cmp) {
-		uiLayoutColumn(layout, TRUE);
+		uiLayoutRow(layout, TRUE);
 		uiBlockSetNFunc(block, curvemap_buttons_update, NULL, cumap);
 		uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->x, 0.0f, 1.0f, 1, 5, "");
 		uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->y, 0.0f, 1.0f, 1, 5, "");
@@ -2205,7 +2205,7 @@
 		row = uiLayoutRow(split, TRUE);
 		if (i == 0 || (key->type != KEY_RELATIVE)) uiItemL(row, "", ICON_NONE);
 		else uiItemR(row, itemptr, "value", 0, "", ICON_NONE);
-		uiItemR(row, itemptr, "mute", 0, "", 0);
+		uiItemR(row, itemptr, "mute", 0, "", ICON_NONE);
 
 		if ((kb->flag & KEYBLOCK_MUTE) ||
 		    (ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)))
@@ -2274,9 +2274,9 @@
 		uiBlockSetEmboss(block, UI_EMBOSSN);
 		row = uiLayoutRow(split, TRUE);
 		uiItemR(row, itemptr, "alpha", 0, "", ICON_NONE);
-		uiItemR(row, itemptr, "hide", 0, "", 0);
-		uiItemR(row, itemptr, "hide_select", 0, "", 0);
-		uiItemR(row, itemptr, "hide_render", 0, "", 0);
+		uiItemR(row, itemptr, "hide", 0, "", ICON_NONE);
+		uiItemR(row, itemptr, "hide_select", 0, "", ICON_NONE);
+		uiItemR(row, itemptr, "hide_render", 0, "", ICON_NONE);
 
 		uiBlockSetEmboss(block, UI_EMBOSS);
 	}
@@ -2321,7 +2321,7 @@
 				while (id < prop_names_end) {
 					if ((id_next = strchr(id, ':'))) *id_next++ = '\0';
 					else id_next = prop_names_end;
-					uiItemR(row, itemptr, id, 0, NULL, 0);
+					uiItemR(row, itemptr, id, 0, NULL, ICON_NONE);
 					id = id_next;
 				}
 				MEM_freeN(prop_names);

Modified: trunk/blender/source/blender/editors/io/io_collada.c
===================================================================
--- trunk/blender/source/blender/editors/io/io_collada.c	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/io/io_collada.c	2012-09-04 18:47:08 UTC (rev 50396)
@@ -152,10 +152,10 @@
 
 	/* Export Options: */
 	box = uiLayoutBox(layout);
-	row = uiLayoutRow(box, 0);
+	row = uiLayoutRow(box, FALSE);
 	uiItemL(row, IFACE_("Export Data Options:"), ICON_MESH_DATA);
 
-	row = uiLayoutRow(box, 0);
+	row = uiLayoutRow(box, FALSE);
 	split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT);
 	col   = uiLayoutColumn(split, FALSE);
 	uiItemR(col, imfptr, "apply_modifiers", 0, NULL, ICON_NONE);

Modified: trunk/blender/source/blender/editors/mesh/editmesh_knife.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_knife.c	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/mesh/editmesh_knife.c	2012-09-04 18:47:08 UTC (rev 50396)
@@ -555,7 +555,7 @@
 }
 
 /* If there's a linehit connected (same face) as testi in range [firsti, lasti], return the first such, else -1.
-  * If testi is out of range, look for connection to f instead, if f is non-NULL */
+ * If testi is out of range, look for connection to f instead, if f is non-NULL */
 static int find_connected_linehit(KnifeTool_OpData *kcd, int testi, BMFace *f, int firsti, int lasti)
 {
 	int i;
@@ -563,9 +563,10 @@
 	for (i = firsti; i <= lasti; i++) {
 		if (testi >= 0 && testi < kcd->totlinehit) {
 			if (knife_find_common_face(&kcd->linehits[testi].kfe->faces,
-									   &kcd->linehits[i].kfe->faces))
+			                           &kcd->linehits[i].kfe->faces))
 				return i;
-		} else if (f) {
+		}
+		else if (f) {
 			if (find_ref(&kcd->linehits[i].kfe->faces, f))
 				return i;
 		}
@@ -582,9 +583,9 @@
 
 	/* for ranges of equal "l", swap if neccesary to make predecessor and
 	 * successor faces connected to the linehits at either end of the range */
-	for (i = 0; i < kcd->totlinehit -1; i = nexti) {
+	for (i = 0; i < kcd->totlinehit - 1; i = nexti) {
 		for (j = i + 1; j < kcd->totlinehit; j++) {
-			if (fabsf(kcd->linehits[j].l - kcd->linehits[i].l) > 80*FLT_EPSILON)
+			if (fabsf(kcd->linehits[j].l - kcd->linehits[i].l) > 80 * FLT_EPSILON)
 				break;
 		}
 		nexti = j;

Modified: trunk/blender/source/blender/editors/space_clip/clip_toolbar.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/clip_toolbar.c	2012-09-04 18:27:47 UTC (rev 50395)
+++ trunk/blender/source/blender/editors/space_clip/clip_toolbar.c	2012-09-04 18:47:08 UTC (rev 50396)
@@ -230,7 +230,7 @@
 	block = uiLayoutGetBlock(pa->layout);
 
 	if (!WM_operator_check_ui_enabled(C, op->type->name))
-		uiLayoutSetEnabled(pa->layout, 0);
+		uiLayoutSetEnabled(pa->layout, FALSE);
 
 	/* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */
 	uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op);

Modified: trunk/blender/source/blender/editors/space_logic/logic_window.c
===================================================================

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list