[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37300] branches/soc-2011-avocado/blender: Code Review and mentoring commit:

Andrea Weikert elubie at gmx.net
Tue Jun 7 19:21:57 CEST 2011


Revision: 37300
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37300
Author:   elubie
Date:     2011-06-07 17:21:56 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
Code Review and mentoring commit:
1. We shouldn't change the Eigen3 library, otherwise we will have to redo all the changes each time we want to update to a newer version.
2. Added GPL headers
3. Removed code that was commented out. We usually don't leave commented code in, it clutters the code and the code is in svn anyway
4. Made a few suggestions for better naming and small things, search for TODO_SHUVRO in the files

Modified Paths:
--------------
    branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
    branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
    branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h
    branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.cpp
    branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.h
    branches/soc-2011-avocado/blender/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
    branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.h

Modified: branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
===================================================================
--- branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse	2011-06-07 17:21:56 UTC (rev 37300)
@@ -15,9 +15,9 @@
 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
 #endif
 
-/*#ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
+#ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
 #error The sparse module API is not stable yet. To use it anyway, please define the EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET preprocessor token.
-#endif*/
+#endif
 
 namespace Eigen {
 

Modified: branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
===================================================================
--- branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp	2011-06-07 17:21:56 UTC (rev 37300)
@@ -1,3 +1,31 @@
+/* $Id: 
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2011 by Shuvro Sarker.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Shuvro Sarker
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
 #include <Eigen/Core>
 #include <Eigen/Dense>
 #include <Eigen/Eigenvalues> 

Modified: branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h
===================================================================
--- branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h	2011-06-07 17:21:56 UTC (rev 37300)
@@ -1,3 +1,31 @@
+/* $Id: 
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2011 by Shuvro Sarker.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Shuvro Sarker
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
 #ifndef DUMMY_CLASS_H_INCLUDED
 #define DUMMY_CLASS_H_INCLUDED
 
@@ -3,10 +31,11 @@
 #include <Eigen/Core>
 
-
+// XXXXX TODO_SHUVRO: Shouldn't we find a better name for this?
 class DummyClass
 {
 	public:
 		DummyClass();
 		
+		// XXXXX TODO_SHUVRO: remove the functions below that are not needed anymore
 		void solve3x3(float *vec);
 		void get_solution(float *vec);

Modified: branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.cpp
===================================================================
--- branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.cpp	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.cpp	2011-06-07 17:21:56 UTC (rev 37300)
@@ -1,3 +1,30 @@
+/* $Id: 
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2011 by Shuvro Sarker.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Shuvro Sarker
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 
 #include "DummyClass.h"
 #include "autoseam_C_API.h"

Modified: branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.h
===================================================================
--- branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.h	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/intern/autoseam/autoseam_C_API.h	2011-06-07 17:21:56 UTC (rev 37300)
@@ -1,3 +1,30 @@
+/* $Id: 
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2011 by Shuvro Sarker.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Shuvro Sarker
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 #ifndef AUTOSEAM_C_API_INCLUDED
 #define AUTOSEAM_C_API_INCLUDED
 
@@ -14,6 +41,7 @@
 AUTOSEAM_DummyClassHandle autoseam_create_dummyclass();
 void autoseam_delete_dummyclass(AUTOSEAM_DummyClassHandle handle);
 
+// XXXXX TODO_SHUVRO: remove the functions below that are not needed anymore
 void autoseam_solve3x3(AUTOSEAM_DummyClassHandle handle, float* vec);
 void autoseam_get_solution(AUTOSEAM_DummyClassHandle handle, float* vec);
 

Modified: branches/soc-2011-avocado/blender/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- branches/soc-2011-avocado/blender/source/blender/blenkernel/CMakeLists.txt	2011-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/source/blender/blenkernel/CMakeLists.txt	2011-06-07 17:21:56 UTC (rev 37300)
@@ -152,11 +152,9 @@
 	intern/writeavi.c
 	intern/writeffmpeg.c
 	intern/writeframeserver.c
-#	intern/demo.c
 	
 	BKE_DerivedMesh.h
 	BKE_action.h
-#	BKE_demo.h
 	BKE_anim.h
 	BKE_animsys.h
 	BKE_armature.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-06-07 16:47:25 UTC (rev 37299)
+++ branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c	2011-06-07 17:21:56 UTC (rev 37300)
@@ -1,10 +1,30 @@
-//
-//  autoseam_tools.c
-//  Blender
-//
-//  Created by Shuvro Sarker on 6/6/11.
-//  
-//
+ /* $Id: automesh_tools.c
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2011 by Shuvro Sarker.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Shuvro Sarker
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 
 #include "autoseam_tools.h"
 #include "autoseam_C_API.h"
@@ -25,13 +45,11 @@
 #include "BKE_cdderivedmesh.h"
 #include "BKE_depsgraph.h"
 #include "BKE_global.h"
-//#include "BKE_library.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
 #include "BKE_bmesh.h"
 #include "BKE_report.h"
 #include "BKE_tessmesh.h"
-//#include "BKE_texture.h"
 #include "BKE_main.h"
 
 #include "ED_screen.h"
@@ -83,8 +101,7 @@
     }
     
     calculate_eigen(dummy_dual_graph, 10);
-    
-    //free(dummy_dual_graph);
+
     MEM_freeN(dummy_dual_graph);
     return 0;
 }
@@ -93,18 +110,16 @@
 static int editbmesh_gen_seam(bContext *C, wmOperator *op)
 {
     Object *obedit= CTX_data_edit_object(C);
-	//Mesh *me= ((Mesh *)obedit->data);
+
 	BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
 	BMesh *bm = em->bm;
-	//BMEdge *eed;
-	//BMIter iter;
-    
+
     compute_dual_graph(bm);
     printf("exec is working ...\n");
     return 0;
 }
 
-
+/* XXXXX TODO_SHUVRO: name this MESH_OT_generate */
 void MESH_OT_gen_seam(wmOperatorType *ot)
 {
 	/* identifiers */
@@ -136,23 +151,7 @@
 
 void calculate_eigen(float **dual_graph, int dimension)
 {
-//    int i,j,k;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list