forked from bartvdbraak/blender
style cleanup
This commit is contained in:
parent
b3aa368c8f
commit
1aebc0e790
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user