style cleanup: comments
authorCampbell Barton <ideasman42@gmail.com>
Sat, 20 Oct 2012 20:20:02 +0000 (20:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 20 Oct 2012 20:20:02 +0000 (20:20 +0000)
44 files changed:
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/DLRB_tree.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/storage.c
source/blender/blenloader/intern/versioning_250.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/render/render_opengl.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/python/intern/bpy_rna.c
source/blender/python/mathutils/mathutils.c
source/blender/python/mathutils/mathutils_Color.c
source/blender/python/mathutils/mathutils_Color.h
source/blender/python/mathutils/mathutils_Euler.c
source/blender/python/mathutils/mathutils_Euler.h
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/python/mathutils/mathutils_Quaternion.h
source/blender/python/mathutils/mathutils_Vector.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/quicktime/apple/quicktime_export.c
source/blender/quicktime/quicktime_import.h
source/blender/windowmanager/intern/wm_operators.c

index f4efc30..f618427 100644 (file)
@@ -618,18 +618,18 @@ void BKE_brush_imbuf_new(const Scene *scene, Brush *brush, short flt, short texf
 
 /* 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)
 {
index 32ae6d0..8b4099a 100644 (file)
@@ -358,8 +358,8 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
  * 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 @@ static void mesh_faces_nearest_point(void *userdata, int index, const float co[3
        } 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 @@ static void mesh_faces_spherecast(void *userdata, int index, const BVHTreeRay *r
        } 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 @@ static void mesh_edges_nearest_point(void *userdata, int index, const float co[3
 /*
  * 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 @@ BVHTree *bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float
 
                                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 @@ BVHTree *bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float
        }
 
 
-       //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 @@ BVHTree *bvhtree_from_mesh_verts(BVHTreeFromMesh *data, DerivedMesh *mesh, float
        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 @@ BVHTree *bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
                                }
                                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 @@ BVHTree *bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
        }
 
 
-       //Setup BVHTreeFromMesh
+       /* Setup BVHTreeFromMesh */
        memset(data, 0, sizeof(*data));
        data->tree = tree;
 
@@ -647,12 +647,12 @@ BVHTree *bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
 
 }
 
-// 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 @@ BVHTree *bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float
                                }
                                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 @@ BVHTree *bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float
        }
 
 
-       //Setup BVHTreeFromMesh
+       /* Setup BVHTreeFromMesh */
        memset(data, 0, sizeof(*data));
        data->tree = tree;
 
@@ -703,7 +703,7 @@ BVHTree *bvhtree_from_mesh_edges(BVHTreeFromMesh *data, DerivedMesh *mesh, float
 
 }
 
-// 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) {
index 20b0293..c96e3c0 100644 (file)
@@ -302,7 +302,7 @@ DagForest *dag_init(void)
 }
 
 /* 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 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                        
                        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 @@ DagNode *dag_find_node(DagForest *forest, void *fob)
        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 @@ DagNode *dag_add_node(DagForest *forest, void *fob)
                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 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
                                        pre_func(node->ob, data);
                                }
                                
-                               else { // back or cross edge
+                               else {  /* back or cross edge */
                                        retval = 1;
                                }
                                itA = itA->next;
@@ -1386,7 +1386,7 @@ DagNodeQueue *graph_dfs(void)
                                                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 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a
 }
 
 
-// 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 @@ DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
        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 @@ DagNodeQueue *get_obparents(struct DagForest *dag, void *ob)
                
                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 @@ DagNodeQueue *get_first_ancestors(struct DagForest   *dag, void *ob)
        return nqueue;  
 }
 
-// standard DFS list
+/* standard DFS list */
 DagNodeQueue *get_all_childs(struct DagForest    *dag, void *ob)
 {
        DagNode *node;
@@ -1611,7 +1611,7 @@ DagNodeQueue *get_all_childs(struct DagForest    *dag, void *ob)
        int skip = 0;
 
        nqueue = queue_create(DAGQUEUEALLOC);
-       retqueue = queue_create(dag->numNodes); // was MainDag... why? (ton)
+       retqueue = queue_create(dag->numNodes);  /* was MainDag... why? (ton) */
        
        node = dag->DagNode.first;
        while (node) {
@@ -1621,8 +1621,8 @@ DagNodeQueue *get_all_childs(struct DagForest    *dag, void *ob)
        
        time = 1;
        
-       node = dag_find_node(dag, ob);   // could be done in loop above (ton)
-       if (node) { // can be null for newly added objects
+       node = dag_find_node(dag, ob);  /* could be done in loop above (ton) */
+       if (node) {                     /* can be null for newly added objects */
                
                node->color = DAG_GRAY;
                time++;
@@ -1866,7 +1866,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
                if (!skip) {
                        if (node) {
                                node = pop_queue(nqueue);
-                               if (node->ob == sce)    // we are done
+                               if (node->ob == sce)  /* we are done */
                                        break;
                                node->color = DAG_BLACK;
                                
@@ -2023,7 +2023,7 @@ static unsigned int flush_layer_node(Scene *sce, DagNode *node, int curtime)
        for (itA = node->child; itA; itA = itA->next) {
                if (itA->node->type == ID_OB) {
                        if (itA->node->lasttime != curtime) {
-                               itA->lay = flush_layer_node(sce, itA->node, curtime);  // lay is only set once for each relation
+                               itA->lay = flush_layer_node(sce, itA->node, curtime);  /* lay is only set once for each relation */
                        }
                        else itA->lay = itA->node->lay;
                        
@@ -2071,12 +2071,12 @@ static void dag_scene_flush_layers(Scene *sce, int lay)
        Base *base;
        int lasttime;
 
-       firstnode = sce->theDag->DagNode.first;  // always scene node
+       firstnode = sce->theDag->DagNode.first;  /* always scene node */
 
        for (itA = firstnode->child; itA; itA = itA->next)
                itA->lay = 0;
 
-       sce->theDag->time++;    // so we know which nodes were accessed
+       sce->theDag->time++;  /* so we know which nodes were accessed */
        lasttime = sce->theDag->time;
 
        /* update layer flags in nodes */
@@ -2148,13 +2148,13 @@ void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const sho
                DAG_scene_sort(bmain, sce);
        }
        
-       firstnode = sce->theDag->DagNode.first;  // always scene node
+       firstnode = sce->theDag->DagNode.first;  /* always scene node */
 
        /* first we flush the layer flags */
        dag_scene_flush_layers(sce, lay);
 
        /* then we use the relationships + layer info to flush update events */
-       sce->theDag->time++;    // so we know which nodes were accessed
+       sce->theDag->time++;  /* so we know which nodes were accessed */
        lasttime = sce->theDag->time;
        for (itA = firstnode->child; itA; itA = itA->next)
                if (itA->node->lasttime != lasttime && itA->node->type == ID_OB)
@@ -2162,7 +2162,7 @@ void DAG_scene_flush_update(Main *bmain, Scene *sce, unsigned int lay, const sho
 
        /* if update is not due to time change, do pointcache clears */
        if (!time) {
-               sce->theDag->time++;    // so we know which nodes were accessed
+               sce->theDag->time++;  /* so we know which nodes were accessed */
                lasttime = sce->theDag->time;
                for (itA = firstnode->child; itA; itA = itA->next) {
                        if (itA->node->lasttime != lasttime && itA->node->type == ID_OB) {
@@ -2930,9 +2930,9 @@ void DAG_pose_sort(Object *ob)
        int skip = 0;
        
        dag = dag_init();
-       ugly_hack_sorry = 0; // no ID structs
+       ugly_hack_sorry = 0;  /* no ID structs */
 
-       rootnode = dag_add_node(dag, NULL); // node->ob becomes NULL
+       rootnode = dag_add_node(dag, NULL);  /* node->ob becomes NULL */
        
        /* we add the hierarchy and the constraints */
        for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
@@ -2977,7 +2977,7 @@ void DAG_pose_sort(Object *ob)
                                                                        dag_add_relation(dag, node2, node3, 0, "IK Constraint");
                                                                        
                                                                        segcount++;
-                                                                       if (segcount == data->rootbone || segcount > 255) break;  // 255 is weak
+                                                                       if (segcount == data->rootbone || segcount > 255) break;  /* 255 is weak */
                                                                        parchan = parchan->parent;
                                                                }
                                                        }
@@ -3027,7 +3027,7 @@ void DAG_pose_sort(Object *ob)
                if (!skip) {
                        if (node) {
                                node = pop_queue(nqueue);
-                               if (node->ob == NULL)   // we are done
+                               if (node->ob == NULL)  /* we are done */
                                        break;
                                node->color = DAG_BLACK;
                                
index fd58af3..ca41c83 100644 (file)
@@ -2571,7 +2571,7 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
                if (ob->recalc & OB_RECALC_DATA) {
                        ID *data_id = (ID *)ob->data;
                        AnimData *adt = BKE_animdata_from_id(data_id);
-                       float ctime = (float)scene->r.cfra; // XXX this is bad...
+                       float ctime = (float)scene->r.cfra;  /* XXX this is bad... */
                        ListBase pidlist;
                        PTCacheID *pid;
                        
index 9a8bcaa..5586d8e 100644 (file)
@@ -84,7 +84,7 @@
 #endif
 
 /* get derived mesh */
-//TODO is anyfunction that does this? returning the derivedFinal without we caring if its in edit mode or not?
+/* TODO is anyfunction that does this? returning the derivedFinal without we caring if its in edit mode or not? */
 DerivedMesh *object_get_derived_final(Object *ob)
 {
        Mesh *me = ob->data;
@@ -149,7 +149,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
                return;
        }
 
-       //Setup nearest
+       /* Setup nearest */
        nearest.index = -1;
        nearest.dist = FLT_MAX;
 #ifndef __APPLE__
@@ -162,7 +162,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
                if (weight == 0.0f) continue;
 
 
-               //Convert the vertex to tree coordinates
+               /* Convert the vertex to tree coordinates */
                if (calc->vert) {
                        copy_v3_v3(tmp_co, calc->vert[i].co);
                }
@@ -171,11 +171,11 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
                }
                space_transform_apply(&calc->local2target, tmp_co);
 
-               //Use local proximity heuristics (to reduce the nearest search)
-               //
-               //If we already had an hit before.. we assume this vertex is going to have a close hit to that other vertex
-               //so we can initiate the "nearest.dist" with the expected value to that last hit.
-               //This will lead in prunning of the search tree.
+               /Use local proximity heuristics (to reduce the nearest search)
+                *
+                * If we already had an hit before.. we assume this vertex is going to have a close hit to that other vertex
+                * so we can initiate the "nearest.dist" with the expected value to that last hit.
+                * This will lead in prunning of the search tree. */
                if (nearest.index != -1)
                        nearest.dist = len_squared_v3v3(tmp_co, nearest.co);
                else
@@ -184,17 +184,18 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
                BLI_bvhtree_find_nearest(treeData.tree, tmp_co, &nearest, treeData.nearest_callback, &treeData);
 
 
-               //Found the nearest vertex
+               /* Found the nearest vertex */
                if (nearest.index != -1) {
-                       //Adjusting the vertex weight, so that after interpolating it keeps a certain distance from the nearest position
+                       /* Adjusting the vertex weight,
+                        * so that after interpolating it keeps a certain distance from the nearest position */
                        float dist = sasqrt(nearest.dist);
                        if (dist > FLT_EPSILON) weight *= (dist - calc->keepDist) / dist;
 
-                       //Convert the coordinates back to mesh coordinates
+                       /* Convert the coordinates back to mesh coordinates */
                        copy_v3_v3(tmp_co, nearest.co);
                        space_transform_invert(&calc->local2target, tmp_co);
 
-                       interp_v3_v3v3(co, co, tmp_co, weight); //linear interpolation
+                       interp_v3_v3v3(co, co, tmp_co, weight);  /* linear interpolation */
                }
        }
 
@@ -215,10 +216,10 @@ int normal_projection_project_vertex(char options, const float vert[3], const fl
        const float *co, *no;
        BVHTreeRayHit hit_tmp;
 
-       //Copy from hit (we need to convert hit rays from one space coordinates to the other
+       /* Copy from hit (we need to convert hit rays from one space coordinates to the other */
        memcpy(&hit_tmp, hit, sizeof(hit_tmp));
 
-       //Apply space transform (TODO readjust dist)
+       /* Apply space transform (TODO readjust dist) */
        if (transf) {
                copy_v3_v3(tmp_co, vert);
                space_transform_apply(transf, tmp_co);
@@ -272,39 +273,39 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
 {
        int i;
 
-       //Options about projection direction
+       /* Options about projection direction */
        const char use_normal   = calc->smd->shrinkOpts;
        float proj_axis[3]      = {0.0f, 0.0f, 0.0f};
 
-       //Raycast and tree stuff
+       /* Raycast and tree stuff */
        BVHTreeRayHit hit;
        BVHTreeFromMesh treeData = NULL_BVHTreeFromMesh;
 
-       //auxiliary target
+       /* auxiliary target */
        DerivedMesh *auxMesh    = NULL;
        BVHTreeFromMesh auxData = NULL_BVHTreeFromMesh;
        SpaceTransform local2aux;
 
-       //If the user doesn't allows to project in any direction of projection axis
-       //then theres nothing todo.
+       /If the user doesn't allows to project in any direction of projection axis
+        * then theres nothing todo. */
        if ((use_normal & (MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR | MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR)) == 0)
                return;
 
 
-       //Prepare data to retrieve the direction in which we should project each vertex
+       /* Prepare data to retrieve the direction in which we should project each vertex */
        if (calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL) {
                if (calc->vert == NULL) return;
        }
        else {
-               //The code supports any axis that is a combination of X,Y,Z
-               //although currently UI only allows to set the 3 different axis
+               /The code supports any axis that is a combination of X,Y,Z
+                * although currently UI only allows to set the 3 different axis */
                if (calc->smd->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS) proj_axis[0] = 1.0f;
                if (calc->smd->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS) proj_axis[1] = 1.0f;
                if (calc->smd->projAxis & MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS) proj_axis[2] = 1.0f;
 
                normalize_v3(proj_axis);
 
-               //Invalid projection direction
+               /* Invalid projection direction */
                if (dot_v3v3(proj_axis, proj_axis) < FLT_EPSILON)
                        return; 
        }
@@ -316,7 +317,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
                SPACE_TRANSFORM_SETUP(&local2aux, calc->ob, calc->smd->auxTarget);
        }
 
-       //After sucessufuly build the trees, start projection vertexs
+       /* After sucessufuly build the trees, start projection vertexs */
        if (bvhtree_from_mesh_faces(&treeData, calc->target, 0.0, 4, 6) &&
            (auxMesh == NULL || bvhtree_from_mesh_faces(&auxData, auxMesh, 0.0, 4, 6)))
        {
@@ -351,9 +352,9 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
 
 
                        hit.index = -1;
-                       hit.dist = 10000.0f; //TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that
+                       hit.dist = 10000.0f; /* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */
 
-                       //Project over positive direction of axis
+                       /* Project over positive direction of axis */
                        if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) {
 
                                if (auxData.tree)
@@ -362,7 +363,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
                                normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, tmp_no, &calc->local2target, treeData.tree, &hit, treeData.raycast_callback, &treeData);
                        }
 
-                       //Project over negative direction of axis
+                       /* Project over negative direction of axis */
                        if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR && hit.index == -1) {
                                float inv_no[3];
                                negate_v3_v3(inv_no, tmp_no);
@@ -381,7 +382,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
                }
        }
 
-       //free data structures
+       /* free data structures */
        free_bvhtree_from_mesh(&treeData);
        free_bvhtree_from_mesh(&auxData);
 }
@@ -399,19 +400,19 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
        BVHTreeFromMesh treeData = NULL_BVHTreeFromMesh;
        BVHTreeNearest nearest  = NULL_BVHTreeNearest;
 
-       //Create a bvh-tree of the given target
+       /* Create a bvh-tree of the given target */
        BENCH(bvhtree_from_mesh_faces(&treeData, calc->target, 0.0, 2, 6));
        if (treeData.tree == NULL) {
                OUT_OF_MEMORY();
                return;
        }
 
-       //Setup nearest
+       /* Setup nearest */
        nearest.index = -1;
        nearest.dist = FLT_MAX;
 
 
-       //Find the nearest vertex
+       /* Find the nearest vertex */
 #ifndef __APPLE__
 #pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc,treeData) schedule(static)
 #endif
@@ -421,7 +422,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
                float weight = defvert_array_find_weight_safe(calc->dvert, i, calc->vgroup);
                if (weight == 0.0f) continue;
 
-               //Convert the vertex to tree coordinates
+               /* Convert the vertex to tree coordinates */
                if (calc->vert) {
                        copy_v3_v3(tmp_co, calc->vert[i].co);
                }
@@ -430,11 +431,11 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
                }
                space_transform_apply(&calc->local2target, tmp_co);
 
-               //Use local proximity heuristics (to reduce the nearest search)
-               //
-               //If we already had an hit before.. we assume this vertex is going to have a close hit to that other vertex
-               //so we can initiate the "nearest.dist" with the expected value to that last hit.
-               //This will lead in prunning of the search tree.
+               /Use local proximity heuristics (to reduce the nearest search)
+                *
+                * If we already had an hit before.. we assume this vertex is going to have a close hit to that other vertex
+                * so we can initiate the "nearest.dist" with the expected value to that last hit.
+                * This will lead in prunning of the search tree. */
                if (nearest.index != -1)
                        nearest.dist = len_squared_v3v3(tmp_co, nearest.co);
                else
@@ -442,24 +443,25 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
 
                BLI_bvhtree_find_nearest(treeData.tree, tmp_co, &nearest, treeData.nearest_callback, &treeData);
 
-               //Found the nearest vertex
+               /* Found the nearest vertex */
                if (nearest.index != -1) {
                        if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE) {
-                               //Make the vertex stay on the front side of the face
+                               /* Make the vertex stay on the front side of the face */
                                madd_v3_v3v3fl(tmp_co, nearest.co, nearest.no, calc->keepDist);
                        }
                        else {
-                               //Adjusting the vertex weight, so that after interpolating it keeps a certain distance from the nearest position
+                               /* Adjusting the vertex weight,
+                                * so that after interpolating it keeps a certain distance from the nearest position */
                                float dist = sasqrt(nearest.dist);
                                if (dist > FLT_EPSILON)
-                                       interp_v3_v3v3(tmp_co, tmp_co, nearest.co, (dist - calc->keepDist) / dist);  //linear interpolation
+                                       interp_v3_v3v3(tmp_co, tmp_co, nearest.co, (dist - calc->keepDist) / dist);  /* linear interpolation */
                                else
                                        copy_v3_v3(tmp_co, nearest.co);
                        }
 
-                       //Convert the coordinates back to mesh coordinates
+                       /* Convert the coordinates back to mesh coordinates */
                        space_transform_invert(&calc->local2target, tmp_co);
-                       interp_v3_v3v3(co, co, tmp_co, weight); //linear interpolation
+                       interp_v3_v3v3(co, co, tmp_co, weight);  /* linear interpolation */
                }
        }
 
@@ -473,18 +475,18 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
        DerivedMesh *ss_mesh    = NULL;
        ShrinkwrapCalcData calc = NULL_ShrinkwrapCalcData;
 
-       //remove loop dependencies on derived meshs (TODO should this be done elsewhere?)
+       /* remove loop dependencies on derived meshs (TODO should this be done elsewhere?) */
        if (smd->target == ob) smd->target = NULL;
        if (smd->auxTarget == ob) smd->auxTarget = NULL;
 
 
-       //Configure Shrinkwrap calc data
+       /* Configure Shrinkwrap calc data */
        calc.smd = smd;
        calc.ob = ob;
        calc.numVerts = numVerts;
        calc.vertexCos = vertexCos;
 
-       //DeformVertex
+       /* DeformVertex */
        calc.vgroup = defgroup_name_index(calc.ob, calc.smd->vgroup_name);
        if (dm) {
                calc.dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
@@ -497,12 +499,12 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
        if (smd->target) {
                calc.target = object_get_derived_final(smd->target);
 
-               //TODO there might be several "bugs" on non-uniform scales matrixs
-               //because it will no longer be nearest surface, not sphere projection
-               //because space has been deformed
+               /TODO there might be several "bugs" on non-uniform scales matrixs
+                * because it will no longer be nearest surface, not sphere projection
+                * because space has been deformed */
                SPACE_TRANSFORM_SETUP(&calc.local2target, ob, smd->target);
 
-               //TODO: smd->keepDist is in global units.. must change to local
+               /* TODO: smd->keepDist is in global units.. must change to local */
                calc.keepDist = smd->keepDist;
        }
 
@@ -511,15 +513,15 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
        calc.vgroup = defgroup_name_index(calc.ob, smd->vgroup_name);
 
        if (dm != NULL && smd->shrinkType == MOD_SHRINKWRAP_PROJECT) {
-               //Setup arrays to get vertexs positions, normals and deform weights
+               /* Setup arrays to get vertexs positions, normals and deform weights */
                calc.vert   = dm->getVertDataArray(dm, CD_MVERT);
                calc.dvert  = dm->getVertDataArray(dm, CD_MDEFORMVERT);
 
-               //Using vertexs positions/normals as if a subsurface was applied 
+               /* Using vertexs positions/normals as if a subsurface was applied */
                if (smd->subsurfLevels) {
                        SubsurfModifierData ssmd = {{NULL}};
-                       ssmd.subdivType = ME_CC_SUBSURF;        //catmull clark
-                       ssmd.levels     = smd->subsurfLevels;   //levels
+                       ssmd.subdivType = ME_CC_SUBSURF;        /* catmull clark */
+                       ssmd.levels     = smd->subsurfLevels;   /* levels */
 
                        ss_mesh = subsurf_make_derived_from_derived(dm, &ssmd, NULL, (ob->mode & OB_MODE_EDIT) ? SUBSURF_IN_EDIT_MODE : 0);
 
@@ -532,13 +534,13 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
                                }
                        }
 
-                       //Just to make sure we are not leaving any memory behind
+                       /* Just to make sure we are not leaving any memory behind */
                        assert(ssmd.emCache == NULL);
                        assert(ssmd.mCache == NULL);
                }
        }
 
-       //Projecting target defined - lets work!
+       /* Projecting target defined - lets work! */
        if (calc.target) {
                switch (smd->shrinkType) {
                        case MOD_SHRINKWRAP_NEAREST_SURFACE:
@@ -555,7 +557,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
                }
        }
 
-       //free memory
+       /* free memory */
        if (ss_mesh)
                ss_mesh->release(ss_mesh);
 }
index ff1fdeb..5117c83 100644 (file)
@@ -982,7 +982,7 @@ int BKE_ffmpeg_append(RenderData *rd, int start_frame, int frame, int *pixels, i
 
        PRINT("Writing frame %i, render width=%d, render height=%d\n", frame, rectx, recty);
 
-// why is this done before writing the video frame and again at end_ffmpeg?
+/* why is this done before writing the video frame and again at end_ffmpeg? */
 //     write_audio_frames(frame / (((double)rd->frs_sec) / rd->frs_sec_base));
 
        if (video_stream) {
index 46b0cfe..9fbbd7d 100644 (file)
@@ -269,7 +269,7 @@ static void bvh_heapsort(BVHNode **a, int lo, int hi, int axis)
 }
 #endif
 
-static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis) // returns Sortable
+static BVHNode *bvh_medianof3(BVHNode **a, int lo, int mid, int hi, int axis)  /* returns Sortable */
 {
        if ((a[mid])->bv[axis] < (a[lo])->bv[axis]) {
                if ((a[hi])->bv[axis] < (a[mid])->bv[axis])
@@ -645,7 +645,7 @@ static int implicit_leafs_index(BVHBuildHelper *data, int depth, int child_index
  *    (looping elements, knowing if its a leaf or not.. etc...)
  */
 
-// This functions returns the number of branches needed to have the requested number of leafs.
+/* This functions returns the number of branches needed to have the requested number of leafs. */
 static int implicit_needed_branches(int tree_type, int leafs)
 {
        return maxi(1, (leafs + tree_type - 3) / (tree_type - 1) );
@@ -843,7 +843,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
                }
 
 
-               //Allocate arrays
+               /* Allocate arrays */
                numnodes = maxsize + implicit_needed_branches(tree_type, maxsize) + tree_type;
 
                tree->nodes = (BVHNode **)MEM_callocN(sizeof(BVHNode *) * numnodes, "BVHNodes");
@@ -876,7 +876,7 @@ BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis)
                        return NULL;
                }
 
-               //link the dynamic bv and child links
+               /* link the dynamic bv and child links */
                for (i = 0; i < numnodes; i++) {
                        tree->nodearray[i].bv = tree->nodebv + i * axis;
                        tree->nodearray[i].children = tree->nodechild + i * tree_type;
@@ -968,10 +968,10 @@ int BLI_bvhtree_update_node(BVHTree *tree, int index, const float co[3], const f
        if (co_moving)
                create_kdop_hull(tree, node, co_moving, numpoints, 1);
        
-       // inflate the bv with some epsilon
+       /* inflate the bv with some epsilon */
        for (i = tree->start_axis; i < tree->stop_axis; i++) {
-               node->bv[(2 * i)] -= tree->epsilon; // minimum 
-               node->bv[(2 * i) + 1] += tree->epsilon; // maximum 
+               node->bv[(2 * i)]     -= tree->epsilon; /* minimum */
+               node->bv[(2 * i) + 1] += tree->epsilon; /* maximum */
        }
 
        return 1;
@@ -1045,7 +1045,7 @@ static void traverse(BVHOverlapData *data, BVHNode *node1, BVHNode *node2)
                                        data->max_overlap *= 2;
                                }
                                
-                               // both leafs, insert overlap!
+                               /* both leafs, insert overlap! */
                                data->overlap[data->i].indexA = node1->index;
                                data->overlap[data->i].indexB = node2->index;
 
@@ -1075,11 +1075,11 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
        BVHTreeOverlap *overlap = NULL, *to = NULL;
        BVHOverlapData **data;
        
-       // check for compatibility of both trees (can't compare 14-DOP with 18-DOP)
+       /* check for compatibility of both trees (can't compare 14-DOP with 18-DOP) */
        if ((tree1->axis != tree2->axis) && (tree1->axis == 14 || tree2->axis == 14) && (tree1->axis == 18 || tree2->axis == 18))
                return NULL;
        
-       // fast check root nodes for collision before doing big splitting + traversal
+       /* fast check root nodes for collision before doing big splitting + traversal */
        if (!tree_overlap(tree1->nodes[tree1->totleaf], tree2->nodes[tree2->totleaf], MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis)))
                return NULL;
 
@@ -1088,7 +1088,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
        for (j = 0; j < tree1->tree_type; j++) {
                data[j] = (BVHOverlapData *)MEM_callocN(sizeof(BVHOverlapData), "BVHOverlapData");
                
-               // init BVHOverlapData
+               /* init BVHOverlapData */
                data[j]->overlap = (BVHTreeOverlap *)malloc(sizeof(BVHTreeOverlap) * MAX2(tree1->totleaf, tree2->totleaf));
                data[j]->tree1 = tree1;
                data[j]->tree2 = tree2;
@@ -1123,13 +1123,13 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
        return overlap;
 }
 
-//Determines the nearest point of the given node BV. Returns the squared distance to that point.
+/* Determines the nearest point of the given node BV. Returns the squared distance to that point. */
 static float calc_nearest_point(const float proj[3], BVHNode *node, float *nearest)
 {
        int i;
        const float *bv = node->bv;
 
-       //nearest on AABB hull
+       /* nearest on AABB hull */
        for (i = 0; i != 3; i++, bv += 2) {
                if (bv[0] > proj[i])
                        nearest[i] = bv[0];
@@ -1140,7 +1140,7 @@ static float calc_nearest_point(const float proj[3], BVHNode *node, float *neare
        }
 
 #if 0
-       //nearest on a general hull
+       /* nearest on a general hull */
        copy_v3_v3(nearest, data->co);
        for (i = data->tree->start_axis; i != data->tree->stop_axis; i++, bv += 2)
        {
@@ -1167,7 +1167,7 @@ typedef struct NodeDistance {
 
 } NodeDistance;
 
-// TODO: use a priority queue to reduce the number of nodes looked on
+/* TODO: use a priority queue to reduce the number of nodes looked on */
 static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
 {
        if (node->totnode == 0) {
@@ -1179,7 +1179,7 @@ static void dfs_find_nearest_dfs(BVHNearestData *data, BVHNode *node)
                }
        }
        else {
-               //Better heuristic to pick the closest node to dive on
+               /* Better heuristic to pick the closest node to dive on */
                int i;
                float nearest[3];
 
@@ -1259,7 +1259,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node)
                                dfs_find_nearest_dfs(data, child);
                        }
                        else {
-                               //adjust heap size
+                               /* adjust heap size */
                                if ((heap_size >= max_heap_size) &&
                                    ADJUST_MEMORY(default_heap, (void **)&heap, heap_size + 1, &max_heap_size, sizeof(heap[0])) == FALSE)
                                {
@@ -1306,7 +1306,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float co[3], BVHTreeNearest *n
        BVHNearestData data;
        BVHNode *root = tree->nodes[tree->totleaf];
 
-       //init data to search
+       /* init data to search */
        data.tree = tree;
        data.co = co;
 
@@ -1354,7 +1354,7 @@ static float ray_nearest_hit(BVHRayCastData *data, const float bv[6])
 
        for (i = 0; i != 3; i++, bv += 2) {
                if (data->ray_dot_axis[i] == 0.0f) {
-                       //axis aligned ray
+                       /* axis aligned ray */
                        if (data->ray.origin[i] < bv[0] - data->ray.radius ||
                            data->ray.origin[i] > bv[1] + data->ray.radius)
                        {
@@ -1531,7 +1531,7 @@ float BLI_bvhtree_bb_raycast(const float bv[6], const float light_start[3], cons
 
        data.hit.dist = FLT_MAX;
        
-       // get light direction
+       /* get light direction */
        data.ray.direction[0] = light_end[0] - light_start[0];
        data.ray.direction[1] = light_end[1] - light_start[1];
        data.ray.direction[2] = light_end[2] - light_start[2];
@@ -1563,7 +1563,7 @@ float BLI_bvhtree_bb_raycast(const float bv[6], const float light_start[3], cons
 typedef struct RangeQueryData {
        BVHTree *tree;
        const float *center;
-       float radius;           //squared radius
+       float radius;  /* squared radius */
 
        int hits;
 
@@ -1578,7 +1578,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
 {
        if (node->totnode == 0) {
 #if 0   /*UNUSED*/
-               //Calculate the node min-coords (if the node was a point then this is the point coordinates)
+               /* Calculate the node min-coords (if the node was a point then this is the point coordinates) */
                float co[3];
                co[0] = node->bv[0];
                co[1] = node->bv[2];
@@ -1591,7 +1591,7 @@ static void dfs_range_query(RangeQueryData *data, BVHNode *node)
                        float nearest[3];
                        float dist = calc_nearest_point(data->center, node->children[i], nearest);
                        if (dist < data->radius) {
-                               //Its a leaf.. call the callback
+                               /* Its a leaf.. call the callback */
                                if (node->children[i]->totnode == 0) {
                                        data->hits++;
                                        data->callback(data->userdata, node->children[i]->index, dist);
index 858eef0..688372b 100644 (file)
@@ -502,7 +502,7 @@ void BLI_dlrbTree_insert(DLRBT_Tree *tree, DLRBT_Node *node)
 /* ----- */
 
 /* Add the given data to the tree, and return the node added */
-// NOTE: for duplicates, the update_cb is called (if available), and the existing node is returned
+/* NOTE: for duplicates, the update_cb is called (if available), and the existing node is returned */
 DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, 
                              DLRBT_NAlloc_FP new_cb, DLRBT_NUpdate_FP update_cb, void *data)
 {
index 51e4ab0..4ccfb62 100644 (file)
@@ -473,10 +473,10 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf)
        VFontData *vfd = NULL;
        int success = 0;
 
-       //init Freetype 
+       /* init Freetype */
        err = FT_Init_FreeType(&library);
        if (err) {
-               //XXX error("Failed to load the Freetype font library");
+               /* XXX error("Failed to load the Freetype font library"); */
                return NULL;
        }
 
@@ -486,7 +486,7 @@ VFontData *BLI_vfontdata_from_freetypefont(PackedFile *pf)
                vfd = objfnt_to_ftvfontdata(pf);
        }
 
-       //free Freetype
+       /* free Freetype */
        FT_Done_FreeType(library);
        
        return vfd;
@@ -518,7 +518,7 @@ int BLI_vfontchar_from_freetypefont(VFont *vfont, unsigned long character)
 
 #if 0
 
-// Freetype2 Outline struct
+/* Freetype2 Outline struct */
 
 typedef struct  FT_Outline_
 {
index 50cef03..122fc8e 100644 (file)
@@ -939,10 +939,10 @@ void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
 /* "Improved Collision detection and Response" */
 static int getLowestRoot(const float a, const float b, const float c, const float maxR, float *root)
 {
-       // Check if a solution exists
+       /* Check if a solution exists */
        float determinant = b * b - 4.0f * a * c;
 
-       // If determinant is negative it means no solutions.
+       /* If determinant is negative it means no solutions. */
        if (determinant >= 0.0f) {
                /* calculate the two roots: (if determinant == 0 then
                 * x1==x2 but lets disregard that slight optimization) */
@@ -950,24 +950,24 @@ static int getLowestRoot(const float a, const float b, const float c, const floa
                float r1 = (-b - sqrtD) / (2.0f * a);
                float r2 = (-b + sqrtD) / (2.0f * a);
 
-               // Sort so x1 <= x2
+               /* Sort so x1 <= x2 */
                if (r1 > r2)
                        SWAP(float, r1, r2);
 
-               // Get lowest root:
+               /* Get lowest root: */
                if (r1 > 0.0f && r1 < maxR) {
                        *root = r1;
                        return 1;
                }
 
-               // It is possible that we want x2 - this can happen
-               // if x1 < 0
+               /* It is possible that we want x2 - this can happen */
+               /* if x1 < 0 */
                if (r2 > 0.0f && r2 < maxR) {
                        *root = r2;
                        return 1;
                }
        }
-       // No (valid) solutions
+       /* No (valid) solutions */
        return 0;
 }
 
@@ -1080,7 +1080,7 @@ int isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const flo
        }
 
        /*---test edges---*/
-       sub_v3_v3v3(e3, v2, v1); //wasnt yet calculated
+       sub_v3_v3v3(e3, v2, v1);  /* wasnt yet calculated */
 
 
        /*e1*/
@@ -1344,7 +1344,7 @@ void isect_ray_aabb_initialize(IsectRayAABBData *data, const float ray_start[3],
 
 /* Adapted from http://www.gamedev.net/community/forums/topic.asp?topic_id=459973 */
 int isect_ray_aabb(const IsectRayAABBData *data, const float bb_min[3],
-                                  const float bb_max[3], float *tmin_out)
+                   const float bb_max[3], float *tmin_out)
 {
        float bbox[2][3];
        float tmin, tmax, tymin, tymax, tzmin, tzmax;
@@ -1587,7 +1587,7 @@ void isect_point_face_uv_v2(const int isquad,
        }
 }
 
-#if 0 // XXX this version used to be used in isect_point_tri_v2_int() and was called IsPointInTri2D
+#if 0  /* XXX this version used to be used in isect_point_tri_v2_int() and was called IsPointInTri2D */
 
 int isect_point_tri_v2(float pt[2], float v1[2], float v2[2], float v3[2])
 {
@@ -1777,7 +1777,7 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
        signed char ix;
        signed char iy;
 
-       // if x1 == x2 or y1 == y2, then it does not matter what we set here
+       /* if x1 == x2 or y1 == y2, then it does not matter what we set here */
        int delta_x = (x2 > x1 ? (ix = 1, x2 - x1) : (ix = -1, x1 - x2)) << 1;
        int delta_y = (y2 > y1 ? (iy = 1, y2 - y1) : (iy = -1, y1 - y2)) << 1;
 
@@ -1786,7 +1786,7 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
        }
 
        if (delta_x >= delta_y) {
-               // error may go below zero
+               /* error may go below zero */
                int error = delta_y - (delta_x >> 1);
 
                while (x1 != x2) {
@@ -1795,9 +1795,9 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
                                        y1 += iy;
                                        error -= delta_x;
                                }
-                               // else do nothing
+                               /* else do nothing */
                        }
-                       // else do nothing
+                       /* else do nothing */
 
                        x1 += ix;
                        error += delta_y;
@@ -1808,7 +1808,7 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
                }
        }
        else {
-               // error may go below zero
+               /* error may go below zero */
                int error = delta_x - (delta_y >> 1);
 
                while (y1 != y2) {
@@ -1817,9 +1817,9 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
                                        x1 += ix;
                                        error -= delta_y;
                                }
-                               // else do nothing
+                               /* else do nothing */
                        }
-                       // else do nothing
+                       /* else do nothing */
 
                        y1 += iy;
                        error += delta_x;
@@ -2334,7 +2334,7 @@ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const
        const double fC = (st1[0] - st[0]) * (st1[1] - st2[1]) - (st1[1] - st[1]) * (st1[0] - st2[0]);
        const double denom = a - 2 * b + fC;
 
-       // clear outputs
+       /* clear outputs */
        zero_v2(r_uv);
 
        if (IS_ZERO(denom) != 0) {
@@ -2650,7 +2650,7 @@ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3],
                        const float *cur_edge = vdiffs[i];
                        const float fac = saacos(-dot_v3v3(cur_edge, prev_edge));
 
-                       // accumulate
+                       /* accumulate */
                        madd_v3_v3fl(vn[i], f_no, fac);
                        prev_edge = cur_edge;
                }
index 1f61b37..3e19ea4 100644 (file)
@@ -1408,8 +1408,8 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
 
        int i = 0, j = 0, k = 0, p, pp, iter;
 
-       // Reduce A to bidiagonal form, storing the diagonal elements
-       // in s and the super-diagonal elements in e.
+       /* Reduce A to bidiagonal form, storing the diagonal elements
+        * in s and the super-diagonal elements in e. */
 
        int nct = minf(m - 1, n);
        int nrt = maxf(0, minf(n - 2, m));
@@ -1421,9 +1421,9 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
        for (k = 0; k < maxf(nct, nrt); k++) {
                if (k < nct) {
 
-                       // Compute the transformation for the k-th column and
-                       // place the k-th diagonal in s[k].
-                       // Compute 2-norm of k-th column without under/overflow.
+                       /* Compute the transformation for the k-th column and
+                        * place the k-th diagonal in s[k].
+                        * Compute 2-norm of k-th column without under/overflow. */
                        s[k] = 0;
                        for (i = k; i < m; i++) {
                                s[k] = hypotf(s[k], A[i][k]);
@@ -1444,7 +1444,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                for (j = k + 1; j < n; j++) {
                        if ((k < nct) && (s[k] != 0.0f)) {
 
-                               // Apply the transformation.
+                               /* Apply the transformation. */
 
                                float t = 0;
                                for (i = k; i < m; i++) {
@@ -1456,24 +1456,24 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                }
                        }
 
-                       // Place the k-th row of A into e for the
-                       // subsequent calculation of the row transformation.
+                       /* Place the k-th row of A into e for the */
+                       /* subsequent calculation of the row transformation. */
 
                        e[j] = A[k][j];
                }
                if (k < nct) {
 
-                       // Place the transformation in U for subsequent back
-                       // multiplication.
+                       /* Place the transformation in U for subsequent back
+                        * multiplication. */
 
                        for (i = k; i < m; i++)
                                U[i][k] = A[i][k];
                }
                if (k < nrt) {
 
-                       // Compute the k-th row transformation and place the
-                       // k-th super-diagonal in e[k].
-                       // Compute 2-norm without under/overflow.
+                       /* Compute the k-th row transformation and place the
+                        * k-th super-diagonal in e[k].
+                        * Compute 2-norm without under/overflow. */
                        e[k] = 0;
                        for (i = k + 1; i < n; i++) {
                                e[k] = hypotf(e[k], e[i]);
@@ -1493,7 +1493,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                        if ((k + 1 < m) & (e[k] != 0.0f)) {
                                float invek1;
 
-                               // Apply the transformation.
+                               /* Apply the transformation. */
 
                                for (i = k + 1; i < m; i++) {
                                        work[i] = 0.0f;
@@ -1512,15 +1512,15 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                }
                        }
 
-                       // Place the transformation in V for subsequent
-                       // back multiplication.
+                       /* Place the transformation in V for subsequent
+                        * back multiplication. */
 
                        for (i = k + 1; i < n; i++)
                                V[i][k] = e[i];
                }
        }
 
-       // Set up the final bidiagonal matrix or order p.
+       /* Set up the final bidiagonal matrix or order p. */
 
        p = minf(n, m + 1);
        if (nct < n) {
@@ -1534,7 +1534,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
        }
        e[p - 1] = 0.0f;
 
-       // If required, generate U.
+       /* If required, generate U. */
 
        for (j = nct; j < nu; j++) {
                for (i = 0; i < m; i++) {
@@ -1570,7 +1570,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                }
        }
 
-       // If required, generate V.
+       /* If required, generate V. */
 
        for (k = n - 1; k >= 0; k--) {
                if ((k < nrt) & (e[k] != 0.0f)) {
@@ -1591,7 +1591,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                V[k][k] = 1.0f;
        }
 
-       // Main iteration loop for the singular values.
+       /* Main iteration loop for the singular values. */
 
        pp = p - 1;
        iter = 0;
@@ -1599,20 +1599,20 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
        while (p > 0) {
                int kase = 0;
 
-               // Test for maximum iterations to avoid infinite loop
+               /* Test for maximum iterations to avoid infinite loop */
                if (maxiter == 0)
                        break;
                maxiter--;
 
-               // This section of the program inspects for
-               // negligible elements in the s and e arrays.  On
-               // completion the variables kase and k are set as follows.
-
-               // kase = 1       if s(p) and e[k - 1] are negligible and k<p
-               // kase = 2       if s(k) is negligible and k<p
-               // kase = 3       if e[k - 1] is negligible, k<p, and
-               //               s(k), ..., s(p) are not negligible (qr step).
-               // kase = 4       if e(p - 1) is negligible (convergence).
+               /* This section of the program inspects for
+                * negligible elements in the s and e arrays.  On
+                * completion the variables kase and k are set as follows.
+                *
+                * kase = 1       if s(p) and e[k - 1] are negligible and k<p
+                * kase = 2       if s(k) is negligible and k<p
+                * kase = 3       if e[k - 1] is negligible, k<p, and
+                *               s(k), ..., s(p) are not negligible (qr step).
+                * kase = 4       if e(p - 1) is negligible (convergence). */
 
                for (k = p - 2; k >= -1; k--) {
                        if (k == -1) {
@@ -1653,11 +1653,11 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                }
                k++;
 
-               // Perform the task indicated by kase.
+               /* Perform the task indicated by kase. */
 
                switch (kase) {
 
-                       // Deflate negligible s(p).
+                       /* Deflate negligible s(p). */
 
                        case 1:
                        {
@@ -1683,7 +1683,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                break;
                        }
 
-                       // Split at negligible s(k).
+                       /* Split at negligible s(k). */
 
                        case 2:
                        {
@@ -1707,12 +1707,12 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                break;
                        }
 
-                       // Perform one qr step.
+                       /* Perform one qr step. */
 
                        case 3:
                        {
 
-                               // Calculate the shift.
+                               /* Calculate the shift. */
 
                                float scale = maxf(maxf(maxf(maxf(
                                                   fabsf(s[p - 1]), fabsf(s[p - 2])), fabsf(e[p - 2])),
@@ -1737,7 +1737,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                f = (sk + sp) * (sk - sp) + shift;
                                g = sk * ek;
 
-                               // Chase zeros.
+                               /* Chase zeros. */
 
                                for (j = k; j < p - 1; j++) {
                                        float t = hypotf(f, g);
@@ -1779,12 +1779,12 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                iter = iter + 1;
                                break;
                        }
-                       // Convergence.
+                       /* Convergence. */
 
                        case 4:
                        {
 
-                               // Make the singular values positive.
+                               /* Make the singular values positive. */
 
                                if (s[k] <= 0.0f) {
                                        s[k] = (s[k] < 0.0f ? -s[k] : 0.0f);
@@ -1793,7 +1793,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4])
                                                V[i][k] = -V[i][k];
                                }
 
-                               // Order the singular values.
+                               /* Order the singular values. */
 
                                while (k < pp) {
                                        float t;
index 53f2c1c..ce13a27 100644 (file)
@@ -797,7 +797,7 @@ void mat3_to_axis_angle(float axis[3], float *angle, float mat[3][3])
        float q[4];
 
        /* use quaternions as intermediate representation */
-       // TODO: it would be nicer to go straight there...
+       /* TODO: it would be nicer to go straight there... */
        mat3_to_quat(q, mat);
        quat_to_axis_angle(axis, angle, q);
 }
@@ -808,7 +808,7 @@ void mat4_to_axis_angle(float axis[3], float *angle, float mat[4][4])
        float q[4];
 
        /* use quaternions as intermediate representation */
-       // TODO: it would be nicer to go straight there...
+       /* TODO: it would be nicer to go straight there... */
        mat4_to_quat(q, mat);
        quat_to_axis_angle(axis, angle, q);
 }
@@ -1363,7 +1363,7 @@ void mat4_to_compatible_eulO(float eul[3], float oldrot[3], const short order, f
        mat3_to_compatible_eulO(eul, oldrot, order, m);
 }
 /* rotate the given euler by the given angle on the specified axis */
-// NOTE: is this safe to do with different axis orders?
+/* NOTE: is this safe to do with different axis orders? */
 
 void rotate_eulO(float beul[3], const short order, char axis, float ang)
 {
@@ -1691,7 +1691,7 @@ void vec_apply_track(float vec[3], short axis)
                case 2: /* pos-z */
                        /* vec[0]= tvec[0]; */
                        /* vec[1]= tvec[1]; */
-                       // vec[2]=  0.0; */
+                       /* vec[2]=  0.0; */
                        break;
                case 3: /* neg-x */
                        /* vec[0]=  0.0; */
index cc482e2..0ae18d6 100644 (file)
@@ -47,7 +47,7 @@
 #include "BLI_string_utf8.h"
 #include "BLI_utildefines.h"
 
-#include "BKE_blender.h"    // BLENDER_VERSION
+#include "BKE_blender.h"  /* BLENDER_VERSION */
 
 #include "GHOST_Path-api.h"
 
index 0d3f6ae..dec0493 100644 (file)
@@ -418,9 +418,9 @@ static void bli_adddirstrings(void)
 
 unsigned int BLI_dir_contents(const char *dirname,  struct direntry **filelist)
 {
-       // reset global variables
-       // memory stored in files is free()'d in
-       // filesel.c:freefilelist()
+       /* reset global variables
+        * memory stored in files is free()'d in
+        * filesel.c:freefilelist() */
 
        actnum = totnum = 0;
        files = NULL;
index a3cfa44..6d8991c 100644 (file)
@@ -32,7 +32,7 @@
 #include "zlib.h"
 
 #ifndef WIN32
-#  include <unistd.h> // for read close
+#  include <unistd.h>  /* for read close */
 #else
 #  include <io.h> // for open close read
 #  include "winsock2.h"
@@ -2333,7 +2333,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
                for (sc = main->screen.first; sc; sc = sc->id.next) {
                        if (sc->redraws_flag == 0) {
                                /* just initialize to default? */
-                               // XXX: we could also have iterated through areas, and taken them from the first timeline available...
+                               /* XXX: we could also have iterated through areas, and taken them from the first timeline available... */
                                sc->redraws_flag = TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN;
                        }
                }
index 3139894..3fd65de 100644 (file)
@@ -105,7 +105,7 @@ typedef struct tPoseSlideOp {
        int nextFrame;      /* frame after current frame (blend-to) */
        
        int mode;           /* sliding mode (ePoseSlide_Modes) */
-       int flag;           // unused for now, but can later get used for storing runtime settings....
+       int flag;           /* unused for now, but can later get used for storing runtime settings.... */
        
        float percentage;   /* 0-1 value for determining the influence of whatever is relevant */
 } tPoseSlideOp;
@@ -486,7 +486,7 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
                                pose_slide_apply_vec3(pso, pfl, pchan->eul, "rotation_euler");
                        }
                        else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
-                               // TODO: need to figure out how to do this!
+                               /* TODO: need to figure out how to do this! */
                        }
                        else {
                                /* quaternions - use quaternion blending */
@@ -538,7 +538,7 @@ static void pose_slide_draw_status(tPoseSlideOp *pso)
                        break;
                
                default:
-                       // unknown
+                       /* unknown */
                        strcpy(mode_str, "Sliding-Tool");
                        break;
        }
@@ -606,7 +606,7 @@ static int pose_slide_invoke_common(bContext *C, wmOperator *op, tPoseSlideOp *p
        }
        
        /* initial apply for operator... */
-       // TODO: need to calculate percentage for initial round too...
+       /* TODO: need to calculate percentage for initial round too... */
        pose_slide_apply(C, pso);
        
        /* depsgraph updates + redraws */
@@ -1152,7 +1152,7 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
                }
                
                /* just flatten handles, since values will now be the same either side... */
-               // TODO: perhaps a fade-out modulation of the value is required here (optional once again)?
+               /* TODO: perhaps a fade-out modulation of the value is required here (optional once again)? */
                bezt->vec[0][1] = bezt->vec[1][1] = bezt->vec[2][1] = refVal;
                
                /* select keyframe to indicate that it's been changed */
@@ -1247,13 +1247,13 @@ void POSE_OT_propagate(wmOperatorType *ot)
        
        /* callbacks */
        ot->exec = pose_propagate_exec;
-       ot->poll = ED_operator_posemode; // XXX: needs selected bones!
+       ot->poll = ED_operator_posemode;  /* XXX: needs selected bones! */
        
        /* flag */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        /* properties */
-       // TODO: add "fade out" control for tapering off amount of propagation as time goes by?
+       /* TODO: add "fade out" control for tapering off amount of propagation as time goes by? */
        ot->prop = RNA_def_enum(ot->srna, "mode", terminate_items, POSE_PROPAGATE_SMART_HOLDS, "Terminate Mode", "Method used to determine when to stop propagating pose to keyframes");
        RNA_def_float(ot->srna, "end_frame", 250.0, FLT_MIN, FLT_MAX, "End Frame", "Frame to stop propagating frames to (for 'Before Frame' mode)", 1.0, 250.0);
 }
index 3b26c46..725ffce 100644 (file)
@@ -661,11 +661,11 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
 
 /* ----- Grease Pencil Sketches Drawing API ------ */
 
-// ............................
-// XXX 
-//     We need to review the calls below, since they may be/are not that suitable for
-//     the new ways that we intend to be drawing data...
-// ............................
+/* ............................
+ * XXX
+ *     We need to review the calls below, since they may be/are not that suitable for
+ *     the new ways that we intend to be drawing data...
+ * ............................ */
 
 /* draw grease-pencil sketches to specified 2d-view that uses ibuf corrections */
 void draw_gpencil_2dimage(const bContext *C)
index 1efb243..e03a288 100644 (file)
@@ -651,7 +651,7 @@ void ui_theme_init_default(void)
                strcpy(btheme->name, "Default");
        }
        
-       UI_SetTheme(0, 0);  // make sure the global used in this file is set
+       UI_SetTheme(0, 0);  /* make sure the global used in this file is set */
 
        /* UI buttons */
        ui_widget_color_init(&btheme->tui);
@@ -808,9 +808,9 @@ void ui_theme_init_default(void)
        rgba_char_args_set_fl(btheme->tfile.list, 0.4, 0.4, 0.4, 1);
        rgba_char_args_set(btheme->tfile.text,  250, 250, 250, 255);
        rgba_char_args_set(btheme->tfile.text_hi, 15, 15, 15, 255);
-       rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255);    // bookmark/ui regions
-       rgba_char_args_set(btheme->tfile.active, 130, 130, 130, 255); // selected files
-       rgba_char_args_set(btheme->tfile.hilite, 255, 140, 25, 255); // selected files
+       rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255);  /* bookmark/ui regions */
+       rgba_char_args_set(btheme->tfile.active, 130, 130, 130, 255); /* selected files */
+       rgba_char_args_set(btheme->tfile.hilite, 255, 140, 25, 255);  /* selected files */
        
        rgba_char_args_set(btheme->tfile.grid,  250, 250, 250, 255);
        rgba_char_args_set(btheme->tfile.image, 250, 250, 250, 255);
@@ -891,7 +891,7 @@ void ui_theme_init_default(void)
        btheme->ttime = btheme->tv3d;
        rgba_char_args_set_fl(btheme->ttime.back,   0.45, 0.45, 0.45, 1.0);
        rgba_char_args_set_fl(btheme->ttime.grid,   0.36, 0.36, 0.36, 1.0);
-       rgba_char_args_set(btheme->ttime.shade1,  173, 173, 173, 255);      // sliders
+       rgba_char_args_set(btheme->ttime.shade1,  173, 173, 173, 255);      /* sliders */
        
        /* space node, re-uses syntax color storage */
        btheme->tnode = btheme->tv3d;
@@ -932,7 +932,7 @@ void ui_theme_init_default(void)
 
 void UI_SetTheme(int spacetype, int regionid)
 {
-       if (spacetype == 0) { // called for safety, when delete themes
+       if (spacetype == 0) {  /* called for safety, when delete themes */
                theme_active = U.themes.first;
                theme_spacetype = SPACE_VIEW3D;
                theme_regionid = RGN_TYPE_WINDOW;
@@ -950,7 +950,7 @@ bTheme *UI_GetTheme(void)
        return U.themes.first;
 }
 
-// for space windows only
+/* for space windows only */
 void UI_ThemeColor(int colorid)
 {
        const unsigned char *cp;
@@ -960,7 +960,7 @@ void UI_ThemeColor(int colorid)
 
 }
 
-// plus alpha
+/* plus alpha */
 void UI_ThemeColor4(int colorid)
 {
        const unsigned char *cp;
@@ -970,7 +970,7 @@ void UI_ThemeColor4(int colorid)
 
 }
 
-// set the color with offset for shades
+/* set the color with offset for shades */
 void UI_ThemeColorShade(int colorid, int offset)
 {
        int r, g, b;
@@ -1003,7 +1003,7 @@ void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset)
        glColor4ub(r, g, b, a);
 }
 
-// blend between to theme colors, and set it
+/* blend between to theme colors, and set it */
 void UI_ThemeColorBlend(int colorid1, int colorid2, float fac)
 {
        int r, g, b;
@@ -1020,7 +1020,7 @@ void UI_ThemeColorBlend(int colorid1, int colorid2, float fac)
        glColor3ub(r, g, b);
 }
 
-// blend between to theme colors, shade it, and set it
+/* blend between to theme colors, shade it, and set it */
 void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset)
 {
        int r, g, b;
@@ -1041,7 +1041,7 @@ void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset)
        glColor3ub(r, g, b);
 }
 
-// blend between to theme colors, shade it, and set it
+/* blend between to theme colors, shade it, and set it */
 void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int offset, int alphaoffset)
 {
        int r, g, b, a;
@@ -1065,7 +1065,7 @@ void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int off
 }
 
 
-// get individual values, not scaled
+/* get individual values, not scaled */
 float UI_GetThemeValuef(int colorid)
 {
        const unsigned char *cp;
@@ -1075,7 +1075,7 @@ float UI_GetThemeValuef(int colorid)
 
 }
 
-// get individual values, not scaled
+/* get individual values, not scaled */
 int UI_GetThemeValue(int colorid)
 {
        const unsigned char *cp;
@@ -1086,7 +1086,7 @@ int UI_GetThemeValue(int colorid)
 }
 
 
-// get the color, range 0.0-1.0
+/* get the color, range 0.0-1.0 */
 void UI_GetThemeColor3fv(int colorid, float col[3])
 {
        const unsigned char *cp;
@@ -1108,7 +1108,7 @@ void UI_GetThemeColor4fv(int colorid, float col[4])
        col[3] = ((float)cp[3]) / 255.0f;
 }
 
-// get the color, range 0.0-1.0, complete with shading offset
+/* get the color, range 0.0-1.0, complete with shading offset */
 void UI_GetThemeColorShade3fv(int colorid, int offset, float col[3])
 {
        int r, g, b;
@@ -1147,7 +1147,7 @@ void UI_GetThemeColorShade3ubv(int colorid, int offset, unsigned char col[3])
        col[2] = b;
 }
 
-// get the color, in char pointer
+/* get the color, in char pointer */
 void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
 {
        const unsigned char *cp;
@@ -1158,7 +1158,7 @@ void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
        col[2] = cp[2];
 }
 
-// get the color, in char pointer
+/* get the color, in char pointer */
 void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
 {
        const unsigned char *cp;
@@ -1181,7 +1181,7 @@ void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4])
        col[3] = cp[3];
 }
 
-// blends and shades between two char color pointers
+/* blends and shades between two char color pointers */
 void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset)
 {
        int r, g, b;
@@ -1214,7 +1214,7 @@ void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], in
        col[2] = b;
 }
 
-// get a 3 byte color, blended and shaded between two other char color pointers
+/* get a 3 byte color, blended and shaded between two other char color pointers */
 void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3],
                                   float fac, int offset)
 {
@@ -1360,7 +1360,7 @@ void init_userdef_do_versions(void)
                                btheme->ttime = btheme->tv3d;
                                rgba_char_args_set_fl(btheme->ttime.back,   0.45, 0.45, 0.45, 1.0);
                                rgba_char_args_set_fl(btheme->ttime.grid,   0.36, 0.36, 0.36, 1.0);
-                               rgba_char_args_set(btheme->ttime.shade1,  173, 173, 173, 255);      // sliders
+                               rgba_char_args_set(btheme->ttime.shade1,  173, 173, 173, 255);  /* sliders */
                        }
                        if (btheme->text.syntaxn[3] == 0) {
                                rgba_char_args_set(btheme->text.syntaxn,    0, 0, 200, 255);    /* Numbers  Blue*/
index 2dbcd20..1df3785 100644 (file)
@@ -255,7 +255,7 @@ static short edbm_extrude_discrete_faces(BMEditMesh *em, wmOperator *op, const c
                return 0;
        }
 
-       return 's'; // s is shrink/fatten
+       return 's';  /* s is shrink/fatten */
 }
 
 /* extrudes individual edges */
@@ -275,7 +275,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
                return 0;
        }
 
-       return 'n'; // n is normal grab
+       return 'n';  /* n is normal grab */
 }
 
 /* extrudes individual vertices */
@@ -295,7 +295,7 @@ static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char
                return 0;
        }
 
-       return 'g'; // g is grab
+       return 'g';  /* g is grab */
 }
 
 static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, float nor[3])
index b6d3594..d19277d 100644 (file)
@@ -393,7 +393,7 @@ void ED_keymap_object(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "OBJECT_OT_proxy_make", PKEY, KM_PRESS, KM_CTRL | KM_ALT, 0);
        WM_keymap_add_item(keymap, "OBJECT_OT_make_local", LKEY, KM_PRESS, 0, 0);
 
-       // XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith
+       /* XXX this should probably be in screen instead... here for testing purposes in the meantime... - Aligorith */
        WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_insert_menu", IKEY, KM_PRESS, 0, 0);
        WM_keymap_verify_item(keymap, "ANIM_OT_keyframe_delete_v3d", IKEY, KM_PRESS, KM_ALT, 0);
        WM_keymap_verify_item(keymap, "ANIM_OT_keying_set_active_set", IKEY, KM_PRESS, KM_CTRL | KM_SHIFT | KM_ALT, 0);
index 4ed14c3..1388ce6 100644 (file)
@@ -612,7 +612,7 @@ static short select_grouped_group(bContext *C, Object *ob)  /* Select objects in
        }
 
        uiPupMenuEnd(C, pup);
-       return changed; // The operator already handle this!
+       return changed;  /* The operator already handle this! */
 }
 
 static short select_grouped_object_hooks(bContext *C, Object *ob)
@@ -754,8 +754,8 @@ static short select_grouped_keyingset(bContext *C, Object *UNUSED(ob))
                return 0;
        
        /* select each object that Keying Set refers to */
-       // TODO: perhaps to be more in line with the rest of these, we should only take objects 
-       // if the passed in object is included in this too
+       /* TODO: perhaps to be more in line with the rest of these, we should only take objects
+        * if the passed in object is included in this too */
        CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
        {
                /* only check for this object if it isn't selected already, to limit time wasted */
index 1be0984..b9f6f0b 100644 (file)
@@ -941,7 +941,7 @@ static void vgroup_select_verts(Object *ob, int select)
                        }
 
                        /* this has to be called, because this function operates on vertices only */
-                       if (select) EDBM_select_flush(em);  // vertices to edges/faces
+                       if (select) EDBM_select_flush(em);  /* vertices to edges/faces */
                        else EDBM_deselect_flush(em);
                }
                else {
@@ -1180,17 +1180,18 @@ static void getVerticalAndHorizontalChange(const float norm[3], float d, const f
 
        closest_to_plane_v3(projA, coord, norm, start);
        closest_to_plane_v3(projB, coord, norm, end);
-       // (vertical and horizontal refer to the plane's y and xz respectively)
-       // vertical distance
+       /* (vertical and horizontal refer to the plane's y and xz respectively)
+        * vertical distance */
        dists[index] = dot_v3v3(norm, end) + d;
-       // vertical change
+       /* vertical change */
        changes[index][0] = dists[index] - distToStart;
        //printf("vc %f %f\n", distance(end, projB, 3)-distance(start, projA, 3), changes[index][0]);
-       // horizontal change
+       /* horizontal change */
        changes[index][1] = len_v3v3(projA, projB);
 }
 
-// I need the derived mesh to be forgotten so the positions are recalculated with weight changes (see dm_deform_recalc)
+/* I need the derived mesh to be forgotten so the positions are recalculated
+ * with weight changes (see dm_deform_recalc) */
 static void dm_deform_clear(DerivedMesh *dm, Object *ob)
 {
        if (ob->derivedDeform && (ob->derivedDeform) == dm) {
@@ -1311,7 +1312,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
                                }
                        }
                }
-               // sort the changes by the vertical change
+               /* sort the changes by the vertical change */
                for (k = 0; k < totweight; k++) {
                        float tf;
                        int ti;
@@ -1323,7 +1324,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
                                        bestIndex = i;
                                }
                        }
-                       // switch with k
+                       /* switch with k */
                        if (bestIndex != k) {
                                ti = upDown[k];
                                upDown[k] = upDown[bestIndex];
index 1d0e5bb..97c8e14 100644 (file)
@@ -716,7 +716,7 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
                }
        }
 
