[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51466] trunk/blender/source/blender: style cleanup: comments

Campbell Barton ideasman42 at gmail.com
Sat Oct 20 22:20:03 CEST 2012


Revision: 51466
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51466
Author:   campbellbarton
Date:     2012-10-20 20:20:02 +0000 (Sat, 20 Oct 2012)
Log Message:
-----------
style cleanup: comments

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/brush.c
    trunk/blender/source/blender/blenkernel/intern/bvhutils.c
    trunk/blender/source/blender/blenkernel/intern/depsgraph.c
    trunk/blender/source/blender/blenkernel/intern/object.c
    trunk/blender/source/blender/blenkernel/intern/shrinkwrap.c
    trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
    trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c
    trunk/blender/source/blender/blenlib/intern/DLRB_tree.c
    trunk/blender/source/blender/blenlib/intern/freetypefont.c
    trunk/blender/source/blender/blenlib/intern/math_geom.c
    trunk/blender/source/blender/blenlib/intern/math_matrix.c
    trunk/blender/source/blender/blenlib/intern/math_rotation.c
    trunk/blender/source/blender/blenlib/intern/path_util.c
    trunk/blender/source/blender/blenlib/intern/storage.c
    trunk/blender/source/blender/blenloader/intern/versioning_250.c
    trunk/blender/source/blender/editors/armature/poseSlide.c
    trunk/blender/source/blender/editors/gpencil/drawgpencil.c
    trunk/blender/source/blender/editors/interface/resources.c
    trunk/blender/source/blender/editors/mesh/editmesh_tools.c
    trunk/blender/source/blender/editors/object/object_ops.c
    trunk/blender/source/blender/editors/object/object_select.c
    trunk/blender/source/blender/editors/object/object_vgroup.c
    trunk/blender/source/blender/editors/render/render_opengl.c
    trunk/blender/source/blender/editors/screen/screen_ops.c
    trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
    trunk/blender/source/blender/editors/space_action/action_edit.c
    trunk/blender/source/blender/editors/space_console/console_draw.c
    trunk/blender/source/blender/editors/space_file/filelist.c
    trunk/blender/source/blender/editors/space_graph/graph_draw.c
    trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
    trunk/blender/source/blender/python/intern/bpy_rna.c
    trunk/blender/source/blender/python/mathutils/mathutils.c
    trunk/blender/source/blender/python/mathutils/mathutils_Color.c
    trunk/blender/source/blender/python/mathutils/mathutils_Color.h
    trunk/blender/source/blender/python/mathutils/mathutils_Euler.c
    trunk/blender/source/blender/python/mathutils/mathutils_Euler.h
    trunk/blender/source/blender/python/mathutils/mathutils_Matrix.c
    trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.c
    trunk/blender/source/blender/python/mathutils/mathutils_Quaternion.h
    trunk/blender/source/blender/python/mathutils/mathutils_Vector.c
    trunk/blender/source/blender/python/mathutils/mathutils_geometry.c
    trunk/blender/source/blender/quicktime/apple/quicktime_export.c
    trunk/blender/source/blender/quicktime/quicktime_import.h
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/brush.c	2012-10-20 19:54:09 UTC (rev 51465)
+++ trunk/blender/source/blender/blenkernel/intern/brush.c	2012-10-20 20:20:02 UTC (rev 51466)
@@ -618,18 +618,18 @@
 
 /* Unified Size and Strength */
 
