[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37429] trunk/blender/source/blender/ editors/space_image/image_buttons.c: 2.5 Image Buttons:

Thomas Dinges blender at dingto.org
Sun Jun 12 13:03:21 CEST 2011


Revision: 37429
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37429
Author:   dingto
Date:     2011-06-12 11:03:21 +0000 (Sun, 12 Jun 2011)
Log Message:
-----------
2.5 Image Buttons:
* Code cleanup, removed some unnecessary code. 

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_image/image_buttons.c

Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_buttons.c	2011-06-12 10:24:47 UTC (rev 37428)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c	2011-06-12 11:03:21 UTC (rev 37429)
@@ -662,7 +662,6 @@
 
 	block= uiLayoutGetBlock(layout);
 
-
 	imaptr= RNA_property_pointer_get(ptr, prop);
 	ima= imaptr.data;
 	iuser= userptr->data;
@@ -719,21 +718,17 @@
 			}
 		}
 		else {
-			row= uiLayoutRow(layout, 0);
-			uiItemR(row, &imaptr, "source", 0, NULL, ICON_NONE);
+			uiItemR(layout, &imaptr, "source", 0, NULL, ICON_NONE);
 
 			if(ima->source != IMA_SRC_GENERATED) {
 				row= uiLayoutRow(layout, 1);
-				split = uiLayoutSplit(row, 0.0, 0);
 				if (ima->packedfile)
-					uiItemO(split, "", ICON_PACKAGE, "image.unpack");
+					uiItemO(row, "", ICON_PACKAGE, "image.unpack");
 				else
-					uiItemO(split, "", ICON_UGLYPACKAGE, "image.pack");
+					uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack");
 				
-				split = uiLayoutSplit(row, 0.0, 0);
-				row= uiLayoutRow(split, 1);
+				row= uiLayoutRow(row, 0);
 				uiLayoutSetEnabled(row, ima->packedfile==NULL);
-				
 				uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE);
 				uiItemO(row, "", ICON_FILE_REFRESH, "image.reload");
 			}
@@ -771,11 +766,10 @@
 					col= uiLayoutColumn(split, 0);
 					uiItemR(col, &imaptr, "use_fields", 0, NULL, ICON_NONE);
 					row= uiLayoutRow(col, 0);
-					uiItemR(row, &imaptr, "field_order", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 					uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields"));
-
-					col= uiLayoutColumn(split, 0);
-					uiItemR(col, &imaptr, "use_premultiply", 0, NULL, ICON_NONE);
+					uiItemR(row, &imaptr, "field_order", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+					
+					uiItemR(split, &imaptr, "use_premultiply", 0, NULL, ICON_NONE);
 				}
 			}
 
@@ -809,8 +803,7 @@
 				uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE);
 				uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE);
 
-				col= uiLayoutColumn(split, 0);
-				uiItemR(col, &imaptr, "generated_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+				uiItemR(split, &imaptr, "generated_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
 			}
 
 					}




More information about the Bf-blender-cvs mailing list