-       // no redraw needed, we leave state as we entered it
+       /* no redraw needed, we leave state as we entered it */
 //     ED_update_for_newframe(C, 1);
        WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, CTX_data_scene(C));
 
index 5eac841..7dbae6e 100644 (file)
@@ -256,7 +256,7 @@ int ED_operator_node_active(bContext *C)
        return 0;
 }
 
-// XXX rename
+/* XXX rename */
 int ED_operator_graphedit_active(bContext *C)
 {
        return ed_spacetype_test(C, SPACE_IPO);
@@ -3125,7 +3125,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
                /* recalculate the timestep for the timer now that we've finished calculating this,
                 * since the frames-per-second value may have been changed
                 */
-               // TODO: this may make evaluation a bit slower if the value doesn't change... any way to avoid this?
+               /* TODO: this may make evaluation a bit slower if the value doesn't change... any way to avoid this? */
                wt->timestep = (1.0 / FPS);
                
                return OPERATOR_FINISHED;
@@ -3175,7 +3175,7 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
        else {
                int refresh = SPACE_TIME; /* these settings are currently only available from a menu in the TimeLine */
                
-               if (mode == 1) // XXX only play audio forwards!?
+               if (mode == 1)  /* XXX only play audio forwards!? */
                        sound_play_scene(scene);
                
                ED_screen_animation_timer(C, screen->redraws_flag, refresh, sync, mode);
@@ -3427,7 +3427,7 @@ static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op))
 static void SCREEN_OT_delete(wmOperatorType *ot)
 {
        /* identifiers */
-       ot->name = "Delete Screen"; //was scene
+       ot->name = "Delete Screen";  /* was scene */
        ot->description = "Delete active screen";
        ot->idname = "SCREEN_OT_delete";
        
@@ -3744,7 +3744,7 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", MEDIASTOP, KM_PRESS, 0, 0);
        
        /* Alternative keys for animation and sequencer playing */
-#if 0 // XXX: disabled for restoring later... bad implementation
+#if 0 /* XXX: disabled for restoring later... bad implementation */
        keymap = WM_keymap_find(keyconf, "Frames", 0, 0);
        kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE);
