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>2019-03-04 14:09:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-04 14:13:58 +0300
commita53dccb2a9cabd0141cb7efb7959acfd4ea24dad (patch)
treeccdafe6cb7486a603645713878087ae493b0c51e /source
parent270fd28496f7277d0685d0ee03fea23ab39e3aaa (diff)
Cleanup: indentation, style
Diffstat (limited to 'source')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder.cc3
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c37
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c18
3 files changed, 33 insertions, 25 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index 9fe64fd8a05..ef3cf63e032 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -73,7 +73,8 @@ void visibility_animated_check_cb(ID * /*id*/, FCurve *fcu, void *user_data)
if (STREQ(fcu->rna_path, "hide_viewport")) {
data->is_visibility_animated = true;
}
- } else if (data->eval_mode == DAG_EVAL_RENDER) {
+ }
+ else if (data->eval_mode == DAG_EVAL_RENDER) {
if (STREQ(fcu->rna_path, "hide_render")) {
data->is_visibility_animated = true;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index c4d7da2dca8..1b406f298cd 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -226,7 +226,7 @@ static void gpencil_calc_stroke_fill_uv(
/* recalc the internal geometry caches for fill and uvs */
static void DRW_gpencil_recalc_geometry_caches(
- Object *ob, bGPDlayer *gpl, MaterialGPencilStyle *gp_style, bGPDstroke *gps)
+ Object *ob, bGPDlayer *gpl, MaterialGPencilStyle *gp_style, bGPDstroke *gps)
{
if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
/* Calculate triangles cache for filling area (must be done only after changes) */
@@ -247,9 +247,10 @@ static void DRW_gpencil_recalc_geometry_caches(
}
}
-static void set_wireframe_color(Object *ob, bGPDlayer *gpl, View3D *v3d,
- GPENCIL_StorageList *stl,
- MaterialGPencilStyle *gp_style, int id, const bool is_fill)
+static void set_wireframe_color(
+ Object *ob, bGPDlayer *gpl, View3D *v3d,
+ GPENCIL_StorageList *stl,
+ MaterialGPencilStyle *gp_style, int id, const bool is_fill)
{
const DRWContextState *draw_ctx = DRW_context_state_get();
World *world = draw_ctx->scene->world;
@@ -268,9 +269,10 @@ static void set_wireframe_color(Object *ob, bGPDlayer *gpl, View3D *v3d,
/* wire color */
if ((v3d) && (id > -1)) {
- const char type = (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
- v3d->shading.wire_color_type :
- v3d->shading.color_type;
+ const char type = (
+ (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
+ v3d->shading.wire_color_type :
+ v3d->shading.color_type);
/* if fill and wire, use background color */
if ((is_fill) && (stl->shgroups[id].shading_type[0] == OB_WIRE)) {
if (v3d->shading.background_type == V3D_SHADING_BACKGROUND_THEME) {
@@ -423,9 +425,10 @@ static DRWShadingGroup *DRW_gpencil_shgroup_fill_create(
/* shading type */
stl->shgroups[id].shading_type[0] = GPENCIL_USE_SOLID(stl) ? (int)OB_RENDER : shading_type[0];
if (v3d) {
- stl->shgroups[id].shading_type[1] = (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
- v3d->shading.wire_color_type :
- v3d->shading.color_type;
+ stl->shgroups[id].shading_type[1] = (
+ (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
+ v3d->shading.wire_color_type :
+ v3d->shading.color_type);
}
DRW_shgroup_uniform_int(grp, "shading_type", &stl->shgroups[id].shading_type[0], 2);
@@ -532,9 +535,10 @@ DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(
stl->shgroups[id].shading_type[0] = (GPENCIL_USE_SOLID(stl) || onion) ? (int)OB_RENDER : shading_type[0];
if (v3d) {
- stl->shgroups[id].shading_type[1] = (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
- v3d->shading.wire_color_type :
- v3d->shading.color_type;
+ stl->shgroups[id].shading_type[1] = (
+ (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
+ v3d->shading.wire_color_type :
+ v3d->shading.color_type);
}
DRW_shgroup_uniform_int(grp, "shading_type", &stl->shgroups[id].shading_type[0], 2);
@@ -650,9 +654,10 @@ static DRWShadingGroup *DRW_gpencil_shgroup_point_create(
stl->shgroups[id].shading_type[0] = (GPENCIL_USE_SOLID(stl) || onion) ? (int)OB_RENDER : shading_type[0];
if (v3d) {
- stl->shgroups[id].shading_type[1] = (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
- v3d->shading.wire_color_type :
- v3d->shading.color_type;
+ stl->shgroups[id].shading_type[1] = (
+ (stl->shgroups[id].shading_type[0] == OB_WIRE) ?
+ v3d->shading.wire_color_type :
+ v3d->shading.color_type);
}
DRW_shgroup_uniform_int(grp, "shading_type", &stl->shgroups[id].shading_type[0], 2);
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 74b3e7a6f4f..60e6de164e7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -771,7 +771,7 @@ static void drw_gpencil_select_render(GPENCIL_StorageList *stl, GPENCIL_PassList
/* Draw all pending objects */
if ((stl->g_data->gp_cache_used > 0) &&
- (stl->g_data->gp_object_cache))
+ (stl->g_data->gp_object_cache))
{
/* sort by zdepth */
qsort(stl->g_data->gp_object_cache, stl->g_data->gp_cache_used,
@@ -977,18 +977,20 @@ void GPENCIL_draw_scene(void *ved)
stl->storage->tonemapping = stl->storage->is_render ? 1 : 0;
/* active select flag and selection color */
- stl->storage->do_select_outline = ((overlay) &&
- (ob->base_flag & BASE_SELECTED) &&
- (ob->mode == OB_MODE_OBJECT) &&
- (!is_render) && (!playing) &&
- (v3d->flag & V3D_SELECT_OUTLINE));
+ stl->storage->do_select_outline = (
+ (overlay) &&
+ (ob->base_flag & BASE_SELECTED) &&
+ (ob->mode == OB_MODE_OBJECT) &&
+ (!is_render) && (!playing) &&
+ (v3d->flag & V3D_SELECT_OUTLINE));
/* if active object is not object mode, disable for all objects */
if ((draw_ctx->obact) && (draw_ctx->obact->mode != OB_MODE_OBJECT)) {
stl->storage->do_select_outline = 0;
}
- UI_GetThemeColorShadeAlpha4fv((ob == draw_ctx->obact) ? TH_ACTIVE : TH_SELECT, 0, -40,
- stl->storage->select_color);
+ UI_GetThemeColorShadeAlpha4fv(
+ (ob == draw_ctx->obact) ? TH_ACTIVE : TH_SELECT, 0, -40,
+ stl->storage->select_color);
/* draw mix pass */
DRW_draw_pass(psl->mix_pass);