-// XXX: be careful about setting size and unprojected radius
-// because they depend on one another
-// these functions do not set the other corresponding value
-// this can lead to odd behavior if size and unprojected
-// radius become inconsistent.
-// the biggest problem is that it isn't possible to change
-// unprojected radius because a view context is not
-// available.  my ussual solution to this is to use the
-// ratio of change of the size to change the unprojected
-// radius.  Not completely convinced that is correct.
-// In anycase, a better solution is needed to prevent
-// inconsistency.
+/* XXX: be careful about setting size and unprojected radius
+ * because they depend on one another
+ * these functions do not set the other corresponding value
+ * this can lead to odd behavior if size and unprojected
+ * radius become inconsistent.
+ * the biggest problem is that it isn't possible to change
+ * unprojected radius because a view context is not
+ * available.  my ussual solution to this is to use the
+ * ratio of change of the size to change the unprojected
+ * radius.  Not completely convinced that is correct.
+ * In anycase, a better solution is needed to prevent
+ * inconsistency. */
 
 void BKE_brush_size_set(Scene *scene, Brush *brush, int size)
 {

Modified: trunk/blender/source/blender/blenkernel/intern/bvhutils.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/bvhutils.c	2012-10-20 19:54:09 UTC (rev 51465)
+++ trunk/blender/source/blender/blenkernel/intern/bvhutils.c	2012-10-20 20:20:02 UTC (rev 51466)
@@ -358,8 +358,8 @@
  * BVH from meshs callbacks
  */
 
-// Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_faces.
-// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
+/* Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_faces.
+ * userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
 static void mesh_faces_nearest_point(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
 {
 	const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
@@ -395,8 +395,8 @@
 	} while (t2);
 }
 
-// Callback to bvh tree raycast. The tree must bust have been built using bvhtree_from_mesh_faces.
-// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
+/* Callback to bvh tree raycast. The tree must bust have been built using bvhtree_from_mesh_faces.
+ * userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
 static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit)
 {
 	const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
@@ -435,8 +435,8 @@
 	} while (t2);
 }
 
-// Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_edges.
-// userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree.
+/* Callback to bvh tree nearest point. The tree must bust have been built using bvhtree_from_mesh_edges.
+ * userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
 static void mesh_edges_nearest_point(void *userdata, int index, const float co[3], BVHTreeNearest *nearest)
 {
 	const BVHTreeFromMesh *data = (BVHTreeFromMesh *) userdata;
@@ -463,12 +463,12 @@
 /*
  * BVH builders
  */
-// Builds a bvh tree.. where nodes are the vertexs of the given mesh
+/* Builds a bvh tree.. where nodes are the vertexs of the given mesh */
 BVHTree *bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
 {
 	BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_VERTICES);
 
-	//Not in cache
+	/* Not in cache */
 	if (tree == NULL) {
 		int i;
 		int numVerts = mesh->getNumVerts(mesh);
@@ -484,7 +484,7 @@
 
 				BLI_bvhtree_balance(tree);
 
-				//Save on cache for later use
+				/* Save on cache for later use */
 //				printf("BVHTree built and saved on cache\n");
 				bvhcache_insert(&mesh->bvhCache, tree, BVHTREE_FROM_VERTICES);
 			}
@@ -495,15 +495,15 @@
 	}
 
 
-	//Setup BVHTreeFromMesh
+	/* Setup BVHTreeFromMesh */
 	memset(data, 0, sizeof(*data));
 	data->tree = tree;
 
 	if (data->tree) {
 		data->cached = TRUE;
 
-		//a NULL nearest callback works fine
-		//remeber the min distance to point is the same as the min distance to BV of point
+		/* a NULL nearest callback works fine
+		 * remeber the min distance to point is the same as the min distance to BV of point */
 		data->nearest_callback = NULL;
 		data->raycast_callback = NULL;
 
@@ -517,12 +517,12 @@
 	return data->tree;
 }
 
-// Builds a bvh tree.. where nodes are the faces of the given mesh.
+/* Builds a bvh tree.. where nodes are the faces of the given mesh. */
 BVHTree *bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
 {
 	BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_FACES);
 
-	//Not in cache
+	/* Not in cache */
 	if (tree == NULL) {
 		int i;
 		int numFaces = mesh->getNumTessFaces(mesh);
@@ -616,7 +616,7 @@
 				}
 				BLI_bvhtree_balance(tree);
 
-				//Save on cache for later use
+				/* Save on cache for later use */
 //				printf("BVHTree built and saved on cache\n");
 				bvhcache_insert(&mesh->bvhCache, tree, BVHTREE_FROM_FACES);
 			}
@@ -627,7 +627,7 @@
 	}
 
 
-	//Setup BVHTreeFromMesh
+	/* Setup BVHTreeFromMesh */
 	memset(data, 0, sizeof(*data));
 	data->tree = tree;
 
@@ -647,12 +647,12 @@
 
 }
 
-// Builds a bvh tree.. where nodes are the faces of the given mesh.
+/* Builds a bvh tree.. where nodes are the faces of the given mesh. */
 BVHTree *bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float epsilon, int tree_type, int axis)
 {
 	BVHTree *tree = bvhcache_find(&mesh->bvhCache, BVHTREE_FROM_EDGES);
 
-	//Not in cache
+	/* Not in cache */
 	if (tree == NULL) {
 		int i;
 		int numEdges = mesh->getNumEdges(mesh);
@@ -672,7 +672,7 @@
 				}
 				BLI_bvhtree_balance(tree);
 
-				//Save on cache for later use
+				/* Save on cache for later use */
 //				printf("BVHTree built and saved on cache\n");
 				bvhcache_insert(&mesh->bvhCache, tree, BVHTREE_FROM_EDGES);
 			}
