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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-09 17:39:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-09 17:45:21 +0300
commit240b8b967994235b24a034c87c18218e923924b7 (patch)
tree1349bcb70b0cbcc955ba36e3773482f3e40129f6 /source/blender/draw/modes/object_mode.c
parentacd811278ebdfdc1329bedfade42c531c0c805a8 (diff)
Cleanup: Use full name for scene_layer in draw
Diffstat (limited to 'source/blender/draw/modes/object_mode.c')
-rw-r--r--source/blender/draw/modes/object_mode.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index ee2e8d6d236..d5a6db9abf8 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -1077,11 +1077,11 @@ static void OBJECT_cache_init(void *vedata)
}
}
-static void DRW_shgroup_lamp(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_lamp(OBJECT_StorageList *stl, Object *ob, SceneLayer *scene_layer)
{
Lamp *la = ob->data;
float *color;
- int theme_id = DRW_object_wire_theme_get(ob, sl, &color);
+ int theme_id = DRW_object_wire_theme_get(ob, scene_layer, &color);
static float zero = 0.0f;
float **la_mats = (float **)DRW_object_engine_data_get(ob, &draw_engine_object_type, NULL);
@@ -1182,7 +1182,7 @@ static void DRW_shgroup_lamp(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl
DRW_shgroup_call_dynamic_add(stl->g_data->lamp_groundpoint, ob->obmat[3]);
}
-static void DRW_shgroup_camera(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_camera(OBJECT_StorageList *stl, Object *ob, SceneLayer *scene_layer)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
View3D *v3d = draw_ctx->v3d;
@@ -1191,7 +1191,7 @@ static void DRW_shgroup_camera(OBJECT_StorageList *stl, Object *ob, SceneLayer *
Camera *cam = ob->data;
const bool is_active = (ob == v3d->camera);
float *color;
- DRW_object_wire_theme_get(ob, sl, &color);
+ DRW_object_wire_theme_get(ob, scene_layer, &color);
float vec[4][3], asp[2], shift[2], scale[3], drawsize;
@@ -1268,10 +1268,10 @@ static void DRW_shgroup_camera(OBJECT_StorageList *stl, Object *ob, SceneLayer *
}
}
-static void DRW_shgroup_empty(OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_empty(OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, SceneLayer *scene_layer)
{
float *color;
- DRW_object_wire_theme_get(ob, sl, &color);
+ DRW_object_wire_theme_get(ob, scene_layer, &color);
switch (ob->empty_drawtype) {
case OB_PLAINAXES:
@@ -1303,9 +1303,9 @@ static void DRW_shgroup_empty(OBJECT_StorageList *stl, OBJECT_PassList *psl, Obj
}
}
-static void DRW_shgroup_forcefield(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_forcefield(OBJECT_StorageList *stl, Object *ob, SceneLayer *scene_layer)
{
- int theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ int theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
float *color = DRW_color_background_blend_get(theme_id);
PartDeflect *pd = ob->pd;
Curve *cu = (ob->type == OB_CURVE) ? ob->data : NULL;
@@ -1402,11 +1402,11 @@ static void DRW_shgroup_forcefield(OBJECT_StorageList *stl, Object *ob, SceneLay
}
}
-static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_speaker(OBJECT_StorageList *stl, Object *ob, SceneLayer *scene_layer)
{
float *color;
static float one = 1.0f;
- DRW_object_wire_theme_get(ob, sl, &color);
+ DRW_object_wire_theme_get(ob, scene_layer, &color);
DRW_shgroup_call_dynamic_add(stl->g_data->speaker, color, &one, ob->obmat);
}
@@ -1421,13 +1421,13 @@ typedef struct OBJECT_LightProbeEngineData {
float corner[3];
} OBJECT_LightProbeEngineData;
-static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, SceneLayer *sl)
+static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, OBJECT_PassList *psl, Object *ob, SceneLayer *scene_layer)
{
float *color;
static float one = 1.0f;
LightProbe *prb = (LightProbe *)ob->data;
bool do_outlines = ((ob->base_flag & BASE_SELECTED) != 0);
- DRW_object_wire_theme_get(ob, sl, &color);
+ DRW_object_wire_theme_get(ob, scene_layer, &color);
OBJECT_LightProbeEngineData *prb_data;
OBJECT_LightProbeEngineData **prb_data_pt = (OBJECT_LightProbeEngineData **)DRW_object_engine_data_get(ob, &draw_engine_object_type, NULL);
@@ -1628,12 +1628,12 @@ static void DRW_shgroup_relationship_lines(OBJECT_StorageList *stl, Object *ob)
}
}
-static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, SceneLayer *sl, View3D *v3d)
+static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, SceneLayer *scene_layer, View3D *v3d)
{
const bool is_library = ob->id.us > 1 || ID_IS_LINKED(ob);
DRWShadingGroup *shgroup;
- if (ob == OBACT_NEW(sl)) {
+ if (ob == OBACT_NEW(scene_layer)) {
shgroup = stl->g_data->center_active;
}
else if (ob->base_flag & BASE_SELECTED) {
@@ -1733,7 +1733,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
OBJECT_StorageList *stl = ((OBJECT_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
Scene *scene = draw_ctx->scene;
- SceneLayer *sl = draw_ctx->scene_layer;
+ SceneLayer *scene_layer = draw_ctx->scene_layer;
View3D *v3d = draw_ctx->v3d;
int theme_id = TH_UNDEFINED;
@@ -1751,7 +1751,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if (ob != obedit && !((ob == draw_ctx->obact) && (ob->mode & OB_MODE_ALL_PAINT))) {
struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob);
if (geom) {
- theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
DRWShadingGroup *shgroup = shgroup_theme_id_to_outline_or(stl, theme_id, NULL);
if (shgroup != NULL) {
DRW_shgroup_call_add(shgroup, geom, ob->obmat);
@@ -1770,7 +1770,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
struct Gwn_Batch *geom = DRW_cache_mesh_edges_get(ob);
if (geom) {
if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
}
DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
@@ -1790,7 +1790,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if (ob != obedit) {
struct Gwn_Batch *geom = DRW_cache_lattice_wire_get(ob, false);
if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
}
DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
@@ -1805,7 +1805,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if (ob != obedit) {
struct Gwn_Batch *geom = DRW_cache_curve_edge_wire_get(ob);
if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
}
DRWShadingGroup *shgroup = shgroup_theme_id_to_wire_or(stl, theme_id, stl->g_data->wire);
DRW_shgroup_call_add(shgroup, geom, ob->obmat);
@@ -1813,19 +1813,19 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
break;
}
case OB_LAMP:
- DRW_shgroup_lamp(stl, ob, sl);
+ DRW_shgroup_lamp(stl, ob, scene_layer);
break;
case OB_CAMERA:
- DRW_shgroup_camera(stl, ob, sl);
+ DRW_shgroup_camera(stl, ob, scene_layer);
break;
case OB_EMPTY:
- DRW_shgroup_empty(stl, psl, ob, sl);
+ DRW_shgroup_empty(stl, psl, ob, scene_layer);
break;
case OB_SPEAKER:
- DRW_shgroup_speaker(stl, ob, sl);
+ DRW_shgroup_speaker(stl, ob, scene_layer);
break;
case OB_LIGHTPROBE:
- DRW_shgroup_lightprobe(stl, psl, ob, sl);
+ DRW_shgroup_lightprobe(stl, psl, ob, scene_layer);
break;
case OB_ARMATURE:
{
@@ -1833,7 +1833,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
if (arm->edbo == NULL) {
if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
DRW_shgroup_armature_object(
- ob, sl, psl->bone_solid, psl->bone_wire, psl->bone_envelope,
+ ob, scene_layer, psl->bone_solid, psl->bone_wire, psl->bone_envelope,
stl->g_data->relationship_lines);
}
}
@@ -1844,20 +1844,20 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
}
if (ob->pd && ob->pd->forcefield) {
- DRW_shgroup_forcefield(stl, ob, sl);
+ DRW_shgroup_forcefield(stl, ob, scene_layer);
}
/* don't show object extras in set's */
if ((ob->base_flag & (BASE_FROM_SET | BASE_FROMDUPLI)) == 0) {
- DRW_shgroup_object_center(stl, ob, sl, v3d);
+ DRW_shgroup_object_center(stl, ob, scene_layer, v3d);
DRW_shgroup_relationship_lines(stl, ob);
if ((ob->dtx & OB_DRAWNAME) && DRW_state_show_text()) {
struct DRWTextStore *dt = DRW_text_cache_ensure();
if (theme_id == TH_UNDEFINED) {
- theme_id = DRW_object_wire_theme_get(ob, sl, NULL);
+ theme_id = DRW_object_wire_theme_get(ob, scene_layer, NULL);
}
unsigned char color[4];