[Bf-blender-cvs] [d21a4407dc4] blender2.8: Cleanup: rename & change order of declaration
Campbell Barton
noreply at git.blender.org
Thu Apr 20 20:27:41 CEST 2017
Commit: d21a4407dc4bc2bcb1b4c4a942774e01e51fb0f2
Author: Campbell Barton
Date: Fri Apr 21 04:29:33 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBd21a4407dc4bc2bcb1b4c4a942774e01e51fb0f2
Cleanup: rename & change order of declaration
===================================================================
M source/blender/draw/engines/clay/clay.c
M source/blender/draw/modes/object_mode.c
===================================================================
diff --git a/source/blender/draw/engines/clay/clay.c b/source/blender/draw/engines/clay/clay.c
index f4f00345fd9..861204d3a34 100644
--- a/source/blender/draw/engines/clay/clay.c
+++ b/source/blender/draw/engines/clay/clay.c
@@ -569,12 +569,11 @@ static void CLAY_cache_populate(void *vedata, Object *ob)
if (!DRW_is_object_renderable(ob))
return;
- 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_object_surface_get(ob);
-
if (geom) {
+ 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");
+
/* Depth Prepass */
DRW_shgroup_call_add((do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob->obmat);
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index a5fbaea64b6..b203b6e67b7 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -402,7 +402,7 @@ static DRWShadingGroup *shgroup_wire(DRWPass *pass, const float col[4], struct G
return grp;
}
-static DRWShadingGroup *shgroup_theme_id_to_outline_shgroup_or(
+static DRWShadingGroup *shgroup_theme_id_to_outline_or(
OBJECT_StorageList *stl, int theme_id, DRWShadingGroup *fallback)
{
switch (theme_id) {
@@ -419,7 +419,7 @@ static DRWShadingGroup *shgroup_theme_id_to_outline_shgroup_or(
}
}
-static DRWShadingGroup *shgroup_theme_id_to_wire_shgroup_or(
+static DRWShadingGroup *shgroup_theme_id_to_wire_or(
OBJECT_StorageList *stl, int theme_id, DRWShadingGroup *fallback)
{
switch (theme_id) {
@@ -1168,7 +1168,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
struct Batch *geom = DRW_cache_object_surface_get(ob);
if (geom) {
int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
- DRWShadingGroup *shgroup = shgroup_theme_id_to_outline_shgroup_or(stl, theme_id, NULL);
+ DRWShadingGroup *shgroup = shgroup_theme_id_to_outline_or(stl, theme_id, NULL);
if (shgroup != NULL) {
DRW_shgroup_call_add(shgroup, geom, ob->obmat);
}
@@ -1187,7 +1187,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
struct Batch *geom = DRW_cache_lattice_wire_get(ob);
int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
- DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_shgroup_or(stl, theme_id, stl->g_data->wire);
+ DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
DRW_shgroup_call_add(shgroup, geom, ob->obmat);
}
break;
@@ -1199,7 +1199,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if (ob != obedit) {
struct Batch *geom = DRW_cache_curve_edge_wire_get(ob);
int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
- DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_shgroup_or(stl, theme_id, stl->g_data->wire);
+ DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
DRW_shgroup_call_add(shgroup, geom, ob->obmat);
}
break;
More information about the Bf-blender-cvs
mailing list