@@ -683,7 +683,7 @@
 	}
 
 
-	//Setup BVHTreeFromMesh
+	/* Setup BVHTreeFromMesh */
 	memset(data, 0, sizeof(*data));
 	data->tree = tree;
 
@@ -703,7 +703,7 @@
 
 }
 
-// Frees data allocated by a call to bvhtree_from_mesh_*.
+/* Frees data allocated by a call to bvhtree_from_mesh_*. */
 void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
 {
 	if (data->tree) {

Modified: trunk/blender/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2012-10-20 19:54:09 UTC (rev 51465)
+++ trunk/blender/source/blender/blenkernel/intern/depsgraph.c	2012-10-20 20:20:02 UTC (rev 51466)
@@ -302,7 +302,7 @@
 }
 
 /* isdata = object data... */
-// XXX this needs to be extended to be more flexible (so that not only objects are evaluated via depsgraph)...
+/* XXX this needs to be extended to be more flexible (so that not only objects are evaluated via depsgraph)... */
 static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node, int isdata)
 {
 	FCurve *fcu;
@@ -606,7 +606,7 @@
 			
 			if (mom != ob) {
 				node2 = dag_get_node(dag, mom);
-				dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Metaball");  // mom depends on children!
+				dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Metaball");  /* mom depends on children! */
 			}
 		}
 		break;
@@ -921,8 +921,8 @@
 	return NULL;
 }
 
-static int ugly_hack_sorry = 1;  // prevent type check
-static int dag_print_dependencies = 0; // debugging
+static int ugly_hack_sorry = 1;         /* prevent type check */
+static int dag_print_dependencies = 0;  /* debugging */
 
 /* no checking of existence, use dag_find_node first or dag_get_node */
 DagNode *dag_add_node(DagForest *forest, void *fob)
@@ -934,7 +934,7 @@
 		node->ob = fob;
 		node->color = DAG_WHITE;
 
-		if (ugly_hack_sorry) node->type = GS(((ID *) fob)->name);   // sorry, done for pose sorting
+		if (ugly_hack_sorry) node->type = GS(((ID *) fob)->name);  /* sorry, done for pose sorting */
 		if (forest->numNodes) {
 			((DagNode *) forest->DagNode.last)->next = node;
 			forest->DagNode.last = node;
@@ -1303,7 +1303,7 @@
 					pre_func(node->ob, data);
 				}
 				
-				else { // back or cross edge
+				else {  /* back or cross edge */
 					retval = 1;
 				}
 				itA = itA->next;
@@ -1386,7 +1386,7 @@
 						break;
 					}
 					else {
-						if (itA->node->color == DAG_GRAY) { // back edge
+						if (itA->node->color == DAG_GRAY) {  /* back edge */
 							fprintf(stderr, "dfs back edge :%15s %15s\n", ((ID *) node->ob)->name, ((ID *) itA->node->ob)->name);
 							/* is_cycle = 1; */ /* UNUSED */
 						}
@@ -1537,7 +1537,7 @@
 }
 
 
-// used to get the obs owning a datablock
+/* used to get the obs owning a datablock */
 DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
 {
 	DagNode *node, *node1;
@@ -1548,7 +1548,7 @@
 	if (node == NULL) {
 		return NULL;
 	}
-	else if (node->ancestor_count == 1) { // simple case
+	else if (node->ancestor_count == 1) {  /* simple case */
 		nqueue = queue_create(1);
 		push_queue(nqueue, node);
 	}
@@ -1557,7 +1557,7 @@
 		
 		node1 = dag->DagNode.first;
 		do {
-			if (node1->DFS_fntm > node->DFS_fntm) { // a parent is finished after child. must check adj list
+			if (node1->DFS_fntm > node->DFS_fntm) {  /* a parent is finished after child. must check adj list */
 				itA = node->child;
 				while (itA != NULL) {
 					if ((itA->node == node) && (itA->type == DAG_RL_DATA)) {
@@ -1600,7 +1600,7 @@
 	return nqueue;	
 }
 
-// standard DFS list
+/* standard DFS list */
 DagNodeQueue *get_all_childs(struct DagForest    *dag, void *ob)
 {
 	DagNode *node;
@@ -1611,7 +1611,7 @@
 	int skip = 0;
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list