[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36094] trunk/blender: fix for one of the [#26854] UV issues
Campbell Barton
ideasman42 at gmail.com
Mon Apr 11 02:49:08 CEST 2011
Revision: 36094
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36094
Author: campbellbarton
Date: 2011-04-11 00:49:08 +0000 (Mon, 11 Apr 2011)
Log Message:
-----------
fix for one of the [#26854] UV issues
- add back UV X/Y number buttons, the report points out they are missing.
- set the 2D cursor's subtype to PROP_COORDS (so buttons say x/y now)
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/space_image.py
trunk/blender/source/blender/editors/animation/keyframing.c
trunk/blender/source/blender/editors/space_image/image_buttons.c
trunk/blender/source/blender/makesrna/intern/rna_access.c
trunk/blender/source/blender/makesrna/intern/rna_space.c
Modified: trunk/blender/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_image.py 2011-04-11 00:09:56 UTC (rev 36093)
+++ trunk/blender/release/scripts/startup/bl_ui/space_image.py 2011-04-11 00:49:08 UTC (rev 36094)
@@ -607,7 +607,9 @@
if show_uvedit:
col = layout.column()
- col.prop(uvedit, "cursor_location")
+ col.label("Cursor Location")
+ row = col.row()
+ row.prop(uvedit, "cursor_location", text="")
col = layout.column()
col.label(text="UVs:")
Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c 2011-04-11 00:09:56 UTC (rev 36093)
+++ trunk/blender/source/blender/editors/animation/keyframing.c 2011-04-11 00:49:08 UTC (rev 36094)
@@ -916,7 +916,7 @@
/* for Loc/Rot/Scale and also Color F-Curves, the color of the F-Curve in the Graph Editor,
* is determined by the array index for the F-Curve
*/
- if (ELEM4(RNA_property_subtype(prop), PROP_TRANSLATION, PROP_XYZ, PROP_EULER, PROP_COLOR)) {
+ if (ELEM5(RNA_property_subtype(prop), PROP_TRANSLATION, PROP_XYZ, PROP_EULER, PROP_COLOR, PROP_COORDS)) {
fcu->color_mode= FCURVE_COLOR_AUTO_RGB;
}
}
Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_buttons.c 2011-04-11 00:09:56 UTC (rev 36093)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c 2011-04-11 00:49:08 UTC (rev 36094)
@@ -255,16 +255,10 @@
ocent[1] *= imy;
}
- //uiBlockBeginAlign(block);
- if(nactive==1) {
- uiDefButF(block, NUM, B_TRANS_IMAGE, "Vertex X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, "");
- uiDefButF(block, NUM, B_TRANS_IMAGE, "Vertex Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, "");
- }
- else {
- uiDefButF(block, NUM, B_TRANS_IMAGE, "Median X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, "");
- uiDefButF(block, NUM, B_TRANS_IMAGE, "Median Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, "");
- }
- //uiBlockEndAlign(block);
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_TRANS_IMAGE, "X:", 10, 10, 145, 19, &ocent[0], -10*imx, 10.0*imx, step, digits, "");
+ uiDefButF(block, NUM, B_TRANS_IMAGE, "Y:", 165, 10, 145, 19, &ocent[1], -10*imy, 10.0*imy, step, digits, "");
+ uiBlockEndAlign(block);
}
}
else { // apply event
@@ -993,16 +987,6 @@
{
PanelType *pt;
- /* editvertex_buts not working atm */
- if(0) {
- pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv");
- strcpy(pt->idname, "IMAGE_PT_uv");
- strcpy(pt->label, "UV");
- pt->draw= image_panel_uv;
- pt->poll= image_panel_uv_poll;
- BLI_addtail(&art->paneltypes, pt);
- }
-
pt= MEM_callocN(sizeof(PanelType), "spacetype image panel curves");
strcpy(pt->idname, "IMAGE_PT_curves");
strcpy(pt->label, "Curves");
@@ -1016,6 +1000,13 @@
strcpy(pt->label, "Grease Pencil");
pt->draw= gpencil_panel_standard;
BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype image panel uv");
+ strcpy(pt->idname, "IMAGE_PT_uv");
+ strcpy(pt->label, "UV Vertex");
+ pt->draw= image_panel_uv;
+ pt->poll= image_panel_uv_poll;
+ BLI_addtail(&art->paneltypes, pt);
}
static int image_properties(bContext *C, wmOperator *UNUSED(op))
Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_access.c 2011-04-11 00:09:56 UTC (rev 36093)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c 2011-04-11 00:49:08 UTC (rev 36094)
@@ -766,7 +766,7 @@
/* get string to use for array index */
if ((index < 4) && ELEM(subtype, PROP_QUATERNION, PROP_AXISANGLE))
return quatitem[index];
- else if((index < 4) && ELEM7(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_XYZ_LENGTH, PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
+ else if((index < 4) && ELEM8(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_XYZ_LENGTH, PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION, PROP_COORDS))
return vectoritem[index];
else if ((index < 4) && ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA))
return coloritem[index];
Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-04-11 00:09:56 UTC (rev 36093)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c 2011-04-11 00:49:08 UTC (rev 36094)
@@ -902,7 +902,7 @@
RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
- prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", "rna_SpaceImageEditor_cursor_location_set", NULL);
RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
More information about the Bf-blender-cvs
mailing list