[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53100] trunk/blender/source/blender: style cleanup
Campbell Barton
ideasman42 at gmail.com
Tue Dec 18 02:46:16 CET 2012
Revision: 53100
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53100
Author: campbellbarton
Date: 2012-12-18 01:46:15 +0000 (Tue, 18 Dec 2012)
Log Message:
-----------
style cleanup
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/object.c
trunk/blender/source/blender/blenkernel/intern/particle_system.c
trunk/blender/source/blender/bmesh/CMakeLists.txt
trunk/blender/source/blender/compositor/operations/COM_OpenCLKernels.cl
trunk/blender/source/blender/editors/object/object_vgroup.c
trunk/blender/source/blender/editors/space_buttons/buttons_texture.c
trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
trunk/blender/source/blender/gpu/intern/gpu_material.c
Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/object.c 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2012-12-18 01:46:15 UTC (rev 53100)
@@ -1570,7 +1570,7 @@
}
/* combine these rotations */
- if(use_drot)
+ if (use_drot)
mul_m3_m3m3(mat, dmat, rmat);
else
copy_m3_m3(mat, rmat);
Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c 2012-12-18 01:46:15 UTC (rev 53100)
@@ -2413,7 +2413,8 @@
if (tree) {
BLI_bvhtree_range_query(tree, co, interaction_radius, callback, pfr);
break;
- } else {
+ }
+ else {
BLI_bvhtree_range_query(psys[i]->bvhtree, co, interaction_radius, callback, pfr);
}
}
@@ -2815,7 +2816,8 @@
sphdata->force_cb = sph_force_cb;
sphdata->density_cb = sph_density_accum_cb;
sphdata->hfac = 1.0f;
- } else {
+ }
+ else {
/* SPH_SOLVER_CLASSICAL */
sphdata->force_cb = sphclassical_force_cb;
sphdata->density_cb = sphclassical_density_accum_cb;
@@ -4221,7 +4223,7 @@
/* actual fluids calculations */
sph_integrate(sim, pa, pa->state.time, &sphdata);
- if(sim->colliders)
+ if (sim->colliders)
collision_check(sim, p, pa->state.time, cfra);
/* SPH particles are not physical particles, just interpolation
@@ -4235,7 +4237,8 @@
sph_springs_modify(psys, timestep);
- } else {
+ }
+ else {
/* SPH_SOLVER_CLASSICAL */
/* Apply SPH forces using classical algorithm (due to Gingold
* and Monaghan). Note that, unlike double-density relaxation,
@@ -4258,7 +4261,7 @@
/* actual fluids calculations */
sph_integrate(sim, pa, pa->state.time, &sphdata);
- if(sim->colliders)
+ if (sim->colliders)
collision_check(sim, p, pa->state.time, cfra);
/* SPH particles are not physical particles, just interpolation
Modified: trunk/blender/source/blender/bmesh/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/bmesh/CMakeLists.txt 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/bmesh/CMakeLists.txt 2012-12-18 01:46:15 UTC (rev 53100)
@@ -113,6 +113,8 @@
tools/bmesh_decimate.h
tools/bmesh_edgesplit.c
tools/bmesh_edgesplit.h
+ tools/bmesh_triangulate.c
+ tools/bmesh_triangulate.h
bmesh.h
bmesh_class.h
Modified: trunk/blender/source/blender/compositor/operations/COM_OpenCLKernels.cl
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_OpenCLKernels.cl 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/compositor/operations/COM_OpenCLKernels.cl 2012-12-18 01:46:15 UTC (rev 53100)
@@ -66,7 +66,8 @@
}
color /= multiplyer;
- } else {
+ }
+ else {
int2 imageCoordinates = realCoordinate - offsetInput;
color = read_imagef(inputImage, SAMPLER_NEAREST, imageCoordinates);
}
Modified: trunk/blender/source/blender/editors/object/object_vgroup.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_vgroup.c 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/editors/object/object_vgroup.c 2012-12-18 01:46:15 UTC (rev 53100)
@@ -3320,8 +3320,7 @@
case WT_REPLACE_ALL_VERTEX_GROUPS:
for (dg_src = ob_slc->defbase.first; dg_src; dg_src = dg_src->next) {
- if (!ed_vgroup_transfer_weight(ob_act, ob_slc, dg_src, scene, method, replace_mode, op))
- {
+ if (!ed_vgroup_transfer_weight(ob_act, ob_slc, dg_src, scene, method, replace_mode, op)) {
fail++;
}
}
Modified: trunk/blender/source/blender/editors/space_buttons/buttons_texture.c
===================================================================
--- trunk/blender/source/blender/editors/space_buttons/buttons_texture.c 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/editors/space_buttons/buttons_texture.c 2012-12-18 01:46:15 UTC (rev 53100)
@@ -363,7 +363,7 @@
Tex *tex = texptr.data;
if (tex)
- BLI_snprintf(name, UI_MAX_NAME_STR, " %s - %s", user->name, tex->id.name+2);
+ BLI_snprintf(name, UI_MAX_NAME_STR, " %s - %s", user->name, tex->id.name + 2);
else
BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name);
}
Modified: trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-12-18 00:51:25 UTC (rev 53099)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_smart_stitch.c 2012-12-18 01:46:15 UTC (rev 53100)
@@ -74,22 +74,22 @@
/* object that stores display data for previewing before confirming stitching */
typedef struct StitchPreviewer {
- /* here we'll store the preview triangle indices of the mesh */
- float *preview_polys;
- /* uvs per polygon. */
- unsigned int *uvs_per_polygon;
- /*number of preview polygons */
- unsigned int num_polys;
- /* preview data. These will be either the previewed vertices or edges depending on stitch mode settings */
- float *preview_stitchable;
- float *preview_unstitchable;
- /* here we'll store the number of elements to be drawn */
- unsigned int num_stitchable;
- unsigned int num_unstitchable;
- unsigned int preview_uvs;
- /* ...and here we'll store the static island triangles*/
- float *static_tris;
- unsigned int num_static_tris;
+ /* here we'll store the preview triangle indices of the mesh */
+ float *preview_polys;
+ /* uvs per polygon. */
+ unsigned int *uvs_per_polygon;
+ /*number of preview polygons */
+ unsigned int num_polys;
+ /* preview data. These will be either the previewed vertices or edges depending on stitch mode settings */
+ float *preview_stitchable;
+ float *preview_unstitchable;
+ /* here we'll store the number of elements to be drawn */
+ unsigned int num_stitchable;
+ unsigned int num_unstitchable;
+ unsigned int preview_uvs;
+ /* ...and here we'll store the static island triangles*/
+ float *static_tris;
+ unsigned int num_static_tris;
} StitchPreviewer;
@@ -98,93 +98,93 @@
/* This is a straightforward implementation, count the uv's in the island that will move and take the mean displacement/rotation and apply it to all
* elements of the island except from the stitchable */
typedef struct IslandStitchData {
- /* rotation can be used only for edges, for vertices there is no such notion */
- float rotation;
- float translation[2];
- /* Used for rotation, the island will rotate around this point */
- float medianPoint[2];
- int numOfElements;
- int num_rot_elements;
- /* flag to remember if island has been added for preview */
- char addedForPreview;
- /* flag an island to be considered for determining static island */
- char stitchableCandidate;
- /* if edge rotation is used, flag so that vertex rotation is not used */
- char use_edge_rotation;
+ /* rotation can be used only for edges, for vertices there is no such notion */
+ float rotation;
+ float translation[2];
+ /* Used for rotation, the island will rotate around this point */
+ float medianPoint[2];
+ int numOfElements;
+ int num_rot_elements;
+ /* flag to remember if island has been added for preview */
+ char addedForPreview;
+ /* flag an island to be considered for determining static island */
+ char stitchableCandidate;
+ /* if edge rotation is used, flag so that vertex rotation is not used */
+ char use_edge_rotation;
} IslandStitchData;
/* just for averaging UVs */
typedef struct UVVertAverage {
- float uv[2];
- unsigned short count;
+ float uv[2];
+ unsigned short count;
} UVVertAverage;
typedef struct UvEdge {
- /* index to uv buffer */
- unsigned int uv1;
- unsigned int uv2;
- /* general use flag (Used to check if edge is boundary here, and propagates to adjacency elements) */
- unsigned char flag;
- /* element that guarantees element->face has the edge on element->tfindex and element->tfindex+1 is the second uv */
- UvElement *element;
- /* next uv edge with the same exact vertices as this one.. Calculated at startup to save time */
- struct UvEdge *next;
- /* point to first of common edges. Needed for iteration */
- struct UvEdge *first;
+ /* index to uv buffer */
+ unsigned int uv1;
+ unsigned int uv2;
+ /* general use flag (Used to check if edge is boundary here, and propagates to adjacency elements) */
+ unsigned char flag;
+ /* element that guarantees element->face has the edge on element->tfindex and element->tfindex+1 is the second uv */
+ UvElement *element;
+ /* next uv edge with the same exact vertices as this one.. Calculated at startup to save time */
+ struct UvEdge *next;
+ /* point to first of common edges. Needed for iteration */
+ struct UvEdge *first;
} UvEdge;
/* stitch state object */
typedef struct StitchState {
- /* use limit flag */
- char use_limit;
- /* limit to operator, same as original operator */
- float limit_dist;
- /* snap uv islands together during stitching */
- char snap_islands;
- /* stich at midpoints or at islands */
- char midpoints;
- /* editmesh, cached for use in modal handler */
- BMEditMesh *em;
- /* clear seams of stitched edges after stitch */
- char clear_seams;
- /* element map for getting info about uv connectivity */
- UvElementMap *element_map;
- /* edge container */
- UvEdge *uvedges;
- /* container of first of a group of coincident uvs, these will be operated upon */
- UvElement **uvs;
- /* maps uvelements to their first coincident uv */
- int *map;
- /* 2D normals per uv to calculate rotation for snapping */
- float *normals;
- /* edge storage */
- UvEdge *edges;
- /* hash for quick lookup of edges */
- GHash *edge_hash;
+ /* use limit flag */
+ char use_limit;
+ /* limit to operator, same as original operator */
+ float limit_dist;
+ /* snap uv islands together during stitching */
+ char snap_islands;
+ /* stich at midpoints or at islands */
+ char midpoints;
+ /* editmesh, cached for use in modal handler */
+ BMEditMesh *em;
+ /* clear seams of stitched edges after stitch */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list