index 2ae24db..c6df3a0 100644 (file)
@@ -406,10 +406,10 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event)
        paint_stroke_add_sample(p, stroke, event->x, event->y);
        paint_stroke_sample_average(stroke, &sample_average);
 
-       // let NDOF motion pass through to the 3D view so we can paint and rotate simultaneously!
-       // this isn't perfect... even when an extra MOUSEMOVE is spoofed, the stroke discards it
-       // since the 2D deltas are zero -- code in this file needs to be updated to use the
-       // post-NDOF_MOTION MOUSEMOVE
+       /* let NDOF motion pass through to the 3D view so we can paint and rotate simultaneously!
+        * this isn't perfect... even when an extra MOUSEMOVE is spoofed, the stroke discards it
+        * since the 2D deltas are zero -- code in this file needs to be updated to use the
+        * post-NDOF_MOTION MOUSEMOVE */
        if (event->type == NDOF_MOTION)
                return OPERATOR_PASS_THROUGH;
 
index eeb297b..4342dd5 100644 (file)
@@ -132,7 +132,7 @@ void ACTION_OT_new(wmOperatorType *ot)
        
        /* api callbacks */
        ot->exec = act_new_exec;
-       // NOTE: this is used in the NLA too...
+       /* NOTE: this is used in the NLA too... */
        //ot->poll = ED_operator_action_active;
        
        /* flags */
@@ -234,8 +234,8 @@ static void get_keyframe_extents(bAnimContext *ac, float *min, float *max, const
        int filter;
        
        /* get data to filter, from Action or Dopesheet */
-       // XXX: what is sel doing here?!
-       //      Commented it, was breaking things (eg. the "auto preview range" tool).
+       /* XXX: what is sel doing here?!
+        *      Commented it, was breaking things (eg. the "auto preview range" tool). */
        filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_SEL *//*| ANIMFILTER_CURVESONLY*/ | ANIMFILTER_NODUPLIS);
        ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
        
@@ -542,7 +542,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
        
        /* paste keyframes */
        if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) {
-               // FIXME...
+               /* FIXME... */
                BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil or Mask mode");
                return OPERATOR_CANCELLED;
        }
@@ -588,7 +588,7 @@ void ACTION_OT_paste(wmOperatorType *ot)
 static EnumPropertyItem prop_actkeys_insertkey_types[] = {
        {1, "ALL", 0, "All Channels", ""},
        {2, "SEL", 0, "Only Selected Channels", ""},
-       {3, "GROUP", 0, "In Active Group", ""}, // xxx not in all cases
+       {3, "GROUP", 0, "In Active Group", ""},  /* XXX not in all cases */
        {0, NULL, 0, NULL, NULL}
 };
 
@@ -1010,7 +1010,7 @@ static void setexpo_action_keys(bAnimContext *ac, short mode)
                        if (mode == MAKE_CYCLIC_EXPO) {
                                /* only add if one doesn't exist */
                                if (list_has_suitable_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES, -1) == 0) {
-                                       // TODO: add some more preset versions which set different extrapolation options?
+                                       /* TODO: add some more preset versions which set different extrapolation options? */
                                        add_fmodifier(&fcu->modifiers, FMODIFIER_TYPE_CYCLES);
                                }
                        }
@@ -1435,7 +1435,7 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
                
-       // XXX...
+       /* XXX... */
        if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK))
                return OPERATOR_PASS_THROUGH;
                
@@ -1502,7 +1502,7 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
        ked.scene = ac->scene;
        
        /* for 'first selected marker' mode, need to find first selected marker first! */
-       // XXX should this be made into a helper func in the API?
+       /* XXX should this be made into a helper func in the API? */
        if (mode == ACTKEYS_MIRROR_MARKER) {
                TimeMarker *marker = ED_markers_get_first_selected(ac->markers);
                
@@ -1548,7 +1548,7 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
                
-       // XXX...
+       /* XXX... */
        if (ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK))
                return OPERATOR_PASS_THROUGH;
                
index c4a5c2a..f19835b 100644 (file)
@@ -84,7 +84,7 @@ typedef struct ConsoleDrawContext {
 #if 0 /* used by textview, may use later */
        int *xy; // [2]
        int *sel; // [2]
-       int *pos_pick; // bottom of view == 0, top of file == combine chars, end of line is lower then start. 
+       int *pos_pick;  /* bottom of view == 0, top of file == combine chars, end of line is lower then start. */
        int *mval; // [2]
        int draw;
 #endif
index 5da198c..9d5f7fd 100644 (file)
@@ -420,7 +420,7 @@ void filelist_free_icons(void)
        }
 }
 
-//-----------------FOLDERLIST (previous/next) --------------//
+/* -----------------FOLDERLIST (previous/next) -------------- */
 ListBase *folderlist_new(void)
 {
        ListBase *p = MEM_callocN(sizeof(ListBase), "folderlist");
@@ -520,7 +520,7 @@ static void filelist_read_main(struct FileList *filelist);
 static void filelist_read_library(struct FileList *filelist);
 static void filelist_read_dir(struct FileList *filelist);
 
-//------------------FILELIST------------------------//
+/* ------------------FILELIST------------------------ */
 FileList *filelist_new(short type)
 {
        FileList *p = MEM_callocN(sizeof(FileList), "filelist");
@@ -1233,7 +1233,7 @@ void filelist_from_main(struct FileList *filelist)
                                                BLI_snprintf(files->relname, FILE_MAX + (MAX_ID_NAME - 2) + 3, "%s | %s", id->lib->name, id->name + 2);
                                        }
                                        files->type |= S_IFREG;
-#if 0               // XXXXX TODO show the selection status of the objects
+#if 0               /* XXXXX TODO show the selection status of the objects */
                                        if (!filelist->has_func) { /* F4 DATA BROWSE */
                                                if (idcode == ID_OB) {
                                                        if ( ((Object *)id)->flag & SELECT) files->selflag |= SELECTED_FILE;
index ef2e56a..c9864df 100644 (file)
@@ -83,7 +83,7 @@ static float fcurve_display_alpha(FCurve *fcu)
 
 /* Envelope -------------- */
 
-// TODO: draw a shaded poly showing the region of influence too!!!
+/* TODO: draw a shaded poly showing the region of influence too!!! */
 static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
 {
        FMod_Envelope *env = (FMod_Envelope *)fcm->data;
@@ -101,13 +101,13 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
                
        glVertex2f(v2d->cur.xmin, env->midval + env->max);
        glVertex2f(v2d->cur.xmax, env->midval + env->max);
-       glEnd(); // GL_LINES
+       glEnd();  /* GL_LINES */
        setlinestyle(0);
        
        /* set size of vertices (non-adjustable for now) */
        glPointSize(2.0f);
        
-       // for now, point color is fixed, and is white
+       /* for now, point color is fixed, and is white */
        glColor3f(1.0f, 1.0f, 1.0f);
        
        /* we use bgl points not standard gl points, to workaround vertex 
@@ -123,7 +123,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
                        glVertex2f(fed->time, fed->max);
                }
        }
-       bglEnd(); // GL_POINTS
+       bglEnd();  /* GL_POINTS */
        
        glPointSize(1.0f);
 }
@@ -160,13 +160,13 @@ static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo),
                        }
                        else {
                                /* no check for selection here, as curve is not editable... */
-                               // XXX perhaps we don't want to even draw points?   maybe add an option for that later
+                               /* XXX perhaps we don't want to even draw points?   maybe add an option for that later */
                                bglVertex3fv(bezt->vec[1]);
                        }
                }
        }
        
