[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37666] branches/soc-2011-onion/source/ blender: a few comment changes plus error margin for uv unwrapper warning print
Antony Riakiotakis
kalast at gmail.com
Mon Jun 20 16:32:36 CEST 2011
Revision: 37666
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37666
Author: psy-fi
Date: 2011-06-20 14:32:36 +0000 (Mon, 20 Jun 2011)
Log Message:
-----------
a few comment changes plus error margin for uv unwrapper warning print
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h 2011-06-20 13:04:11 UTC (rev 37665)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h 2011-06-20 14:32:36 UTC (rev 37666)
@@ -60,6 +60,8 @@
#define TF_PIN_MASK(id) (TF_PIN1 << id)
#define TF_SEL_MASK(id) (TF_SEL1 << id)
+/* margin for scale to differ from 1.0 for printing debug info */
+#define UNWRAP_SCALE_EPSILON 0.0001
/* geometric utilities */
void uv_center(float uv[][2], float cent[2], int quad);
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c 2011-06-20 13:04:11 UTC (rev 37665)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c 2011-06-20 14:32:36 UTC (rev 37666)
@@ -1137,6 +1137,7 @@
/* Previewer stuff (see uvedit_intern.h for more info) */
static StitchPreviewer *_stitch_preview;
+/* constructor */
static StitchPreviewer * stitch_preview_init(void)
{
_stitch_preview = MEM_mallocN(sizeof(StitchPreviewer), "stitch_previewer");
@@ -1145,6 +1146,7 @@
return _stitch_preview;
}
+/* destructor...yeah this should be C++ :) */
static void stitch_preview_delete(void)
{
if(_stitch_preview)
@@ -1164,11 +1166,14 @@
}
}
+
+/* getter method */
StitchPreviewer *uv_get_stitch_previewer(void)
{
return _stitch_preview;
}
+
static void stitch_update_header(StitchState *stitch_state, bContext *C)
{
static char str[] = "%c V(ertices) %c E(dges) %c P(review) %c L(imit) %c S(nap) Wheel(limit adjust): %f";
@@ -1285,7 +1290,7 @@
tf->uv[iterv->tfindex][0]= newuv[0];
tf->uv[iterv->tfindex][1]= newuv[1];
}
- if(preview->enabled){
+ if(preview->enabled && !final){
}
}
@@ -1357,11 +1362,12 @@
}
}
+ /* allocate preview for selected vertices */
if(preview->enabled && !final){
preview->previewQuads = (float *)MEM_mallocN(preview->numOfQuads*sizeof(float)*8, "quad_uv_stitch_prev");
preview->previewTris = (float *)MEM_mallocN(preview->numOfTris*sizeof(float)*6, "tri_uv_stitch_prev");
}
- // apply uv welding
+ /* apply uv welding */
for(efa= em->faces.first; efa; efa= efa->next) {
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@@ -1513,13 +1519,10 @@
switch(event->type){
/* Cancel */
case ESCKEY:
+ case RIGHTMOUSE:
stitch_exit(C, op);
return OPERATOR_CANCELLED;
- /* Select verts/edges*/
- case RIGHTMOUSE:
- return OPERATOR_RUNNING_MODAL;
-
case LEFTMOUSE:
case PADENTER:{
int returnValue;
@@ -1554,6 +1557,9 @@
/* Use vertex selection */
case VKEY:
+ if(event->val == KM_PRESS){
+
+ }
return OPERATOR_RUNNING_MODAL;
/* turn preview on/off */
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c 2011-06-20 13:04:11 UTC (rev 37665)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_unwrap_ops.c 2011-06-20 14:32:36 UTC (rev 37666)
@@ -1136,8 +1136,9 @@
return OPERATOR_CANCELLED;
}
- if(obedit->size[0] != 1.0 || obedit->size[1] != 1.0 || obedit->size[2] != 1.0 ||
- obedit->dsize[0] != 1.0 || obedit->dsize[1] != 1.0 || obedit->dsize[2] != 1.0){
+ if(fabs(obedit->size[0] - 1.0) >= UNWRAP_SCALE_EPSILON || fabs(obedit->size[1] - 1.0) >= UNWRAP_SCALE_EPSILON ||
+ fabs(obedit->size[2] - 1.0) >= UNWRAP_SCALE_EPSILON || fabs(obedit->dsize[0] - 1.0) >= UNWRAP_SCALE_EPSILON ||
+ fabs(obedit->dsize[1] - 1.0) >= UNWRAP_SCALE_EPSILON || fabs(obedit->dsize[2] - 1.0) >= UNWRAP_SCALE_EPSILON){
BKE_report(op->reports, RPT_WARNING, "Object scale is not 1.0. Unwrap will operate on a non-scaled version of the mesh.");
}
Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c 2011-06-20 13:04:11 UTC (rev 37665)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c 2011-06-20 14:32:36 UTC (rev 37666)
@@ -2594,7 +2594,7 @@
prop= RNA_def_property(srna, "use_highres_tex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hirestex", 1);
- RNA_def_property_ui_text(prop, "High Resolution Float Textures", "Use 16 bit texture for float images.");
+ RNA_def_property_ui_text(prop, "High Resolution Float Textures", "Use 16 bit per component texture for float images.");
RNA_def_property_update(prop, 0, "rna_userdef_gl_use_texture_highres");
prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
More information about the Bf-blender-cvs
mailing list