Revision: 40858
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40858
Author:   psy-fi
Date:     2011-10-08 17:28:37 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
comment work, nothing yet

Modified Paths:
--------------
    
branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c

Modified: 
branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
===================================================================
--- 
branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
    2011-10-08 14:53:13 UTC (rev 40857)
+++ 
branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/sculpt_uv.c
    2011-10-08 17:28:37 UTC (rev 40858)
@@ -17,15 +17,18 @@
  * along with this program; if not, write to the Free Software  Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
+ * The Original Code is Copyright (C) Blender Foundation, 2002-2009
+ * All rights reserved.
+ *
  * Contributor(s): Antony Riakiotakis
  *
  * ***** END GPL LICENSE BLOCK *****
  *
- * UV Brush tools (currently smoothing only)
+ * UV Sculpt tools
  *
  */
 
-/** \file blender/editors/sculpt_paint/paint_uv.c
+/** \file blender/editors/sculpt_paint/sculpt_uv.c
  *  \ingroup edsculpt
  */
 
@@ -136,9 +139,9 @@
 }UvSculptData;
 
 /*********** Improved Laplacian Relaxation Operator ************************/
-/* Original code by Raul "farsthary"
- * adapted to uv smoothing by Antony Riakiatakis
- */
+/* Original code by Raul Fernandez Hernandez "farsthary"                   *
+ * adapted to uv smoothing by Antony Riakiatakis                           *
+ ***************************************************************************/
 
 typedef struct Temp_UvData{
        float sum_co[2], p[2], b[2], sum_b[2];
@@ -305,6 +308,9 @@
        radius = radius*radius;
        radius_root = sqrt(radius);
 
+       /*
+        * Pinch Tool
+        */
        if(tool == UV_SCULPT_TOOL_PINCH){
                int i;
                alpha *= invert;
@@ -337,6 +343,10 @@
                        }
                }
        }
+
+       /*
+        * Smooth Tool
+        */
        else if(tool == UV_SCULPT_TOOL_RELAX){
                unsigned int method = 
CTX_data_scene(C)->toolsettings->uv_relax_method;
                if(method == UV_SCULPT_TOOL_RELAX_HC){
@@ -344,7 +354,12 @@
                }else{
                        laplacian_relaxation_iteration_uv(em, sculptdata, co, 
alpha, radius, aspectRatio);
                }
-       }else if(tool == UV_SCULPT_TOOL_GRAB){
+       }
+
+       /*
+        * Grab Tool
+        */
+       else if(tool == UV_SCULPT_TOOL_GRAB){
                int i;
                float diff[2];
                sub_v2_v2v2(diff, co, sculptdata->initial_stroke->init_coord);

Modified: 
branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c 
2011-10-08 14:53:13 UTC (rev 40857)
+++ branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_ops.c 
2011-10-08 17:28:37 UTC (rev 40858)
@@ -2339,6 +2339,7 @@
                        preview->previewUnstitchable = (float 
*)MEM_mallocN(preview->numOfUnstitchable*sizeof(float)*4, 
"stitch_preview_unstichable_data");
                }
 
+               /* will cause cancel and freeing of all data structures so OK */
                if(!preview->previewQuads || !preview->previewTris || 
!preview->previewStitchable || !preview->previewUnstitchable){
                        return 0;
                }
@@ -2476,6 +2477,9 @@
                        }
                }
 
+               /****************************************************
+                *  Calculate Island translation/rotation if needed *
+                ****************************************************/
                if(state->snapIslands){
                        stitch_calculate_island_snapping(state, preview, 
island_stitch_data, final);
                }
@@ -2568,6 +2572,7 @@
        if(RNA_property_is_set(op->ptr, "selection")){
                int uniqueIndex;
                RNA_BEGIN(op->ptr, itemptr, "selection") {
+                       /* This should change for redo */
                        uniqueIndex = stitch_state->map[RNA_int_get(&itemptr, 
"index")];
                        if(!(stitch_state->uvs[uniqueIndex]->flag & 
STITCH_SELECTED)){
                                
stitch_state->selection_stack[stitch_state->selection_size++] = 
stitch_state->uvs[uniqueIndex];

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

Reply via email to