-       bglEnd(); // GL_POINTS
+       bglEnd();  /* GL_POINTS */
 }
 
 
@@ -404,7 +404,7 @@ static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
                }
        }
        
-       glEnd(); // GL_LINES 
+       glEnd();  /* GL_LINES */
 }
 
 /* Samples ---------------- */
@@ -428,7 +428,7 @@ static void draw_fcurve_sample_control(float x, float y, float xscale, float ysc
                        
                glVertex2f(-0.7f, +0.7f);
                glVertex2f(+0.7f, -0.7f);
-               glEnd(); // GL_LINES
+               glEnd();  /* GL_LINES */
                
                glEndList();
        }
@@ -515,7 +515,7 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d
         *  chosen here is just the coarsest value which still looks reasonable...
         */
        /* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */
-       // TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted?
+       /* TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted? */
        samplefreq = dx / U.v2d_min_gridsize;
        if (samplefreq < 0.00001f) samplefreq = 0.00001f;
        
@@ -667,7 +667,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
        }
        
        /* draw curve between first and last keyframe (if there are enough to do so) */
-       // TODO: optimize this to not have to calc stuff out of view too?
+       /* TODO: optimize this to not have to calc stuff out of view too? */
        while (b--) {
                if (prevbezt->ipo == BEZT_IPO_CONST) {
                        /* Constant-Interpolation: draw segment between previous keyframe and next, but holding same value */
@@ -691,7 +691,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
                         */
                        
                        /* resol depends on distance between points (not just horizontal) OR is a fixed high res */
-                       // TODO: view scale should factor into this someday too...
+                       /* TODO: view scale should factor into this someday too... */
                        if (fcu->driver) 
                                resol = 32;
                        else 
@@ -705,7 +705,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
                        }
                        else {
                                /* clamp resolution to max of 32 */
-                               // NOTE: higher values will crash
+                               /* NOTE: higher values will crash */
                                if (resol > 32) resol = 32;
                                
                                v1[0] = prevbezt->vec[1][0];
@@ -852,7 +852,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
                        }
                        if (((fcu->grp) && (fcu->grp->flag & AGRP_MUTED)) || (fcu->flag & FCURVE_MUTED)) {
                                /* muted curves are drawn in a grayish hue */
-                               // XXX should we have some variations?
+                               /* XXX should we have some variations? */
                                UI_ThemeColorShade(TH_HEADER, 50);
                        }
                        else {
index cd358de..0f0a5d2 100644 (file)
@@ -27,7 +27,7 @@
 /* defines VIEW3D_OT_fly modal operator */
 
 //#define NDOF_FLY_DEBUG
-//#define NDOF_FLY_DRAW_TOOMUCH // is this needed for ndof? - commented so redraw doesnt thrash - campbell
+//#define NDOF_FLY_DRAW_TOOMUCH  /* is this needed for ndof? - commented so redraw doesnt thrash - campbell */
 #include "DNA_anim_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
index 00c1f5c..861fb55 100644 (file)
@@ -337,7 +337,7 @@ static int rna_id_write_error(PointerRNA *ptr, PyObject *key)
        }
        return FALSE;
 }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
 
 #ifdef USE_PEDANTIC_WRITE
@@ -350,7 +350,7 @@ void pyrna_write_set(int val)
 {
        rna_disallow_writes = !val;
 }
-#else // USE_PEDANTIC_WRITE
+#else  /* USE_PEDANTIC_WRITE */
 int pyrna_write_check(void)
 {
        return TRUE;
@@ -359,7 +359,7 @@ void pyrna_write_set(int UNUSED(val))
 {
        /* nothing */
 }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
 static Py_ssize_t pyrna_prop_collection_length(BPy_PropertyRNA *self);
 static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self);
