[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39566] branches/soc-2011-avocado/blender/ source/blender: Bug fix in tool optimization.

shuvro sarker shuvro05 at gmail.com
Sat Aug 20 07:41:17 CEST 2011


Revision: 39566
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39566
Author:   shuvro
Date:     2011-08-20 05:41:16 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Bug fix in tool optimization. Now after canceling the operator when it is executed again, it calculates the seam and the sucessive execution of the operator always look for the change of necessary parameters related to seam calculation in order to run the seam calculation functions again.

Modified Paths:
--------------
    branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
    branches/soc-2011-avocado/blender/source/blender/makesdna/DNA_scene_types.h

Modified: branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
===================================================================
--- branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c	2011-08-20 01:47:08 UTC (rev 39565)
+++ branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c	2011-08-20 05:41:16 UTC (rev 39566)
@@ -645,10 +645,17 @@
 	BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
 	BMesh *bm = em->bm;
 	
-
+	int is_new_execution = (scene->toolsettings->autoseam_data.recursion_depth  == maxdepth) &&
+						   (scene->toolsettings->autoseam_data.is_combinatorial == is_combinatorial) &&
+						   (scene->toolsettings->autoseam_data.stretch_type     == stretch_algo) &&
+						   (scene->toolsettings->autoseam_data.method           == method) &&
+						   (scene->toolsettings->autoseam_data.fill_holes       == fill_holes) &&
+						   (scene->toolsettings->autoseam_data.correct_aspect   == correct_aspect) &&
+						   (scene->toolsettings->autoseam_data.is_live_unwrap   == is_live_unwrap);
 	
+	//printf("Is new execution value : %d\n", is_new_execution);
 	
-	if((scene->toolsettings->autoseam_data.recursion_depth != maxdepth) || (scene->toolsettings->autoseam_data.is_combinatorial != is_combinatorial) || (scene->toolsettings->autoseam_data.stretch_type != stretch_algo))
+	if((scene->toolsettings->autoseam_data.recursion_depth != maxdepth) || (scene->toolsettings->autoseam_data.is_combinatorial != is_combinatorial) || (scene->toolsettings->autoseam_data.stretch_type != stretch_algo) || is_new_execution)
 	{
 		AUTOSEAM_Adjacency adj;
 		if(!(bm->totfacesel)) {
@@ -682,11 +689,18 @@
 	
 	}
 	
+
+	
 	scene->toolsettings->autoseam_data.recursion_depth  = maxdepth;
 	scene->toolsettings->autoseam_data.is_combinatorial = is_combinatorial;
 	scene->toolsettings->autoseam_data.stretch_type     = stretch_algo;
+	
+	scene->toolsettings->autoseam_data.method           = method;
+	scene->toolsettings->autoseam_data.fill_holes       = fill_holes;
+	scene->toolsettings->autoseam_data.correct_aspect   = correct_aspect;
+	
+	scene->toolsettings->autoseam_data.is_live_unwrap   = is_live_unwrap;
 
-
 	
 	/* If live unwrapping enable, unwrap the seams after marking */
 	if(is_live_unwrap){

Modified: branches/soc-2011-avocado/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- branches/soc-2011-avocado/blender/source/blender/makesdna/DNA_scene_types.h	2011-08-20 01:47:08 UTC (rev 39565)
+++ branches/soc-2011-avocado/blender/source/blender/makesdna/DNA_scene_types.h	2011-08-20 05:41:16 UTC (rev 39566)
@@ -613,8 +613,9 @@
 	int fill_holes;
 	int correct_aspect;
 	
-	int live_unwrap;
+	int is_live_unwrap;
 	float margin;
+	
 
 
 } AutoseamData;




More information about the Bf-blender-cvs mailing list