Cleanup: use DRW_cache_mesh prefix w/ mesh objects

Avoid confusion for non mesh types where verts/wire/surface might apply.

Other object types use this convention already.
This commit is contained in:
Campbell Barton
2017-04-12 18:08:07 +10:00
parent 9e94479359
commit cc0c5dbd91
17 changed files with 29 additions and 29 deletions

View File

@@ -579,7 +579,7 @@ static void CLAY_cache_populate(void *vedata, Object *ob)
/* TODO all renderable */
if (ob->type == OB_MESH) {
geom = DRW_cache_surface_get(ob);
geom = DRW_cache_mesh_surface_get(ob);
/* Depth Prepass */
DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);

View File

@@ -186,7 +186,7 @@ static void EEVEE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
IDProperty *ces_mode_ob = BKE_object_collection_engine_get(ob, COLLECTION_MODE_OBJECT, "");
bool do_cull = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_backface_culling");
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Depth Prepass */
DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);

View File

@@ -1496,7 +1496,7 @@ Batch *DRW_cache_single_vert_get(void)
}
/* Meshes */
void DRW_cache_wire_overlay_get(Object *ob, Batch **tris, Batch **ledges, Batch **lverts)
void DRW_cache_mesh_wire_overlay_get(Object *ob, Batch **tris, Batch **ledges, Batch **lverts)
{
BLI_assert(ob->type == OB_MESH);
@@ -1516,7 +1516,7 @@ Batch *DRW_cache_face_centers_get(Object *ob)
return BKE_mesh_batch_cache_get_overlay_facedots(me);
}
Batch *DRW_cache_wire_outline_get(Object *ob)
Batch *DRW_cache_mesh_wire_outline_get(Object *ob)
{
Batch *fancy_wire = NULL;
@@ -1528,7 +1528,7 @@ Batch *DRW_cache_wire_outline_get(Object *ob)
return fancy_wire;
}
Batch *DRW_cache_surface_get(Object *ob)
Batch *DRW_cache_mesh_surface_get(Object *ob)
{
Batch *surface = NULL;
@@ -1540,7 +1540,7 @@ Batch *DRW_cache_surface_get(Object *ob)
return surface;
}
Batch *DRW_cache_surface_verts_get(Object *ob)
Batch *DRW_cache_mesh_surface_verts_get(Object *ob)
{
Batch *surface = NULL;
@@ -1552,7 +1552,7 @@ Batch *DRW_cache_surface_verts_get(Object *ob)
return surface;
}
Batch *DRW_cache_verts_get(Object *ob)
Batch *DRW_cache_mesh_verts_get(Object *ob)
{
Batch *surface = NULL;

View File

@@ -79,12 +79,12 @@ struct Batch *DRW_cache_bone_point_wire_outline_get(void);
struct Batch *DRW_cache_bone_arrows_get(void);
/* Meshes */
void DRW_cache_wire_overlay_get(
void DRW_cache_mesh_wire_overlay_get(
struct Object *ob, struct Batch **tris, struct Batch **ledges, struct Batch **lverts);
struct Batch *DRW_cache_face_centers_get(struct Object *ob);
struct Batch *DRW_cache_wire_outline_get(struct Object *ob);
struct Batch *DRW_cache_surface_get(struct Object *ob);
struct Batch *DRW_cache_surface_verts_get(struct Object *ob);
struct Batch *DRW_cache_verts_get(struct Object *ob);
struct Batch *DRW_cache_mesh_wire_outline_get(struct Object *ob);
struct Batch *DRW_cache_mesh_surface_get(struct Object *ob);
struct Batch *DRW_cache_mesh_surface_verts_get(struct Object *ob);
struct Batch *DRW_cache_mesh_verts_get(struct Object *ob);
#endif /* __DRAW_CACHE_H__ */

View File

@@ -184,7 +184,7 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -182,7 +182,7 @@ static void EDIT_LATTICE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -375,7 +375,7 @@ static void edit_mesh_add_ob_to_pass(
struct Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts, *geo_ovl_fcenter;
ToolSettings *tsettings = scene->toolsettings;
DRW_cache_wire_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts);
DRW_cache_mesh_wire_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts);
DRW_shgroup_call_add(face_shgrp, geo_ovl_tris, ob->obmat);
DRW_shgroup_call_add(ledges_shgrp, geo_ovl_ledges, ob->obmat);
@@ -418,7 +418,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
face_mod = (do_occlude_wire) ? 0.0f : 1.0f;
if (do_occlude_wire) {
geom = DRW_cache_surface_get(ob);
geom = DRW_cache_mesh_surface_get(ob);
DRW_shgroup_call_add(stl->g_data->depth_shgrp_hidden_wire, geom, ob->obmat);
}
@@ -428,12 +428,12 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
}
if (vnormals_do) {
geom = DRW_cache_verts_get(ob);
geom = DRW_cache_mesh_verts_get(ob);
DRW_shgroup_call_add(stl->g_data->vnormals_shgrp, geom, ob->obmat);
}
if (lnormals_do) {
geom = DRW_cache_surface_verts_get(ob);
geom = DRW_cache_mesh_surface_verts_get(ob);
DRW_shgroup_call_add(stl->g_data->lnormals_shgrp, geom, ob->obmat);
}

View File

@@ -182,7 +182,7 @@ static void EDIT_METABALL_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -182,7 +182,7 @@ static void EDIT_SURFACE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -182,7 +182,7 @@ static void EDIT_TEXT_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -1101,7 +1101,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
if (ob != obedit) {
if (do_outlines) {
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
switch (theme_id) {
case TH_ACTIVE:
DRW_shgroup_call_add(stl->g_data->outlines_active, geom, ob->obmat);

View File

@@ -182,7 +182,7 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -182,7 +182,7 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -179,7 +179,7 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -176,7 +176,7 @@ static void PARTICLE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -176,7 +176,7 @@ static void POSE_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);

View File

@@ -176,7 +176,7 @@ static void SCULPT_cache_populate(void *vedata, Object *ob)
if (ob->type == OB_MESH) {
/* Get geometry cache */
struct Batch *geom = DRW_cache_surface_get(ob);
struct Batch *geom = DRW_cache_mesh_surface_get(ob);
/* Add geom to a shading group */
DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat);