Revision: 42470
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42470
Author:   dingto
Date:     2011-12-06 21:25:46 +0000 (Tue, 06 Dec 2011)
Log Message:
-----------
Tile Branch:
* Some UI cleanup of the Viewer Center Buttons + naming fixes.
* Fixing some align booleans in the UI code, there is only 0 and 1. 

ToDo: Do not re composite when changing the center value.

Modified Paths:
--------------
    branches/tile/source/blender/editors/space_node/drawnode.c
    branches/tile/source/blender/makesrna/intern/rna_nodetree.c

Modified: branches/tile/source/blender/editors/space_node/drawnode.c
===================================================================
--- branches/tile/source/blender/editors/space_node/drawnode.c  2011-12-06 
20:47:57 UTC (rev 42469)
+++ branches/tile/source/blender/editors/space_node/drawnode.c  2011-12-06 
21:25:46 UTC (rev 42470)
@@ -1816,10 +1816,10 @@
 static void node_composit_buts_boxmask(uiLayout *layout, bContext *UNUSED(C), 
PointerRNA *ptr)
 {
        uiLayout *row;
-       row= uiLayoutRow(layout, 2);
+       row= uiLayoutRow(layout, 1);
        uiItemR(row, ptr, "x", 0, NULL, ICON_NONE);
        uiItemR(row, ptr, "y", 0, NULL, ICON_NONE);
-       row= uiLayoutRow(layout, 2);
+       row= uiLayoutRow(layout, 1);
        uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
@@ -1941,10 +1941,10 @@
 static void node_composit_buts_ellipsemask(uiLayout *layout, bContext 
*UNUSED(C), PointerRNA *ptr)
 {
        uiLayout *row;
-       row= uiLayoutRow(layout, 2);
+       row= uiLayoutRow(layout, 1);
        uiItemR(row, ptr, "x", 0, NULL, ICON_NONE);
        uiItemR(row, ptr, "y", 0, NULL, ICON_NONE);
-       row= uiLayoutRow(layout, 2);
+       row= uiLayoutRow(layout, 1);
        uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
        uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
@@ -1953,10 +1953,13 @@
 }
 static void node_composit_buts_viewer_but(uiLayout *layout, bContext 
*UNUSED(C), PointerRNA *ptr)
 {
+       uiLayout *col;
+       
        uiItemR(layout, ptr, "tileorder", 0, NULL, ICON_NONE);
        if (RNA_enum_get(ptr, "tileorder")==0) {
-               uiItemR(layout, ptr, "centerx", 0, NULL, ICON_NONE);
-               uiItemR(layout, ptr, "centery", 0, NULL, ICON_NONE);
+               col= uiLayoutColumn(layout, 1);
+               uiItemR(col, ptr, "center_x", 0, NULL, ICON_NONE);
+               uiItemR(col, ptr, "center_y", 0, NULL, ICON_NONE);
        }
 }
 

Modified: branches/tile/source/blender/makesrna/intern/rna_nodetree.c
===================================================================
--- branches/tile/source/blender/makesrna/intern/rna_nodetree.c 2011-12-06 
20:47:57 UTC (rev 42469)
+++ branches/tile/source/blender/makesrna/intern/rna_nodetree.c 2011-12-06 
21:25:46 UTC (rev 42470)
@@ -1584,11 +1584,11 @@
 {
        PropertyRNA *prop;
        static EnumPropertyItem tileorder_items[] = {
-                       {0, "CENTEROUT", 0, "Center", "Expand from center"},
+               {0, "CENTEROUT", 0, "Center", "Expand from center"},
                {1, "RANDOM", 0, "Random", "Random tiles"},
                {2, "BOTTOMUP", 0, "Bottom up", "Expand from bottom"},
                {3, "RULE_OF_THIRDS", 0, "Rule of thirds", "Expand from 9 
places"},
-                       {0, NULL, 0, NULL, NULL}};
+               {0, NULL, 0, NULL, NULL}};
 
        prop = RNA_def_property(srna, "tileorder", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "custom1");
@@ -1596,18 +1596,18 @@
        RNA_def_property_ui_text(prop, "Tile order", "tile order");
        RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
 
-       prop = RNA_def_property(srna, "centerx", PROP_FLOAT, PROP_NONE);
+       prop = RNA_def_property(srna, "center_x", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "custom3");
        RNA_def_property_float_default(prop, 0.5f);
        RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "centerX", "");
+       RNA_def_property_ui_text(prop, "X", "");
        RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-       prop = RNA_def_property(srna, "centery", PROP_FLOAT, PROP_NONE);
-
+       
+       prop = RNA_def_property(srna, "center_y", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "custom4");
        RNA_def_property_float_default(prop, 0.5f);
        RNA_def_property_range(prop, 0.0f, 1.0f);
-       RNA_def_property_ui_text(prop, "centerY", "");
+       RNA_def_property_ui_text(prop, "Y", "");
        RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
 }
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to