Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-31 06:37:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-31 06:37:28 +0400
commit1aebc0e790c4abe4bdb749fbaad051d1e6c53586 (patch)
treef327c916904ff07cbbf6fd7462768a16aff3c58e /source
parentb3aa368c8f43e6ea2bb1423e844645f583a54a94 (diff)
style cleanup
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h2
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c10
-rw-r--r--source/blender/bmesh/intern/bmesh_log.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c8
8 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 7e34d3a115d..63a61006606 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -69,7 +69,7 @@ void BKE_pbvh_build_grids(PBVH *bvh, struct CCGElem **grid_elems,
struct CCGKey *key, void **gridfaces, struct DMFlagMat *flagmats,
unsigned int **grid_hidden);
void BKE_pbvh_build_bmesh(PBVH *bvh, struct BMesh *bm, int smooth_shading,
- struct BMLog *log);
+ struct BMLog *log);
void BKE_pbvh_free(PBVH *bvh);
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 30a032229b7..5db79a61e39 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -252,7 +252,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index)
pbvh_bmesh_node_split(bvh, prim_bbc, node_index);
- BLI_ghash_free(prim_bbc, NULL, (void*)MEM_freeN);
+ BLI_ghash_free(prim_bbc, NULL, (void *)MEM_freeN);
return TRUE;
}
@@ -909,9 +909,11 @@ static int pbvh_bmesh_collapse_short_edges(PBVH *bvh, EdgeQueue *q,
/* Check that the vertices/edge still exist */
if (BLI_ghash_haskey(deleted_verts, v1) ||
- BLI_ghash_haskey(deleted_verts, v2) ||
- !(e = BM_edge_exists(v1, v2)))
+ BLI_ghash_haskey(deleted_verts, v2) ||
+ !(e = BM_edge_exists(v1, v2)))
+ {
continue;
+ }
/* Check that the edge's vertices are still in the PBVH. It's
* possible that an edge collapse has deleted adjacent faces
@@ -1153,7 +1155,7 @@ void BKE_pbvh_bmesh_after_stroke(PBVH *bvh)
void BKE_pbvh_bmesh_detail_size_set(PBVH *bvh, float detail_size)
{
bvh->bm_max_edge_len = detail_size;
- bvh->bm_min_edge_len = bvh->bm_max_edge_len * 0.4;
+ bvh->bm_min_edge_len = bvh->bm_max_edge_len * 0.4f;
}
void BKE_pbvh_node_mark_topology_update(PBVHNode *node)
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c
index 1e94e81e6d7..b821c9875db 100644
--- a/source/blender/bmesh/intern/bmesh_log.c
+++ b/source/blender/bmesh/intern/bmesh_log.c
@@ -540,7 +540,7 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
const unsigned id = bm_log_vert_id_get(log, v);
const void *key = SET_INT_IN_POINTER(id);
const void *val = BLI_ghash_lookup(id_to_idx, key);
- ((int*)varr)[i++] = GET_INT_FROM_POINTER(val);
+ ((int *)varr)[i++] = GET_INT_FROM_POINTER(val);
}
BLI_ghash_free(id_to_idx, NULL, NULL);
@@ -551,7 +551,7 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
const unsigned id = bm_log_face_id_get(log, f);
const void *key = SET_INT_IN_POINTER(id);
const void *val = BLI_ghash_lookup(id_to_idx, key);
- ((int*)farr)[i++] = GET_INT_FROM_POINTER(val);
+ ((int *)farr)[i++] = GET_INT_FROM_POINTER(val);
}
BLI_ghash_free(id_to_idx, NULL, NULL);
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index e0c8b39ece9..098d8e5006f 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2966,7 +2966,7 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush)
data.ss = ss;
data.sd = sd;
- radius = ss->cache->radius * 1.25;
+ radius = ss->cache->radius * 1.25f;
data.radius_squared = radius * radius;
data.original = ELEM4(brush->sculpt_tool,
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 490d08284d2..3f73fc2605a 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -315,7 +315,7 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats)
static int stats_is_object_dynamic_topology_sculpt(Object *ob)
{
return (ob && (ob->mode & OB_MODE_SCULPT) &&
- ob->sculpt && ob->sculpt->bm);
+ ob->sculpt && ob->sculpt->bm);
}
/* Statistics displayed in info header. Called regularly on scene changes. */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 6dcc74d74e7..fad539de284 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1487,11 +1487,11 @@ typedef enum SculptFlags {
SCULPT_SHOW_DIFFUSE = (1<<9),
/* If set, the mesh will be drawn with smooth-shading in
- dynamic-topology mode */
+ * dynamic-topology mode */
SCULPT_DYNTOPO_SMOOTH_SHADING = (1<<10),
/* If set, dynamic-topology brushes will collapse short edges in
- addition to subdividing long ones */
+ * addition to subdividing long ones */
SCULPT_DYNTOPO_COLLAPSE = (1<<11)
} SculptFlags;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 6e81e866118..80d74c3a9fe 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1439,7 +1439,7 @@ int rna_DupliObject_index_get(PointerRNA *ptr)
int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr)
{
- SculptSession *ss = ((Object*)ptr->id.data)->sculpt;
+ SculptSession *ss = ((Object *)ptr->id.data)->sculpt;
return (ss && ss->bm);
}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index fb4295ddb53..17edf2944aa 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -347,15 +347,15 @@ static void rna_def_sculpt(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_smooth_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DYNTOPO_SMOOTH_SHADING);
RNA_def_property_ui_text(prop, "Smooth Shading",
- "Show faces in dynamic-topology mode with smooth "
- "shading rather than flat shaded");
+ "Show faces in dynamic-topology mode with smooth "
+ "shading rather than flat shaded");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_update");
prop = RNA_def_property(srna, "use_edge_collapse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_DYNTOPO_COLLAPSE);
RNA_def_property_ui_text(prop, "Collapse Short Edges",
- "In dynamic-topology mode, collapse short edges "
- "in addition to subdividing long ones");
+ "In dynamic-topology mode, collapse short edges "
+ "in addition to subdividing long ones");
prop = RNA_def_property(srna, "symmetrize_direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, symmetrize_direction_items);