@@ -426,7 +426,7 @@ static int mathutils_rna_vector_set(BaseMathObject *bmo, int subtype)
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (!RNA_property_editable_flag(&self->ptr, self->prop)) {
                PyErr_Format(PyExc_AttributeError,
@@ -490,7 +490,7 @@ static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int UNUSED(subtyp
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (!RNA_property_editable_flag(&self->ptr, self->prop)) {
                PyErr_Format(PyExc_AttributeError,
@@ -547,7 +547,7 @@ static int mathutils_rna_matrix_set(BaseMathObject *bmo, int UNUSED(subtype))
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, NULL)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (!RNA_property_editable_flag(&self->ptr, self->prop)) {
                PyErr_Format(PyExc_AttributeError,
@@ -588,7 +588,7 @@ static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_
        return order_fallback;
 }
 
-#endif // USE_MATHUTILS
+#endif  /* USE_MATHUTILS */
 
 /* note that PROP_NONE is included as a vector subtype. this is because its handy to
  * have x/y access to fcurve keyframes and other fixed size float arrays of length 2-4. */
@@ -672,7 +672,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
                                                PropertyRNA *prop_eul_order = NULL;
                                                short order = pyrna_rotation_euler_order_get(ptr, &prop_eul_order, EULER_ORDER_XYZ);
 
-                                               ret = Euler_CreatePyObject(NULL, order, Py_NEW, NULL); // TODO, get order from RNA
+                                               ret = Euler_CreatePyObject(NULL, order, Py_NEW, NULL);  /* TODO, get order from RNA */
                                                RNA_property_float_get_array(ptr, prop, ((EulerObject *)ret)->eul);
                                        }
                                        else {
@@ -698,7 +698,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
                        case PROP_COLOR_GAMMA:
                                if (len == 3) { /* color */
                                        if (is_thick) {
-                                               ret = Color_CreatePyObject(NULL, Py_NEW, NULL); // TODO, get order from RNA
+                                               ret = Color_CreatePyObject(NULL, Py_NEW, NULL);
                                                RNA_property_float_get_array(ptr, prop, ((ColorObject *)ret)->col);
                                        }
                                        else {
@@ -722,10 +722,10 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
                        ret = pyrna_prop_CreatePyObject(ptr, prop); /* owned by the mathutils PyObject */
                }
        }
-#else // USE_MATHUTILS
+#else  /* USE_MATHUTILS */
        (void)ptr;
        (void)prop;
-#endif // USE_MATHUTILS
+#endif  /* USE_MATHUTILS */
 
        return ret;
 }
@@ -1302,7 +1302,7 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
                                       val, RNA_struct_identifier(ptr->type),
                                       ptr_name, RNA_property_identifier(prop));
 
-#if 0           // gives python decoding errors while generating docs :(
+#if 0           /* gives python decoding errors while generating docs :( */
                                char error_str[256];
                                BLI_snprintf(error_str, sizeof(error_str),
                                             "RNA Warning: Current value \"%d\" "
@@ -1371,14 +1371,14 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
                        else {
                                ret = PyUnicode_FromStringAndSize(buf, buf_len);
                        }
-#else // USE_STRING_COERCE
+#else  /* USE_STRING_COERCE */
                        if (subtype == PROP_BYTESTRING) {
                                ret = PyBytes_FromStringAndSize(buf, buf_len);
                        }
                        else {
                                ret = PyUnicode_FromStringAndSize(buf, buf_len);
                        }
-#endif // USE_STRING_COERCE
+#endif  /* USE_STRING_COERCE */
                        if (buf_fixed != buf) {
                                MEM_freeN((void *)buf);
                        }
@@ -1635,12 +1635,12 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
                                                if (subtype == PROP_TRANSLATE) {
                                                        param = IFACE_(param);
                                                }
-#endif // WITH_INTERNATIONAL
+#endif  /* WITH_INTERNATIONAL */
 
                                        }
-#else // USE_STRING_COERCE
+#else  /* USE_STRING_COERCE */
                                        param = _PyUnicode_AsString(value);
-#endif // USE_STRING_COERCE
+#endif  /* USE_STRING_COERCE */
 
                                        if (param == NULL) {
                                                if (PyUnicode_Check(value)) {
@@ -1668,7 +1668,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
                                        }
 #ifdef USE_STRING_COERCE
                                        Py_XDECREF(value_coerce);
-#endif // USE_STRING_COERCE
+#endif  /* USE_STRING_COERCE */
                                }
                                break;
                        }
@@ -1995,7 +1995,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P
        return ret;
 }
 
-//---------------sequence-------------------------------------------
+/* ---------------sequence------------------------------------------- */
 static Py_ssize_t pyrna_prop_array_length(BPy_PropertyArrayRNA *self)
 {
        PYRNA_PROP_CHECK_INT((BPy_PropertyRNA *)self);
@@ -2982,7 +2982,7 @@ static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObje
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, key)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (group == NULL) {
                PyErr_SetString(PyExc_TypeError, "bpy_struct[key] = val: id properties not supported for this type");
@@ -3441,7 +3441,7 @@ static PyObject *pyrna_struct_dir(BPy_StructRNA *self)
        return ret;
 }
 
-//---------------getattr--------------------------------------------
+/* ---------------getattr-------------------------------------------- */
 static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
 {
        const char *name = _PyUnicode_AsString(pyname);
@@ -3455,7 +3455,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
                PyErr_SetString(PyExc_AttributeError, "bpy_struct: __getattr__ must be a string");
                ret = NULL;
        }
-       else if (name[0] == '_') { // rna can't start with a "_", so for __dict__ and similar we can skip using rna lookups
+       else if (name[0] == '_') {  /* rna can't start with a "_", so for __dict__ and similar we can skip using rna lookups */
                /* annoying exception, maybe we need to have different types for this... */
                if ((strcmp(name, "__getitem__") == 0 || strcmp(name, "__setitem__") == 0) && !RNA_struct_idprops_check(self->ptr.type)) {
                        PyErr_SetString(PyExc_AttributeError, "bpy_struct: no __getitem__ support for this type");
@@ -3565,7 +3565,7 @@ static int pyrna_struct_pydict_contains(PyObject *self, PyObject *pyname)
 }
 #endif
 
-//--------------- setattr-------------------------------------------
+/* --------------- setattr------------------------------------------- */
 static int pyrna_is_deferred_prop(const PyObject *value)
 {
        return PyTuple_CheckExact(value) &&
@@ -3678,7 +3678,7 @@ static int pyrna_struct_setattro(BPy_StructRNA *self, PyObject *pyname, PyObject
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, pyname)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (name == NULL) {
                PyErr_SetString(PyExc_AttributeError, "bpy_struct: __setattr__ must be a string");
@@ -3829,7 +3829,7 @@ static PyObject *pyrna_prop_collection_getattro(BPy_PropertyRNA *self, PyObject
 #endif
 }
 
-//--------------- setattr-------------------------------------------
+/* --------------- setattr------------------------------------------- */
 static int pyrna_prop_collection_setattro(BPy_PropertyRNA *self, PyObject *pyname, PyObject *value)
 {
        const char *name = _PyUnicode_AsString(pyname);
@@ -3840,7 +3840,7 @@ static int pyrna_prop_collection_setattro(BPy_PropertyRNA *self, PyObject *pynam
        if (rna_disallow_writes && rna_id_write_error(&self->ptr, pyname)) {
                return -1;
        }
-#endif // USE_PEDANTIC_WRITE
+#endif  /* USE_PEDANTIC_WRITE */
 
        if (name == NULL) {
                PyErr_SetString(PyExc_AttributeError, "bpy_prop: __setattr__ must be a string");
@@ -4275,7 +4275,7 @@ static int foreach_parse_args(BPy_PropertyRNA *self, PyObject *args,
                foreach_attr_type(self, *attr, raw_type, attr_tot, attr_signed);
                *size = RNA_raw_type_sizeof(*raw_type);
 
-#if 0   // works fine but not strictly needed, we could allow RNA_property_collection_raw_* to do the checks
+#if 0   /* works fine but not strictly needed, we could allow RNA_property_collection_raw_* to do the checks */
                if ((*attr_tot) < 1)
                        *attr_tot = 1;
 
@@ -6044,8 +6044,8 @@ static PyObject *pyrna_srna_ExternalType(StructRNA *srna)
                        fprintf(stderr, "%s: failed to find 'bpy_types' module\n", __func__);
                        return NULL;
                }
-               bpy_types_dict = PyModule_GetDict(bpy_types); // borrow
-               Py_DECREF(bpy_types); // fairly safe to assume the dict is kept
+               bpy_types_dict = PyModule_GetDict(bpy_types);  /* borrow */
+               Py_DECREF(bpy_types);  /* fairly safe to assume the dict is kept */
        }
 
        newclass = PyDict_GetItemString(bpy_types_dict, idname);
@@ -6134,7 +6134,7 @@ static PyObject *pyrna_srna_Subtype(StructRNA *srna)
                        /* srna owns one, and the other is owned by the caller */
                        pyrna_subtype_set_rna(newclass, srna);
 
-                       // XXX, adding this back segfaults blender on load.
+                       /* XXX, adding this back segfaults blender on load. */
                        // Py_DECREF(newclass); /* let srna own */
                }
                else {
@@ -6291,7 +6291,7 @@ int pyrna_id_FromPyObject(PyObject *obj, ID **id)
 
 void BPY_rna_init(void)
 {
-#ifdef USE_MATHUTILS // register mathutils callbacks, ok to run more then once.
+#ifdef USE_MATHUTILS  /* register mathutils callbacks, ok to run more then once. */
        mathutils_rna_array_cb_index = Mathutils_RegisterCallback(&mathutils_rna_array_cb);
        mathutils_rna_matrix_cb_index = Mathutils_RegisterCallback(&mathutils_rna_matrix_cb);
 #endif
@@ -6375,7 +6375,7 @@ PyObject *BPY_rna_doc(void)
 
 /* pyrna_basetype_* - BPy_BaseTypeRNA is just a BPy_PropertyRNA struct with a different type
  * the self->ptr and self->prop are always set to the "structs" collection */
-//---------------getattr--------------------------------------------
+/* ---------------getattr-------------------------------------------- */
 static PyObject *pyrna_basetype_getattro(BPy_BaseTypeRNA *self, PyObject *pyname)
 {
        PointerRNA newptr;
@@ -6750,7 +6750,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
        PyObject *base_class = RNA_struct_py_type_get(srna);
        PyObject *item;
        int i, flag, arg_count, func_arg_count;
-       const char *py_class_name = ((PyTypeObject *)py_class)->tp_name; // __name__
+       const char *py_class_name = ((PyTypeObject *)py_class)->tp_name;  /* __name__ */
 
        if (srna_base) {
                if (bpy_class_validate_recursive(dummyptr, srna_base, py_data, have_function) != 0)
@@ -7211,10 +7211,10 @@ static void bpy_class_free(void *pyob_ptr)
 
        gilstate = PyGILState_Ensure();
 
-       // breaks re-registering classes
+       /* breaks re-registering classes */
        // PyDict_Clear(((PyTypeObject *)self)->tp_dict);
-       //
-       // remove the rna attribute instead.
+
+       /* remove the rna attribute instead. */
        PyDict_DelItem(((PyTypeObject *)self)->tp_dict, bpy_intern_str_bl_rna);
        if (PyErr_Occurred())
                PyErr_Clear();
@@ -7279,7 +7279,7 @@ void pyrna_free_types(void)
                void *py_ptr = RNA_struct_py_type_get(srna);
 
                if (py_ptr) {
-#if 0   // XXX - should be able to do this but makes python crash on exit
+#if 0   /* XXX - should be able to do this but makes python crash on exit */
                        bpy_class_free(py_ptr);
 #endif
                        RNA_struct_py_type_set(srna, NULL);
index c08165f..a4a4010 100644 (file)
@@ -276,12 +276,12 @@ int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error
 }
 
 
-//----------------------------------MATRIX FUNCTIONS--------------------
+/* ----------------------------------MATRIX FUNCTIONS-------------------- */
 
 
 /* Utility functions */
 
-// LomontRRDCompare4, Ever Faster Float Comparisons by Randy Dillon
+/* LomontRRDCompare4, Ever Faster Float Comparisons by Randy Dillon */
 #define SIGNMASK(i) (-(int)(((unsigned int)(i)) >> 31))
 
 int EXPP_FloatsAreEqual(float af, float bf, int maxDiff)
index c14b4a0..747a23a 100644 (file)
@@ -35,8 +35,8 @@
 
 #define COLOR_SIZE 3
 
-//----------------------------------mathutils.Color() -------------------
-//makes a new color for you to play with
+/* ----------------------------------mathutils.Color() ------------------- */
+/* makes a new color for you to play with */
 static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        float col[3] = {0.0f, 0.0f, 0.0f};
@@ -64,7 +64,7 @@ static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
        return Color_CreatePyObject(col, Py_NEW, type);
 }
 
-//-----------------------------METHODS----------------------------
+/* -----------------------------METHODS---------------------------- */
 
 /* note: BaseMath_ReadCallback must be called beforehand */
 static PyObject *Color_ToTupleExt(ColorObject *self, int ndigits)
@@ -113,8 +113,8 @@ static PyObject *Color_deepcopy(ColorObject *self, PyObject *args)
        return Color_copy(self);
 }
 
-//----------------------------print object (internal)--------------
-//print the object to screen
+/* ----------------------------print object (internal)-------------- */
+/* print the object to screen */
 
 static PyObject *Color_repr(ColorObject *self)
 {
@@ -146,8 +146,8 @@ static PyObject *Color_str(ColorObject *self)
        return mathutils_dynstr_to_py(ds); /* frees ds */
 }
 
-//------------------------tp_richcmpr
-//returns -1 exception, 0 false, 1 true
+/* ------------------------tp_richcmpr */
+/* returns -1 exception, 0 false, 1 true */
 static PyObject *Color_richcmpr(PyObject *a, PyObject *b, int op)
 {
        PyObject *res;
@@ -184,15 +184,15 @@ static PyObject *Color_richcmpr(PyObject *a, PyObject *b, int op)
        return Py_INCREF(res), res;
 }
 
-//---------------------SEQUENCE PROTOCOLS------------------------
-//----------------------------len(object)------------------------
-//sequence length
+/* ---------------------SEQUENCE PROTOCOLS------------------------ */
+/* ----------------------------len(object)------------------------ */
+/* sequence length */
 static int Color_len(ColorObject *UNUSED(self))
 {
        return COLOR_SIZE;
 }
-//----------------------------object[]---------------------------
-//sequence accessor (get)
+/* ----------------------------object[]--------------------------- */
+/* sequence accessor (get) */
 static PyObject *Color_item(ColorObject *self, int i)
 {
        if (i < 0) i = COLOR_SIZE - i;
@@ -210,13 +210,13 @@ static PyObject *Color_item(ColorObject *self, int i)
        return PyFloat_FromDouble(self->col[i]);
 
 }
-//----------------------------object[]-------------------------
-//sequence accessor (set)
+/* ----------------------------object[]------------------------- */
+/* sequence accessor (set) */
 static int Color_ass_item(ColorObject *self, int i, PyObject *value)
 {
        float f = PyFloat_AsDouble(value);
 
-       if (f == -1 && PyErr_Occurred()) { // parsed item not a number
+       if (f == -1 && PyErr_Occurred()) {  /* parsed item not a number */
                PyErr_SetString(PyExc_TypeError,
                                "color[item] = x: "
                                "argument not a number");
@@ -238,8 +238,8 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value)
 
        return 0;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (get)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (get) */
 static PyObject *Color_slice(ColorObject *self, int begin, int end)
 {
        PyObject *tuple;
@@ -260,8 +260,8 @@ static PyObject *Color_slice(ColorObject *self, int begin, int end)
 
        return tuple;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (set)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (set) */
 static int Color_ass_slice(ColorObject *self, int begin, int end, PyObject *seq)
 {
        int i, size;
@@ -361,7 +361,7 @@ static int Color_ass_subscript(ColorObject *self, PyObject *item, PyObject *valu
        }
 }
 
-//-----------------PROTCOL DECLARATIONS--------------------------
+/* -----------------PROTCOL DECLARATIONS-------------------------- */
 static PySequenceMethods Color_SeqMethods = {
        (lenfunc) Color_len,                    /* sq_length */
        (binaryfunc) NULL,                      /* sq_concat */
@@ -792,7 +792,7 @@ static PyGetSetDef Color_getseters[] = {
 };
 
 
-//-----------------------METHOD DEFINITIONS ----------------------
+/* -----------------------METHOD DEFINITIONS ---------------------- */
 static struct PyMethodDef Color_methods[] = {
        {"copy", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc},
        {"__copy__", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc},
@@ -800,60 +800,60 @@ static struct PyMethodDef Color_methods[] = {
        {NULL, NULL, 0, NULL}
 };
 
-//------------------PY_OBECT DEFINITION--------------------------
+/* ------------------PY_OBECT DEFINITION-------------------------- */
 PyDoc_STRVAR(color_doc,
 "This object gives access to Colors in Blender."
 );
 PyTypeObject color_Type = {
        PyVarObject_HEAD_INIT(NULL, 0)
-       "Color",                        //tp_name
-       sizeof(ColorObject),            //tp_basicsize
-       0,                              //tp_itemsize
-       (destructor)BaseMathObject_dealloc,     //tp_dealloc
-       NULL,                           //tp_print
-       NULL,                           //tp_getattr
-       NULL,                           //tp_setattr
-       NULL,                           //tp_compare
-       (reprfunc) Color_repr,          //tp_repr
-       &Color_NumMethods,              //tp_as_number
-       &Color_SeqMethods,              //tp_as_sequence
-       &Color_AsMapping,               //tp_as_mapping
-       NULL,                           //tp_hash
-       NULL,                           //tp_call
-       (reprfunc) Color_str,           //tp_str
-       NULL,                           //tp_getattro
-       NULL,                           //tp_setattro
-       NULL,                           //tp_as_buffer
-       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags
-       color_doc, //tp_doc
-       (traverseproc)BaseMathObject_traverse,  //tp_traverse
-       (inquiry)BaseMathObject_clear,  //tp_clear
-       (richcmpfunc)Color_richcmpr,    //tp_richcompare
-       0,                              //tp_weaklistoffset
-       NULL,                           //tp_iter
-       NULL,                           //tp_iternext
-       Color_methods,                  //tp_methods
-       NULL,                           //tp_members
-       Color_getseters,                //tp_getset
-       NULL,                           //tp_base
-       NULL,                           //tp_dict
-       NULL,                           //tp_descr_get
-       NULL,                           //tp_descr_set
-       0,                              //tp_dictoffset
-       NULL,                           //tp_init
-       NULL,                           //tp_alloc
-       Color_new,                      //tp_new
-       NULL,                           //tp_free
-       NULL,                           //tp_is_gc
-       NULL,                           //tp_bases
-       NULL,                           //tp_mro
-       NULL,                           //tp_cache
-       NULL,                           //tp_subclasses
-       NULL,                           //tp_weaklist
-       NULL                            //tp_del
+       "Color",                        /* tp_name */
+       sizeof(ColorObject),            /* tp_basicsize */
+       0,                              /* tp_itemsize */
+       (destructor)BaseMathObject_dealloc,  /* tp_dealloc */
+       NULL,                           /* tp_print */
+       NULL,                           /* tp_getattr */
+       NULL,                           /* tp_setattr */
+       NULL,                           /* tp_compare */
+       (reprfunc) Color_repr,          /* tp_repr */
+       &Color_NumMethods,              /* tp_as_number */
+       &Color_SeqMethods,              /* tp_as_sequence */
+       &Color_AsMapping,               /* tp_as_mapping */
+       NULL,                           /* tp_hash */
+       NULL,                           /* tp_call */
+       (reprfunc) Color_str,           /* tp_str */
+       NULL,                           /* tp_getattro */
+       NULL,                           /* tp_setattro */
+       NULL,                           /* tp_as_buffer */
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+       color_doc, /* tp_doc */
+       (traverseproc)BaseMathObject_traverse,  /* tp_traverse */
+       (inquiry)BaseMathObject_clear,  /* tp_clear */
+       (richcmpfunc)Color_richcmpr,    /* tp_richcompare */
+       0,                              /* tp_weaklistoffset */
+       NULL,                           /* tp_iter */
+       NULL,                           /* tp_iternext */
+       Color_methods,                  /* tp_methods */
+       NULL,                           /* tp_members */
+       Color_getseters,                /* tp_getset */
+       NULL,                           /* tp_base */
+       NULL,                           /* tp_dict */
+       NULL,                           /* tp_descr_get */
+       NULL,                           /* tp_descr_set */
+       0,                              /* tp_dictoffset */
+       NULL,                           /* tp_init */
+       NULL,                           /* tp_alloc */
+       Color_new,                      /* tp_new */
+       NULL,                           /* tp_free */
+       NULL,                           /* tp_is_gc */
+       NULL,                           /* tp_bases */
+       NULL,                           /* tp_mro */
+       NULL,                           /* tp_cache */
+       NULL,                           /* tp_subclasses */
+       NULL,                           /* tp_weaklist */
+       NULL                            /* tp_del */
 };
-//------------------------Color_CreatePyObject (internal)-------------
-//creates a new color object
+/* ------------------------Color_CreatePyObject (internal)------------- */
+/* creates a new color object */
 /* pass Py_WRAP - if vector is a WRAPPER for data allocated by BLENDER
  *  (i.e. it was allocated elsewhere by MEM_mallocN())
  *   pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
index d753b60..1c75766 100644 (file)
@@ -46,7 +46,7 @@ typedef struct {
  * be stored in py_data) or be a wrapper for data allocated through
  * blender (stored in blend_data). This is an either/or struct not both*/
 
-//prototypes
+/* prototypes */
 PyObject *Color_CreatePyObject(float col[3], int type, PyTypeObject *base_type);
 PyObject *Color_CreatePyObject_cb(PyObject *cb_user,
                                   unsigned char cb_type, unsigned char cb_subtype);
index 468ef37..3592e10 100644 (file)
@@ -39,8 +39,8 @@
 
 #define EULER_SIZE 3
 
-//----------------------------------mathutils.Euler() -------------------
-//makes a new euler for you to play with
+/* ----------------------------------mathutils.Euler() ------------------- */
+/* makes a new euler for you to play with */
 static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *seq = NULL;
@@ -122,8 +122,8 @@ static PyObject *Euler_ToTupleExt(EulerObject *self, int ndigits)
        return ret;
 }
 
-//-----------------------------METHODS----------------------------
-//return a quaternion representation of the euler
+/-----------------------------METHODS----------------------------
+ * return a quaternion representation of the euler */
 
 PyDoc_STRVAR(Euler_to_quaternion_doc,
 ".. method:: to_quaternion()\n"
@@ -145,7 +145,7 @@ static PyObject *Euler_to_quaternion(EulerObject *self)
        return Quaternion_CreatePyObject(quat, Py_NEW, NULL);
 }
 
-//return a matrix representation of the euler
+/* return a matrix representation of the euler */
 PyDoc_STRVAR(Euler_to_matrix_doc,
 ".. method:: to_matrix()\n"
 "\n"
@@ -277,8 +277,8 @@ static PyObject *Euler_make_compatible(EulerObject *self, PyObject *value)
        Py_RETURN_NONE;
 }
 
-//----------------------------Euler.rotate()-----------------------
-// return a copy of the euler
+/----------------------------Euler.rotate()-----------------------
+ * return a copy of the euler */
 
 PyDoc_STRVAR(Euler_copy_doc,
 ".. function:: copy()\n"
@@ -305,8 +305,8 @@ static PyObject *Euler_deepcopy(EulerObject *self, PyObject *args)
        return Euler_copy(self);
 }
 
-//----------------------------print object (internal)--------------
-//print the object to screen
+/----------------------------print object (internal)--------------
+ * print the object to screen */
 
 static PyObject *Euler_repr(EulerObject *self)
 {
@@ -374,15 +374,15 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op)
        return Py_INCREF(res), res;
 }
 
-//---------------------SEQUENCE PROTOCOLS------------------------
-//----------------------------len(object)------------------------
-//sequence length
+/* ---------------------SEQUENCE PROTOCOLS------------------------ */
+/* ----------------------------len(object)------------------------ */
+/* sequence length */
 static int Euler_len(EulerObject *UNUSED(self))
 {
        return EULER_SIZE;
 }
-//----------------------------object[]---------------------------
-//sequence accessor (get)
+/* ----------------------------object[]--------------------------- */
+/* sequence accessor (get) */
 static PyObject *Euler_item(EulerObject *self, int i)
 {
        if (i < 0) i = EULER_SIZE - i;
@@ -400,13 +400,13 @@ static PyObject *Euler_item(EulerObject *self, int i)
        return PyFloat_FromDouble(self->eul[i]);
 
 }
-//----------------------------object[]-------------------------
-//sequence accessor (set)
+/* ----------------------------object[]------------------------- */
+/* sequence accessor (set) */
 static int Euler_ass_item(EulerObject *self, int i, PyObject *value)
 {
        float f = PyFloat_AsDouble(value);
 
-       if (f == -1 && PyErr_Occurred()) { // parsed item not a number
+       if (f == -1 && PyErr_Occurred()) {  /* parsed item not a number */
                PyErr_SetString(PyExc_TypeError,
                                "euler[attribute] = x: "
                                "argument not a number");
@@ -429,8 +429,8 @@ static int Euler_ass_item(EulerObject *self, int i, PyObject *value)
 
        return 0;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (get)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (get) */
 static PyObject *Euler_slice(EulerObject *self, int begin, int end)
 {
        PyObject *tuple;
@@ -451,8 +451,8 @@ static PyObject *Euler_slice(EulerObject *self, int begin, int end)
 
        return tuple;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (set)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (set) */
 static int Euler_ass_slice(EulerObject *self, int begin, int end, PyObject *seq)
 {
        int i, size;
@@ -553,7 +553,7 @@ static int Euler_ass_subscript(EulerObject *self, PyObject *item, PyObject *valu
        }
 }
 
-//-----------------PROTCOL DECLARATIONS--------------------------
+/* -----------------PROTCOL DECLARATIONS-------------------------- */
 static PySequenceMethods Euler_SeqMethods = {
        (lenfunc) Euler_len,                    /* sq_length */
        (binaryfunc) NULL,                      /* sq_concat */
@@ -629,7 +629,7 @@ static PyGetSetDef Euler_getseters[] = {
 };
 
 
-//-----------------------METHOD DEFINITIONS ----------------------
+/* -----------------------METHOD DEFINITIONS ---------------------- */
 static struct PyMethodDef Euler_methods[] = {
        {"zero", (PyCFunction) Euler_zero, METH_NOARGS, Euler_zero_doc},
        {"to_matrix", (PyCFunction) Euler_to_matrix, METH_NOARGS, Euler_to_matrix_doc},
@@ -643,60 +643,60 @@ static struct PyMethodDef Euler_methods[] = {
        {NULL, NULL, 0, NULL}
 };
 
-//------------------PY_OBECT DEFINITION--------------------------
+/* ------------------PY_OBECT DEFINITION-------------------------- */
 PyDoc_STRVAR(euler_doc,
 "This object gives access to Eulers in Blender."
 );
 PyTypeObject euler_Type = {
        PyVarObject_HEAD_INIT(NULL, 0)
-       "Euler",                        //tp_name
-       sizeof(EulerObject),            //tp_basicsize
-       0,                              //tp_itemsize
-       (destructor)BaseMathObject_dealloc,     //tp_dealloc
-       NULL,                           //tp_print
-       NULL,                           //tp_getattr
-       NULL,                           //tp_setattr
-       NULL,                           //tp_compare
-       (reprfunc) Euler_repr,          //tp_repr
-       NULL,                           //tp_as_number
-       &Euler_SeqMethods,              //tp_as_sequence
-       &Euler_AsMapping,               //tp_as_mapping
-       NULL,                           //tp_hash
-       NULL,                           //tp_call
-       (reprfunc) Euler_str,           //tp_str
-       NULL,                           //tp_getattro
-       NULL,                           //tp_setattro
-       NULL,                           //tp_as_buffer
-       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags
-       euler_doc, //tp_doc
-       (traverseproc)BaseMathObject_traverse,  //tp_traverse
-       (inquiry)BaseMathObject_clear,  //tp_clear
-       (richcmpfunc)Euler_richcmpr,    //tp_richcompare
-       0,                              //tp_weaklistoffset
-       NULL,                           //tp_iter
-       NULL,                           //tp_iternext
-       Euler_methods,                  //tp_methods
-       NULL,                           //tp_members
-       Euler_getseters,                //tp_getset
-       NULL,                           //tp_base
-       NULL,                           //tp_dict
-       NULL,                           //tp_descr_get
-       NULL,                           //tp_descr_set
-       0,                              //tp_dictoffset
-       NULL,                           //tp_init
-       NULL,                           //tp_alloc
-       Euler_new,                      //tp_new
-       NULL,                           //tp_free
-       NULL,                           //tp_is_gc
-       NULL,                           //tp_bases
-       NULL,                           //tp_mro
-       NULL,                           //tp_cache
-       NULL,                           //tp_subclasses
-       NULL,                           //tp_weaklist
-       NULL                            //tp_del
+       "Euler",                        /* tp_name */
+       sizeof(EulerObject),            /* tp_basicsize */
+       0,                              /* tp_itemsize */
+       (destructor)BaseMathObject_dealloc,     /* tp_dealloc */
+       NULL,                           /* tp_print */
+       NULL,                           /* tp_getattr */
+       NULL,                           /* tp_setattr */
+       NULL,                           /* tp_compare */
+       (reprfunc) Euler_repr,          /* tp_repr */
+       NULL,                           /* tp_as_number */
+       &Euler_SeqMethods,              /* tp_as_sequence */
+       &Euler_AsMapping,               /* tp_as_mapping */
+       NULL,                           /* tp_hash */
+       NULL,                           /* tp_call */
+       (reprfunc) Euler_str,           /* tp_str */
+       NULL,                           /* tp_getattro */
+       NULL,                           /* tp_setattro */
+       NULL,                           /* tp_as_buffer */
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+       euler_doc, /* tp_doc */
+       (traverseproc)BaseMathObject_traverse,  /* tp_traverse */
+       (inquiry)BaseMathObject_clear,  /* tp_clear */
+       (richcmpfunc)Euler_richcmpr,    /* tp_richcompare */
+       0,                              /* tp_weaklistoffset */
+       NULL,                           /* tp_iter */
+       NULL,                           /* tp_iternext */
+       Euler_methods,                  /* tp_methods */
+       NULL,                           /* tp_members */
+       Euler_getseters,                /* tp_getset */
+       NULL,                           /* tp_base */
+       NULL,                           /* tp_dict */
+       NULL,                           /* tp_descr_get */
+       NULL,                           /* tp_descr_set */
+       0,                              /* tp_dictoffset */
+       NULL,                           /* tp_init */
+       NULL,                           /* tp_alloc */
+       Euler_new,                      /* tp_new */
+       NULL,                           /* tp_free */
+       NULL,                           /* tp_is_gc */
+       NULL,                           /* tp_bases */
+       NULL,                           /* tp_mro */
+       NULL,                           /* tp_cache */
+       NULL,                           /* tp_subclasses */
+       NULL,                           /* tp_weaklist */
+       NULL                            /* tp_del */
 };
-//------------------------Euler_CreatePyObject (internal)-------------
-//creates a new euler object
+/* ------------------------Euler_CreatePyObject (internal)------------- */
+/* creates a new euler object */
 /* pass Py_WRAP - if vector is a WRAPPER for data allocated by BLENDER
  * (i.e. it was allocated elsewhere by MEM_mallocN())
  * pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
index e04d45e..69e4c08 100644 (file)
@@ -47,7 +47,7 @@ typedef struct {
  * be stored in py_data) or be a wrapper for data allocated through
  * blender (stored in blend_data). This is an either/or struct not both */
 
-//prototypes
+/* prototypes */
 PyObject *Euler_CreatePyObject(float *eul, const short order, int type, PyTypeObject *base_type);
 PyObject *Euler_CreatePyObject_cb(PyObject *cb_user, const short order,
                                   unsigned char cb_type, unsigned char cb_subtype);
index 9a0a1b3..e9f5852 100644 (file)
@@ -329,9 +329,9 @@ Mathutils_Callback mathutils_matrix_translation_cb = {
 
 /* matrix column callbacks, this is so you can do matrix.translation = Vector()  */
 
-//----------------------------------mathutils.Matrix() -----------------
-//mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc.
-//create a new matrix type
+/* ----------------------------------mathutils.Matrix() ----------------- */
+/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
+/* create a new matrix type */
 static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        if (kwds && PyDict_Size(kwds)) {
@@ -410,7 +410,7 @@ static void matrix_3x3_as_4x4(float mat[16])
 
 /*-----------------------CLASS-METHODS----------------------------*/
 
-//mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc.
+/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
 PyDoc_STRVAR(C_Matrix_Identity_doc,
 ".. classmethod:: Identity(size)\n"
 "\n"
@@ -518,7 +518,7 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
                const float angle_cos = cosf(angle);
                const float angle_sin = sinf(angle);
 
-               //2D rotation matrix
+               /* 2D rotation matrix */
                mat[0] =  angle_cos;
                mat[1] =  angle_sin;
                mat[2] = -angle_sin;
@@ -532,7 +532,7 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
        if (matSize == 4) {
                matrix_3x3_as_4x4(mat);
        }
-       //pass to matrix creation
+       /* pass to matrix creation */
        return Matrix_CreatePyObject(mat, matSize, matSize, Py_NEW, (PyTypeObject *)cls);
 }
 
@@ -556,8 +556,8 @@ static PyObject *C_Matrix_Translation(PyObject *cls, PyObject *value)
 
        return Matrix_CreatePyObject(&mat[0][0], 4, 4, Py_NEW, (PyTypeObject *)cls);
 }
-//----------------------------------mathutils.Matrix.Scale() -------------
-//mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc.
+/* ----------------------------------mathutils.Matrix.Scale() ------------- */
+/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
 PyDoc_STRVAR(C_Matrix_Scale_doc,
 ".. classmethod:: Scale(factor, size, axis)\n"
 "\n"
@@ -601,7 +601,7 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args)
                        return NULL;
                }
        }
-       if (vec == NULL) {  //scaling along axis
+       if (vec == NULL) {  /* scaling along axis */
                if (matSize == 2) {
                        mat[0] = factor;
                        mat[3] = factor;
@@ -645,11 +645,11 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args)
        if (matSize == 4) {
                matrix_3x3_as_4x4(mat);
        }
-       //pass to matrix creation
+       /* pass to matrix creation */
        return Matrix_CreatePyObject(mat, matSize, matSize, Py_NEW, (PyTypeObject *)cls);
 }
-//----------------------------------mathutils.Matrix.OrthoProjection() ---
-//mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc.
+/* ----------------------------------mathutils.Matrix.OrthoProjection() --- */
+/* mat is a 1D array of floats - row[0][0], row[0][1], row[1][0], etc. */
 PyDoc_STRVAR(C_Matrix_OrthoProjection_doc,
 ".. classmethod:: OrthoProjection(axis, size)\n"
 "\n"
@@ -685,7 +685,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
                return NULL;
        }
 
-       if (PyUnicode_Check(axis)) {    //ortho projection onto cardinal plane
+       if (PyUnicode_Check(axis)) {  /* ortho projection onto cardinal plane */
                Py_ssize_t plane_len;
                const char *plane = _PyUnicode_AsStringAndSize(axis, &plane_len);
                if (matSize == 2) {
@@ -726,7 +726,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
                }
        }
        else {
-               //arbitrary plane
+               /* arbitrary plane */
 
                int vec_size = (matSize == 2 ? 2 : 3);
                float tvec[4];
@@ -737,7 +737,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
                        return NULL;
                }
 
-               //normalize arbitrary axis
+               /* normalize arbitrary axis */
                for (x = 0; x < vec_size; x++) {
                        norm += tvec[x] * tvec[x];
                }
@@ -766,7 +766,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
        if (matSize == 4) {
                matrix_3x3_as_4x4(mat);
        }
-       //pass to matrix creation
+       /* pass to matrix creation */
        return Matrix_CreatePyObject(mat, matSize, matSize, Py_NEW, (PyTypeObject *)cls);
 }
 
@@ -869,7 +869,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
        if (matSize == 4) {
                matrix_3x3_as_4x4(mat);
        }
-       //pass to matrix creation
+       /* pass to matrix creation */
        return Matrix_CreatePyObject(mat, matSize, matSize, Py_NEW, (PyTypeObject *)cls);
 }
 
@@ -2335,8 +2335,8 @@ PyTypeObject matrix_Type = {
        NULL,                               /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        matrix_doc,                         /*tp_doc*/
-       (traverseproc)BaseMathObject_traverse,  //tp_traverse
-       (inquiry)BaseMathObject_clear,  //tp_clear
+       (traverseproc)BaseMathObject_traverse,  /* tp_traverse */
+       (inquiry)BaseMathObject_clear,      /*tp_clear*/
        (richcmpfunc)Matrix_richcmpr,       /*tp_richcompare*/
        0,                                  /*tp_weaklistoffset*/
        NULL,                               /*tp_iter*/
@@ -2635,8 +2635,8 @@ PyTypeObject matrix_access_Type = {
        NULL,                               /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
        NULL,                               /*tp_doc*/
-       (traverseproc)MatrixAccess_traverse,    //tp_traverse
-       (inquiry)MatrixAccess_clear,    //tp_clear
+       (traverseproc)MatrixAccess_traverse,/*tp_traverse*/
+       (inquiry)MatrixAccess_clear,        /*tp_clear*/
        NULL /* (richcmpfunc)MatrixAccess_richcmpr */ /* TODO*/, /*tp_richcompare*/
        0,                                  /*tp_weaklistoffset*/
        (getiterfunc)MatrixAccess_iter, /* getiterfunc tp_iter; */
index 2debff6..b9aba99 100644 (file)
@@ -44,7 +44,7 @@ static void      quat__axis_angle_sanitize(float axis[3], float *angle);
 static PyObject *Quaternion_copy(QuaternionObject *self);
 static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args);
 
-//-----------------------------METHODS------------------------------
+/* -----------------------------METHODS------------------------------ */
 
 /* note: BaseMath_ReadCallback must be called beforehand */
 static PyObject *Quaternion_to_tuple_ext(QuaternionObject *self, int ndigits)
@@ -124,7 +124,7 @@ static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args)
 
        return Euler_CreatePyObject(eul, order, Py_NEW, NULL);
 }
-//----------------------------Quaternion.toMatrix()------------------
+
 PyDoc_STRVAR(Quaternion_to_matrix_doc,
 ".. method:: to_matrix()\n"
 "\n"
@@ -144,7 +144,6 @@ static PyObject *Quaternion_to_matrix(QuaternionObject *self)
        return Matrix_CreatePyObject(mat, 3, 3, Py_NEW, NULL);
 }
 
-//----------------------------Quaternion.toMatrix()------------------
 PyDoc_STRVAR(Quaternion_to_axis_angle_doc,
 ".. method:: to_axis_angle()\n"
 "\n"
@@ -176,8 +175,6 @@ static PyObject *Quaternion_to_axis_angle(QuaternionObject *self)
        return ret;
 }
 
-
-//----------------------------Quaternion.cross(other)------------------
 PyDoc_STRVAR(Quaternion_cross_doc,
 ".. method:: cross(other)\n"
 "\n"
@@ -205,7 +202,6 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value)
        return Quaternion_CreatePyObject(quat, Py_NEW, Py_TYPE(self));
 }
 
-//----------------------------Quaternion.dot(other)------------------
 PyDoc_STRVAR(Quaternion_dot_doc,
 ".. method:: dot(other)\n"
 "\n"
@@ -335,8 +331,8 @@ static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value)
        Py_RETURN_NONE;
 }
 
-//----------------------------Quaternion.normalize()----------------
-//normalize the axis of rotation of [theta, vector]
+/* ----------------------------Quaternion.normalize()---------------- */
+/* normalize the axis of rotation of [theta, vector] */
 PyDoc_STRVAR(Quaternion_normalize_doc,
 ".. function:: normalize()\n"
 "\n"
@@ -365,7 +361,6 @@ static PyObject *Quaternion_normalized(QuaternionObject *self)
        return quat__apply_to_copy((PyNoArgsFunction)Quaternion_normalize, self);
 }
 
-//----------------------------Quaternion.invert()------------------
 PyDoc_STRVAR(Quaternion_invert_doc,
 ".. function:: invert()\n"
 "\n"
@@ -394,7 +389,6 @@ static PyObject *Quaternion_inverted(QuaternionObject *self)
        return quat__apply_to_copy((PyNoArgsFunction)Quaternion_invert, self);
 }
 
-//----------------------------Quaternion.identity()-----------------
 PyDoc_STRVAR(Quaternion_identity_doc,
 ".. function:: identity()\n"
 "\n"
@@ -413,7 +407,7 @@ static PyObject *Quaternion_identity(QuaternionObject *self)
        (void)BaseMath_WriteCallback(self);
        Py_RETURN_NONE;
 }
-//----------------------------Quaternion.negate()-------------------
+
 PyDoc_STRVAR(Quaternion_negate_doc,
 ".. function:: negate()\n"
 "\n"
@@ -432,7 +426,7 @@ static PyObject *Quaternion_negate(QuaternionObject *self)
        (void)BaseMath_WriteCallback(self);
        Py_RETURN_NONE;
 }
-//----------------------------Quaternion.conjugate()----------------
+
 PyDoc_STRVAR(Quaternion_conjugate_doc,
 ".. function:: conjugate()\n"
 "\n"
@@ -461,7 +455,6 @@ static PyObject *Quaternion_conjugated(QuaternionObject *self)
        return quat__apply_to_copy((PyNoArgsFunction)Quaternion_conjugate, self);
 }
 
-//----------------------------Quaternion.copy()----------------
 PyDoc_STRVAR(Quaternion_copy_doc,
 ".. function:: copy()\n"
 "\n"
@@ -487,8 +480,7 @@ static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args)
        return Quaternion_copy(self);
 }
 
-//----------------------------print object (internal)--------------
-//print the object to screen
+/* print the object to screen */
 static PyObject *Quaternion_repr(QuaternionObject *self)
 {
        PyObject *ret, *tuple;
@@ -555,15 +547,15 @@ static PyObject *Quaternion_richcmpr(PyObject *a, PyObject *b, int op)
        return Py_INCREF(res), res;
 }
 
-//---------------------SEQUENCE PROTOCOLS------------------------
-//----------------------------len(object)------------------------
-//sequence length
+/* ---------------------SEQUENCE PROTOCOLS------------------------ */
+/* ----------------------------len(object)------------------------ */
+/* sequence length */
 static int Quaternion_len(QuaternionObject *UNUSED(self))
 {
        return QUAT_SIZE;
 }
-//----------------------------object[]---------------------------
-//sequence accessor (get)
+/* ----------------------------object[]--------------------------- */
+/* sequence accessor (get) */
 static PyObject *Quaternion_item(QuaternionObject *self, int i)
 {
        if (i < 0) i = QUAT_SIZE - i;
@@ -581,8 +573,8 @@ static PyObject *Quaternion_item(QuaternionObject *self, int i)
        return PyFloat_FromDouble(self->quat[i]);
 
 }
-//----------------------------object[]-------------------------
-//sequence accessor (set)
+/* ----------------------------object[]------------------------- */
+/* sequence accessor (set) */
 static int Quaternion_ass_item(QuaternionObject *self, int i, PyObject *ob)
 {
        float scalar = (float)PyFloat_AsDouble(ob);
@@ -608,8 +600,8 @@ static int Quaternion_ass_item(QuaternionObject *self, int i, PyObject *ob)
 
        return 0;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (get)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (get) */
 static PyObject *Quaternion_slice(QuaternionObject *self, int begin, int end)
 {
        PyObject *tuple;
@@ -630,8 +622,8 @@ static PyObject *Quaternion_slice(QuaternionObject *self, int begin, int end)
 
        return tuple;
 }
-//----------------------------object[z:y]------------------------
-//sequence slice (set)
+/* ----------------------------object[z:y]------------------------ */
+/* sequence slice (set) */
 static int Quaternion_ass_slice(QuaternionObject *self, int begin, int end, PyObject *seq)
 {
        int i, size;
@@ -734,9 +726,9 @@ static int Quaternion_ass_subscript(QuaternionObject *self, PyObject *item, PyOb
        }
 }
 
-//------------------------NUMERIC PROTOCOLS----------------------
-//------------------------obj + obj------------------------------
-//addition
+/* ------------------------NUMERIC PROTOCOLS---------------------- */
+/* ------------------------obj + obj------------------------------ */
+/* addition */
 static PyObject *Quaternion_add(PyObject *q1, PyObject *q2)
 {
        float quat[QUAT_SIZE];
@@ -758,8 +750,8 @@ static PyObject *Quaternion_add(PyObject *q1, PyObject *q2)
        add_qt_qtqt(quat, quat1->quat, quat2->quat, 1.0f);
        return Quaternion_CreatePyObject(quat, Py_NEW, Py_TYPE(q1));
 }
-//------------------------obj - obj------------------------------
-//subtraction
+/* ------------------------obj - obj------------------------------ */
+/* subtraction */
 static PyObject *Quaternion_sub(PyObject *q1, PyObject *q2)
 {
        int x;
@@ -875,7 +867,7 @@ static PyObject *Quaternion_neg(QuaternionObject *self)
 }
 
 
-//-----------------PROTOCOL DECLARATIONS--------------------------
+/* -----------------PROTOCOL DECLARATIONS-------------------------- */
 static PySequenceMethods Quaternion_SeqMethods = {
        (lenfunc) Quaternion_len,               /* sq_length */
        (binaryfunc) NULL,                      /* sq_concat */
@@ -1060,7 +1052,7 @@ static int Quaternion_axis_vector_set(QuaternionObject *self, PyObject *value, v
        return 0;
 }
 
-//----------------------------------mathutils.Quaternion() --------------
+/* ----------------------------------mathutils.Quaternion() -------------- */
 static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
        PyObject *seq = NULL;
@@ -1140,7 +1132,7 @@ static void quat__axis_angle_sanitize(float axis[3], float *angle)
        }
 }
 
-//-----------------------METHOD DEFINITIONS ----------------------
+/* -----------------------METHOD DEFINITIONS ---------------------- */
 static struct PyMethodDef Quaternion_methods[] = {
        /* in place only */
        {"identity", (PyCFunction) Quaternion_identity, METH_NOARGS, Quaternion_identity_doc},
@@ -1190,60 +1182,60 @@ static PyGetSetDef Quaternion_getseters[] = {
        {NULL, NULL, NULL, NULL, NULL}  /* Sentinel */
 };
 
-//------------------PY_OBECT DEFINITION--------------------------
+/* ------------------PY_OBECT DEFINITION-------------------------- */
 PyDoc_STRVAR(quaternion_doc,
 "This object gives access to Quaternions in Blender."
 );
 PyTypeObject quaternion_Type = {
        PyVarObject_HEAD_INIT(NULL, 0)
-       "Quaternion",             //tp_name
-       sizeof(QuaternionObject),           //tp_basicsize
-       0,                                  //tp_itemsize
-       (destructor)BaseMathObject_dealloc, //tp_dealloc
-       NULL,                               //tp_print
-       NULL,                               //tp_getattr
-       NULL,                               //tp_setattr
-       NULL,                               //tp_compare
-       (reprfunc) Quaternion_repr,         //tp_repr
-       &Quaternion_NumMethods,             //tp_as_number
-       &Quaternion_SeqMethods,             //tp_as_sequence
-       &Quaternion_AsMapping,              //tp_as_mapping
-       NULL,                               //tp_hash
-       NULL,                               //tp_call
-       (reprfunc) Quaternion_str,          //tp_str
-       NULL,                               //tp_getattro
-       NULL,                               //tp_setattro
-       NULL,                               //tp_as_buffer
-       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags
-       quaternion_doc, //tp_doc
-       (traverseproc)BaseMathObject_traverse,  //tp_traverse
-       (inquiry)BaseMathObject_clear,  //tp_clear
-       (richcmpfunc)Quaternion_richcmpr,   //tp_richcompare
-       0,                                  //tp_weaklistoffset
-       NULL,                               //tp_iter
-       NULL,                               //tp_iternext
-       Quaternion_methods,                 //tp_methods
-       NULL,                               //tp_members
-       Quaternion_getseters,               //tp_getset
-       NULL,                               //tp_base
-       NULL,                               //tp_dict
-       NULL,                               //tp_descr_get
-       NULL,                               //tp_descr_set
-       0,                                  //tp_dictoffset
-       NULL,                               //tp_init
-       NULL,                               //tp_alloc
-       Quaternion_new,                     //tp_new
-       NULL,                               //tp_free
-       NULL,                               //tp_is_gc
-       NULL,                               //tp_bases
-       NULL,                               //tp_mro
-       NULL,                               //tp_cache
-       NULL,                               //tp_subclasses
-       NULL,                               //tp_weaklist
-       NULL,                               //tp_del
+       "Quaternion",                       /* tp_name */
+       sizeof(QuaternionObject),           /* tp_basicsize */
+       0,                                  /* tp_itemsize */
+       (destructor)BaseMathObject_dealloc, /* tp_dealloc */
+       NULL,                               /* tp_print */
+       NULL,                               /* tp_getattr */
+       NULL,                               /* tp_setattr */
+       NULL,                               /* tp_compare */
+       (reprfunc) Quaternion_repr,         /* tp_repr */
+       &Quaternion_NumMethods,             /* tp_as_number */
+       &Quaternion_SeqMethods,             /* tp_as_sequence */
+       &Quaternion_AsMapping,              /* tp_as_mapping */
+       NULL,                               /* tp_hash */
+       NULL,                               /* tp_call */
+       (reprfunc) Quaternion_str,          /* tp_str */
+       NULL,                               /* tp_getattro */
+       NULL,                               /* tp_setattro */
+       NULL,                               /* tp_as_buffer */
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+       quaternion_doc, /* tp_doc */
+       (traverseproc)BaseMathObject_traverse,  /* tp_traverse */
+       (inquiry)BaseMathObject_clear,  /* tp_clear */
+       (richcmpfunc)Quaternion_richcmpr,   /* tp_richcompare */
+       0,                                  /* tp_weaklistoffset */
+       NULL,                               /* tp_iter */
+       NULL,                               /* tp_iternext */
+       Quaternion_methods,                 /* tp_methods */
+       NULL,                               /* tp_members */
+       Quaternion_getseters,               /* tp_getset */
+       NULL,                               /* tp_base */
+       NULL,                               /* tp_dict */
+       NULL,                               /* tp_descr_get */
+       NULL,                               /* tp_descr_set */
+       0,                                  /* tp_dictoffset */
+       NULL,                               /* tp_init */
+       NULL,                               /* tp_alloc */
+       Quaternion_new,                     /* tp_new */
+       NULL,                               /* tp_free */
+       NULL,                               /* tp_is_gc */
+       NULL,                               /* tp_bases */
+       NULL,                               /* tp_mro */
+       NULL,                               /* tp_cache */
+       NULL,                               /* tp_subclasses */
+       NULL,                               /* tp_weaklist */
+       NULL,                               /* tp_del */
 };
-//------------------------Quaternion_CreatePyObject (internal)-------------
-//creates a new quaternion object
+/* ------------------------Quaternion_CreatePyObject (internal)------------- */
+/* creates a new quaternion object */
 /*pass Py_WRAP - if vector is a WRAPPER for data allocated by BLENDER
  * (i.e. it was allocated elsewhere by MEM_mallocN())
  *  pass Py_NEW - if vector is not a WRAPPER and managed by PYTHON
@@ -1266,7 +1258,7 @@ PyObject *Quaternion_CreatePyObject(float *quat, int type, PyTypeObject *base_ty
                }
                else if (type == Py_NEW) {
                        self->quat = PyMem_Malloc(QUAT_SIZE * sizeof(float));
-                       if (!quat) { //new empty
+                       if (!quat) {  /* new empty */
                                unit_qt(self->quat);
                        }
                        else {
index 4ffe848..b887150 100644 (file)
@@ -44,7 +44,7 @@ typedef struct {
  * be stored in py_data) or be a wrapper for data allocated through
  * blender (stored in blend_data). This is an either/or struct not both */
 
-//prototypes
+/* prototypes */
 PyObject *Quaternion_CreatePyObject(float *quat, int type, PyTypeObject *base_type);
 PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user,
                                        unsigned char cb_type, unsigned char cb_subtype);
index d461486..4a6891c 100644 (file)
@@ -1100,12 +1100,12 @@ static PyObject *Vector_project(VectorObject *self, PyObject *value)
        if (BaseMath_ReadCallback(self) == -1)
                return NULL;
 
-       //get dot products
+       /* get dot products */
        for (x = 0; x < size; x++) {
                dot += (double)(self->vec[x] * tvec[x]);
                dot2 += (double)(tvec[x] * tvec[x]);
        }
-       //projection
+       /* projection */
        dot /= dot2;
        for (x = 0; x < size; x++) {
                vec[x] = (float)dot * tvec[x];
@@ -2709,7 +2709,7 @@ static int row_vector_multiplication(float r_vec[MAX_DIMENSIONS], VectorObject *
        memcpy(vec_cpy, vec->vec, vec_size * sizeof(float));
 
        r_vec[3] = 1.0f;
-       //muliplication
+       /* muliplication */
        for (col = 0; col < mat->num_col; col++) {
                double dot = 0.0;
                for (row = 0; row < mat->num_row; row++) {
@@ -2733,7 +2733,7 @@ static PyObject *Vector_negate(VectorObject *self)
 
        negate_vn(self->vec, self->size);
 
-       (void)BaseMath_WriteCallback(self); // already checked for error
+       (void)BaseMath_WriteCallback(self);  /* already checked for error */
        Py_RETURN_NONE;
 }
 
@@ -2829,10 +2829,10 @@ PyTypeObject vector_Type = {
        /*** Assigned meaning in release 2.0 ***/
 
        /* call function for all accessible objects */
-       (traverseproc)BaseMathObject_traverse,  //tp_traverse
+       (traverseproc)BaseMathObject_traverse,  /* tp_traverse */
 
        /* delete references to contained objects */
-       (inquiry)BaseMathObject_clear,  //tp_clear
+       (inquiry)BaseMathObject_clear,  /* tp_clear */
 
        /***  Assigned meaning in release 2.1 ***/
        /*** rich comparisons ***/
index 818f30e..2231763 100644 (file)
@@ -51,7 +51,7 @@ PyDoc_STRVAR(M_Geometry_doc,
 "The Blender geometry module"
 );
 
-//---------------------------------INTERSECTION FUNCTIONS--------------------
+/* ---------------------------------INTERSECTION FUNCTIONS-------------------- */
 
 PyDoc_STRVAR(M_Geometry_intersect_ray_tri_doc,
 ".. function:: intersect_ray_tri(v1, v2, v3, ray, orig, clip=True)\n"
@@ -251,10 +251,6 @@ static PyObject *M_Geometry_intersect_line_line(PyObject *UNUSED(self), PyObject
        }
 }
 
-
-
-
-//----------------------------geometry.normal() -------------------
 PyDoc_STRVAR(M_Geometry_normal_doc,
 ".. function:: normal(v1, v2, v3, v4=None)\n"
 "\n"
@@ -338,7 +334,7 @@ static PyObject *M_Geometry_normal(PyObject *UNUSED(self), PyObject *args)
        return Vector_CreatePyObject(n, 3, Py_NEW, NULL);
 }
 
-//--------------------------------- AREA FUNCTIONS--------------------
+/* --------------------------------- AREA FUNCTIONS-------------------- */
 
 PyDoc_STRVAR(M_Geometry_area_tri_doc,
 ".. function:: area_tri(v1, v2, v3)\n"
index 1d5838e..1daf78b 100644 (file)
@@ -105,8 +105,8 @@ typedef struct QuicktimeExport {
        PixMapHandle thePixMap;
        ImageDescription    **anImageDescription;
 
-       ImBuf       *ibuf;  //imagedata for Quicktime's Gworld
-       ImBuf       *ibuf2; //copy of renderdata, to be Y-flipped
+       ImBuf       *ibuf;   /* imagedata for Quicktime's Gworld */
+       ImBuf       *ibuf2;  /* copy of renderdata, to be Y-flipped */
 
 } QuicktimeExport;
 
@@ -278,9 +278,9 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports)
                SCGetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings);
 
 
-               //Fill the render QuicktimeCodecSettigns struct
+               /* Fill the render QuicktimeCodecSettigns struct */
                rd->qtcodecsettings.codecTemporalQuality = (qtdata->gTemporalSettings.temporalQuality * 100) / codecLosslessQuality;
-               //Do not override scene frame rate (qtdata->gTemporalSettings.framerate)
+               /* Do not override scene frame rate (qtdata->gTemporalSettings.framerate) */
                rd->qtcodecsettings.keyFrameRate = qtdata->gTemporalSettings.keyFrameRate;
                
                rd->qtcodecsettings.codecType = qtdata->gSpatialSettings.codecType;
@@ -291,7 +291,7 @@ static OSErr QT_GetCodecSettingsFromScene(RenderData *rd, ReportList *reports)
                rd->qtcodecsettings.bitRate = qtdata->aDataRateSetting.dataRate;
                rd->qtcodecsettings.minSpatialQuality = (qtdata->aDataRateSetting.minSpatialQuality * 100) / codecLosslessQuality;
                rd->qtcodecsettings.minTemporalQuality = (qtdata->aDataRateSetting.minTemporalQuality * 100) / codecLosslessQuality;
-               //Frame duration is already known (qtdata->aDataRateSetting.frameDuration)
+               /* Frame duration is already known (qtdata->aDataRateSetting.frameDuration) */
                
        }
        else {
@@ -443,18 +443,18 @@ static void QT_DoAddVideoSamplesToMedia(int frame, int *pixels, int rectx, int r
        Ptr myPtr;
 
 
-       //copy and flip renderdata
+       /* copy and flip renderdata */
        memcpy(qtexport->ibuf2->rect, pixels, 4 * rectx * recty);
        IMB_flipy(qtexport->ibuf2);
 
-       //get pointers to parse bitmapdata
+       /* get pointers to parse bitmapdata */
        myPtr = GetPixBaseAddr(qtexport->thePixMap);
        imageRect = (**qtexport->thePixMap).bounds;
 
        from = (unsigned char *) qtexport->ibuf2->rect;
        to = (unsigned char *) myPtr;
 
-       //parse RGBA bitmap into Quicktime's ARGB GWorld
+       /* parse RGBA bitmap into Quicktime's ARGB GWorld */
        boxsize = rectx * recty;
        for (index = 0; index < boxsize; index++) {
                to[0] = from[3];
@@ -684,15 +684,15 @@ static void check_renderbutton_framerate(RenderData *rd, ReportList *reports)
        err = SCSetInfo(qtdata->theComponent, scTemporalSettingsType,   &qtdata->gTemporalSettings);
        CheckError(err, "SCSetInfo error", reports);
 
-       if (qtdata->gTemporalSettings.frameRate == 1571553) {           // 23.98 fps
+       if (qtdata->gTemporalSettings.frameRate == 1571553) {       /* 23.98 fps */
                qtdata->kVideoTimeScale = 24000;
                qtdata->duration = 1001;
        }
-       else if (qtdata->gTemporalSettings.frameRate == 1964113) {  // 29.97 fps
+       else if (qtdata->gTemporalSettings.frameRate == 1964113) {  /* 29.97 fps */
                qtdata->kVideoTimeScale = 30000;
                qtdata->duration = 1001;
        }
-       else if (qtdata->gTemporalSettings.frameRate == 3928227) {  // 59.94 fps
+       else if (qtdata->gTemporalSettings.frameRate == 3928227) {  /* 59.94 fps */
                qtdata->kVideoTimeScale = 60000;
                qtdata->duration = 1001;
        }
@@ -714,7 +714,7 @@ void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
                        rd->qtcodecsettings.codecSpatialQuality = (codecHighQuality * 100) / codecLosslessQuality;
                        rd->qtcodecsettings.codecTemporalQuality = (codecHighQuality * 100) / codecLosslessQuality;
                        rd->qtcodecsettings.keyFrameRate = 25;
-                       rd->qtcodecsettings.bitRate = 5000000; //5 Mbps
+                       rd->qtcodecsettings.bitRate = 5000000;  /* 5 Mbps */
                }
        }
 }
@@ -826,9 +826,9 @@ static int request_qtcodec_settings(bContext *C, wmOperator *op)
        SCGetInfo(qtdata->theComponent, scTemporalSettingsType, &qtdata->gTemporalSettings);
        
        
-       //Fill the render QuicktimeCodecSettings struct
+       /* Fill the render QuicktimeCodecSettings struct */
        rd->qtcodecsettings.codecTemporalQuality = (qtdata->gTemporalSettings.temporalQuality * 100) / codecLosslessQuality;
-       //Do not override scene frame rate (qtdata->gTemporalSettings.framerate)
+       /* Do not override scene frame rate (qtdata->gTemporalSettings.framerate) */
        rd->qtcodecsettings.keyFrameRate = qtdata->gTemporalSettings.keyFrameRate;
        
        rd->qtcodecsettings.codecType = qtdata->gSpatialSettings.codecType;
@@ -839,26 +839,26 @@ static int request_qtcodec_settings(bContext *C, wmOperator *op)
        rd->qtcodecsettings.bitRate = qtdata->aDataRateSetting.dataRate;
        rd->qtcodecsettings.minSpatialQuality = (qtdata->aDataRateSetting.minSpatialQuality * 100) / codecLosslessQuality;
        rd->qtcodecsettings.minTemporalQuality = (qtdata->aDataRateSetting.minTemporalQuality * 100) / codecLosslessQuality;
-       //Frame duration is already known (qtdata->aDataRateSetting.frameDuration)
+       /* Frame duration is already known (qtdata->aDataRateSetting.frameDuration) */
        
        QT_SaveCodecSettingsToScene(rd, op->reports);
 
        /* framerate jugglin' */
-       if (qtdata->gTemporalSettings.frameRate == 1571553) {           // 23.98 fps
+       if (qtdata->gTemporalSettings.frameRate == 1571553) {           /* 23.98 fps */
                qtdata->kVideoTimeScale = 24000;
                qtdata->duration = 1001;
 
                rd->frs_sec = 24;
                rd->frs_sec_base = 1.001;
        }
-       else if (qtdata->gTemporalSettings.frameRate == 1964113) {  // 29.97 fps
+       else if (qtdata->gTemporalSettings.frameRate == 1964113) {  /* 29.97 fps */
                qtdata->kVideoTimeScale = 30000;
                qtdata->duration = 1001;
 
                rd->frs_sec = 30;
                rd->frs_sec_base = 1.001;
        }
-       else if (qtdata->gTemporalSettings.frameRate == 3928227) {  // 59.94 fps
+       else if (qtdata->gTemporalSettings.frameRate == 3928227) {  /* 59.94 fps */
                qtdata->kVideoTimeScale = 60000;
                qtdata->duration = 1001;
 
@@ -891,8 +891,8 @@ static int ED_operator_setqtcodec(bContext *C)
 }
 
 #if defined(__APPLE__) && defined(GHOST_COCOA)
-//Need to set up a Cocoa NSAutoReleasePool to avoid memory leak
-//And it must be done in an objC file, so use a GHOST_SystemCocoa.mm function for that
+/Need to set up a Cocoa NSAutoReleasePool to avoid memory leak
+ * And it must be done in an objC file, so use a GHOST_SystemCocoa.mm function for that */
 extern int cocoa_request_qtcodec_settings(bContext *C, wmOperator *op);
 
 int fromcocoa_request_qtcodec_settings(bContext *C, wmOperator *op)
index fb068fc..8fd016a 100644 (file)
 #include "../imbuf/IMB_imbuf_types.h"
 
 #ifndef USE_QTKIT
-#ifndef __MOVIES__
-#ifdef _WIN32
-#include <Movies.h>
-#elif defined(__APPLE__)
-#define __CARBONSOUND__
-#import <Carbon/Carbon.h>
-#include <QuickTime/Movies.h>
-#endif
-#endif  /* __MOVIES__ */
+#  ifndef __MOVIES__
+#    ifdef _WIN32
+#      include <Movies.h>
+#    elif defined(__APPLE__)
+#      define __CARBONSOUND__
+#      import <Carbon/Carbon.h>
+#      include <QuickTime/Movies.h>
+#    endif
+#  endif  /* __MOVIES__ */
 #endif  /* USE_QTKIT */
 
 #ifdef _WIN32
-#ifndef __FIXMATH__
-#include <FixMath.h>
-#endif /* __FIXMATH__ */
+#  ifndef __FIXMATH__
+#    include <FixMath.h>
+#  endif /* __FIXMATH__ */
 #endif /* _WIN32 _ */
 
-
 char *get_valid_qtname(const char *name);
 
-
-// quicktime movie import functions
+/* quicktime movie import functions */
 
 int            anim_is_quicktime (const char *name);
 int            startquicktime (struct anim *anim);
 void   free_anim_quicktime (struct anim *anim);
 ImBuf  *qtime_fetchibuf (struct anim *anim, int position);
 
-// quicktime image import functions
+/* quicktime image import functions */
 
 int            imb_is_a_quicktime (char *name);
 ImBuf  *imb_quicktime_decode(unsigned char *mem, int size, int flags);
index 8c9d486..809f363 100644 (file)
@@ -1317,7 +1317,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
        BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.dpi);
        ver_width = (int)BLF_width(style->widgetlabel.uifont_id, version_buf) + 5;
        rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_buf) + 5;
-#endif //WITH_BUILDINFO
+#endif  /* WITH_BUILDINFO */
 
        block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
        uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
@@ -1329,7 +1329,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
 #ifdef WITH_BUILDINFO  
        uiDefBut(block, LABEL, 0, version_buf, 494 - ver_width, 282 - 24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
        uiDefBut(block, LABEL, 0, revision_buf, 494 - rev_width, 282 - 36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
-#endif //WITH_BUILDINFO
+#endif  /* WITH_BUILDINFO */
        
        layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 10, 2, 480, 110, style);
        
@@ -1501,12 +1501,12 @@ static int wm_search_menu_poll(bContext *C)
        else {
                ScrArea *sa = CTX_wm_area(C);
                if (sa) {
-                       if (sa->spacetype == SPACE_CONSOLE) return 0;  // XXX - so we can use the shortcut in the console
-                       if (sa->spacetype == SPACE_TEXT) return 0;  // XXX - so we can use the spacebar in the text editor
+                       if (sa->spacetype == SPACE_CONSOLE) return 0;  /* XXX - so we can use the shortcut in the console */
+                       if (sa->spacetype == SPACE_TEXT) return 0;     /* XXX - so we can use the spacebar in the text editor */
                }
                else {
                        Object *editob = CTX_data_edit_object(C);
-                       if (editob && editob->type == OB_FONT) return 0;  // XXX - so we can use the spacebar for entering text
+                       if (editob && editob->type == OB_FONT) return 0;  /* XXX - so we can use the spacebar for entering text */
                }
        }
        return 1;
@@ -3856,7 +3856,7 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_clip_border");
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_render_border");
        WM_modalkeymap_assign(keymap, "VIEW3D_OT_select_border");
-       WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); // XXX TODO: zoom border should perhaps map rightmouse to zoom out instead of in+cancel
+       WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom_border"); /* XXX TODO: zoom border should perhaps map rightmouse to zoom out instead of in+cancel */
 }
 
 /* zoom to border modal operators */