Cleanup: indentation, style
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user