Cleanup: style, duplicate includes
This commit is contained in:
parent
cfa1700792
commit
617534327a
|
@ -78,8 +78,6 @@
|
|||
|
||||
#include "atomic_ops.h"
|
||||
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
/* ***************************************** */
|
||||
/* AnimData API */
|
||||
|
||||
|
@ -1709,7 +1707,7 @@ static void animsys_evaluate_fcurves(PointerRNA *ptr, ListBase *list, AnimMapper
|
|||
|
||||
/* Pointer is expected to be an ID pointer, if it's not -- we are doomed. */
|
||||
PointerRNA orig_ptr = *ptr;
|
||||
orig_ptr.id.data = ((ID*)orig_ptr.id.data)->orig_id;
|
||||
orig_ptr.id.data = ((ID *)orig_ptr.id.data)->orig_id;
|
||||
orig_ptr.data = orig_ptr.id.data;
|
||||
|
||||
/* calculate then execute each curve */
|
||||
|
|
|
@ -87,11 +87,11 @@ static void deg_task_run_func(TaskPool *pool,
|
|||
/* Perform operation. */
|
||||
if (state->do_stats) {
|
||||
const double start_time = PIL_check_seconds_timer();
|
||||
node->evaluate((::Depsgraph*)state->graph);
|
||||
node->evaluate((::Depsgraph *)state->graph);
|
||||
node->stats.current_time += PIL_check_seconds_timer() - start_time;
|
||||
}
|
||||
else {
|
||||
node->evaluate((::Depsgraph*)state->graph);
|
||||
node->evaluate((::Depsgraph *)state->graph);
|
||||
}
|
||||
/* Schedule children. */
|
||||
BLI_task_pool_delayed_push_begin(pool, thread_id);
|
||||
|
|
|
@ -417,7 +417,7 @@ typedef struct EEVEE_PlanarReflection {
|
|||
|
||||
/* ************ PROBE DATA ************* */
|
||||
|
||||
typedef struct EEVEE_LightProbeVisTest{
|
||||
typedef struct EEVEE_LightProbeVisTest {
|
||||
bool invert;
|
||||
bool cached; /* Reuse last test results */
|
||||
struct Group *group; /* Skip test if NULL */
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/** \file solid_studio_mode.c
|
||||
/** \file solid_mode.c
|
||||
* \ingroup draw_engine
|
||||
*
|
||||
* Simple engine for drawing color and/or depth.
|
||||
|
|
|
@ -168,7 +168,7 @@ static uint get_material_hash(WORKBENCH_PrivateData *wpd, WORKBENCH_MaterialData
|
|||
|
||||
static void workbench_init_object_data(ObjectEngineData *engine_data)
|
||||
{
|
||||
WORKBENCH_ObjectData *data = (WORKBENCH_ObjectData*)engine_data;
|
||||
WORKBENCH_ObjectData *data = (WORKBENCH_ObjectData *)engine_data;
|
||||
data->object_id = e_data.next_object_id++;
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ void workbench_materials_cache_init(WORKBENCH_Data *vedata)
|
|||
/* Deferred Mix Pass */
|
||||
{
|
||||
WORKBENCH_UBO_World *wd = &wpd->world_data;
|
||||
UI_GetThemeColor3fv(UI_GetThemeValue(TH_SHOW_BACK_GRAD)?TH_LOW_GRAD:TH_HIGH_GRAD, wd->background_color_low);
|
||||
UI_GetThemeColor3fv(UI_GetThemeValue(TH_SHOW_BACK_GRAD) ? TH_LOW_GRAD:TH_HIGH_GRAD, wd->background_color_low);
|
||||
UI_GetThemeColor3fv(TH_HIGH_GRAD, wd->background_color_high);
|
||||
copy_v3_v3(wd->diffuse_light_x_pos, BKE_collection_engine_property_value_get_float_array(props, "diffuse_light_x_pos"));
|
||||
copy_v3_v3(wd->diffuse_light_x_neg, BKE_collection_engine_property_value_get_float_array(props, "diffuse_light_x_neg"));
|
||||
|
@ -300,7 +300,8 @@ static WORKBENCH_MaterialData *get_or_create_material_data(WORKBENCH_Data *vedat
|
|||
WORKBENCH_PassList *psl = vedata->psl;
|
||||
WORKBENCH_PrivateData *wpd = stl->g_data;
|
||||
WORKBENCH_MaterialData *material;
|
||||
WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData*)DRW_object_engine_data_ensure(ob, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
|
||||
WORKBENCH_ObjectData *engine_object_data = (WORKBENCH_ObjectData *)DRW_object_engine_data_ensure(
|
||||
ob, &draw_engine_workbench_solid, sizeof(WORKBENCH_ObjectData), &workbench_init_object_data, NULL);
|
||||
WORKBENCH_MaterialData material_template;
|
||||
float color[3];
|
||||
const float hsv_saturation = BKE_collection_engine_property_value_get_float(props, "random_object_color_saturation");
|
||||
|
@ -375,7 +376,7 @@ void workbench_materials_solid_cache_populate(WORKBENCH_Data *vedata, Object *ob
|
|||
|
||||
material = get_or_create_material_data(vedata, props, ob);
|
||||
const bool is_sculpt_mode = is_active && (draw_ctx->object_mode & OB_MODE_SCULPT) != 0;
|
||||
if(is_sculpt_mode) {
|
||||
if (is_sculpt_mode) {
|
||||
DRW_shgroup_call_sculpt_add(material->shgrp, ob, ob->obmat);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* \ingroup draw_engine
|
||||
*/
|
||||
|
||||
#include "DNA_view3d_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
|
||||
#include "GPU_shader.h"
|
||||
#include "DRW_render.h"
|
||||
|
|
|
@ -3360,7 +3360,7 @@ static void widget_numbut_draw(uiWidgetColors *wcol, rcti *rect, int state, int
|
|||
|
||||
wcol_zone = *wcol;
|
||||
copy_v3_v3_char(wcol_zone.item, wcol->text);
|
||||
if (!(state & (UI_STATE_ACTIVE_LEFT|UI_STATE_ACTIVE_RIGHT))) {
|
||||
if (!(state & (UI_STATE_ACTIVE_LEFT | UI_STATE_ACTIVE_RIGHT))) {
|
||||
widget_active_color(wcol_zone.inner);
|
||||
}
|
||||
|
||||
|
|
|
@ -4042,7 +4042,7 @@ static int edbm_fill_holes_exec(bContext *C, wmOperator *op)
|
|||
uint objects_len = 0;
|
||||
Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len);
|
||||
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
|
||||
Object *obedit = objects[ob_index];
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
|
||||
|
|
|
@ -754,7 +754,8 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea
|
|||
#ifdef __APPLE__
|
||||
if (!WM_window_is_fullscreen(win) &&
|
||||
((coords[i][0] == 0 && coords[i][1] == 0) ||
|
||||
(coords[i][0] == WM_window_pixels_x(win) && coords[i][1] == 0))) {
|
||||
(coords[i][0] == WM_window_pixels_x(win) && coords[i][1] == 0)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -347,7 +347,7 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
|
|||
/* setup for the mouse cursor: either set a custom one,
|
||||
* or hide it if it will be drawn with the helpline */
|
||||
wmWindow *win = CTX_wm_window(t->context);
|
||||
switch(t->helpline) {
|
||||
switch (t->helpline) {
|
||||
case HLP_NONE:
|
||||
/* INPUT_VECTOR, INPUT_CUSTOM_RATIO, INPUT_CUSTOM_RATIO_FLIP */
|
||||
if (t->flag & T_MODAL) {
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "DNA_object_types.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
||||
#define STATS_MAX_SIZE 16384
|
||||
|
||||
|
|
|
@ -105,16 +105,10 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar)
|
|||
if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) {
|
||||
int x = 0, y = 0;
|
||||
wm_get_cursor_position(win, &x, &y);
|
||||
pc->draw(C,
|
||||
x,
|
||||
y,
|
||||
pc->customdata);
|
||||
pc->draw(C, x, y, pc->customdata);
|
||||
}
|
||||
else {
|
||||
pc->draw(C,
|
||||
win->eventstate->x,
|
||||
win->eventstate->y,
|
||||
pc->customdata);
|
||||
pc->draw(C, win->eventstate->x, win->eventstate->y, pc->customdata);
|
||||
}
|
||||
|
||||
glScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
|
||||
|
@ -581,7 +575,7 @@ static void wm_draw_window_onscreen(bContext *C, wmWindow *win, int view)
|
|||
if (ar->visible && ar->overlap == false) {
|
||||
if (view == -1 && ar->draw_buffer && ar->draw_buffer->stereo) {
|
||||
/* Stereo drawing from textures. */
|
||||
if(win->stereo3d_format->display_mode == S3D_DISPLAY_ANAGLYPH) {
|
||||
if (win->stereo3d_format->display_mode == S3D_DISPLAY_ANAGLYPH) {
|
||||
wm_stereo3d_draw_anaglyph(win, ar);
|
||||
}
|
||||
else {
|
||||
|
@ -660,7 +654,7 @@ static void wm_draw_window(bContext *C, wmWindow *win)
|
|||
/* Regular mono drawing. */
|
||||
wm_draw_window_onscreen(C, win, -1);
|
||||
}
|
||||
else if(win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) {
|
||||
else if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) {
|
||||
/* For pageflip we simply draw to both back buffers. */
|
||||
glDrawBuffer(GL_BACK_LEFT);
|
||||
wm_draw_window_onscreen(C, win, 0);
|
||||
|
@ -668,7 +662,7 @@ static void wm_draw_window(bContext *C, wmWindow *win)
|
|||
wm_draw_window_onscreen(C, win, 1);
|
||||
glDrawBuffer(GL_BACK);
|
||||
}
|
||||
else if(ELEM(win->stereo3d_format->display_mode, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE)) {
|
||||
else if (ELEM(win->stereo3d_format->display_mode, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE)) {
|
||||
/* For anaglyph and interlace, we draw individual regions with
|
||||
* stereo framebuffers using different shaders. */
|
||||
wm_draw_window_onscreen(C, win, -1);
|
||||
|
|
|
@ -99,8 +99,8 @@ void wm_stereo3d_draw_interlace(wmWindow *win, ARegion *ar)
|
|||
}
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_INTERLACE);
|
||||
immUniform1i("image_a", (swap)? 1: 0);
|
||||
immUniform1i("image_b", (swap)? 0: 1);
|
||||
immUniform1i("image_a", (swap) ? 1 : 0);
|
||||
immUniform1i("image_b", (swap) ? 0 : 1);
|
||||
|
||||
immUniform1i("interlace_id", interlace_gpu_id_from_type(interlace_type));
|
||||
|
||||
|
|
Loading…
Reference in New Issue