Cleanup: style, duplicate includes

This commit is contained in:
Campbell Barton 2017-10-07 15:57:14 +11:00
parent 37b457221e
commit adfbf276a1
73 changed files with 227 additions and 234 deletions

@ -188,7 +188,7 @@ void BKE_scene_multiview_videos_dimensions_get(const struct RenderData *r
int BKE_scene_multiview_num_videos_get(const struct RenderData *rd); int BKE_scene_multiview_num_videos_get(const struct RenderData *rd);
/* depsgraph */ /* depsgraph */
struct Depsgraph* BKE_scene_get_depsgraph(struct Scene *scene, struct SceneLayer *scene_layer); struct Depsgraph *BKE_scene_get_depsgraph(struct Scene *scene, struct SceneLayer *scene_layer);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -301,9 +301,12 @@ void BKE_editmesh_loop_tangent_calc(
&calc_act, &calc_ren, &act_uv_n, &ren_uv_n, act_uv_name, ren_uv_name, &tangent_mask); &calc_act, &calc_ren, &act_uv_n, &ren_uv_n, act_uv_name, ren_uv_name, &tangent_mask);
if ((tangent_mask_curr | tangent_mask) != tangent_mask_curr) { if ((tangent_mask_curr | tangent_mask) != tangent_mask_curr) {
for (int i = 0; i < tangent_names_len; i++) for (int i = 0; i < tangent_names_len; i++) {
if (tangent_names[i][0]) if (tangent_names[i][0]) {
BKE_mesh_add_loop_tangent_named_layer_for_uv(&bm->ldata, loopdata_out, (int)loopdata_out_len, tangent_names[i]); BKE_mesh_add_loop_tangent_named_layer_for_uv(
&bm->ldata, loopdata_out, (int)loopdata_out_len, tangent_names[i]);
}
}
if ((tangent_mask & DM_TANGENT_MASK_ORCO) && CustomData_get_named_layer_index(loopdata_out, CD_TANGENT, "") == -1) if ((tangent_mask & DM_TANGENT_MASK_ORCO) && CustomData_get_named_layer_index(loopdata_out, CD_TANGENT, "") == -1)
CustomData_add_layer_named(loopdata_out, CD_TANGENT, CD_CALLOC, NULL, (int)loopdata_out_len, ""); CustomData_add_layer_named(loopdata_out, CD_TANGENT, CD_CALLOC, NULL, (int)loopdata_out_len, "");
if (calc_act && act_uv_name[0]) if (calc_act && act_uv_name[0])

@ -1420,7 +1420,7 @@ void BKE_collection_engine_property_add_float_array(
val.array.len = array_length; val.array.len = array_length;
val.array.type = IDP_FLOAT; val.array.type = IDP_FLOAT;
IDProperty *idprop= IDP_New(IDP_ARRAY, &val, name); IDProperty *idprop = IDP_New(IDP_ARRAY, &val, name);
memcpy(IDP_Array(idprop), values, sizeof(float) * idprop->len); memcpy(IDP_Array(idprop), values, sizeof(float) * idprop->len);
IDP_AddToGroup(props, idprop); IDP_AddToGroup(props, idprop);
} }

@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
/** \file blender/blenkernel/intern/probe.c /** \file blender/blenkernel/intern/lightprobe.c
* \ingroup bke * \ingroup bke
*/ */

@ -230,8 +230,6 @@ typedef struct {
} SGLSLMeshToTangent; } SGLSLMeshToTangent;
/* interface */ /* interface */
#include "mikktspace.h"
static int dm_ts_GetNumFaces(const SMikkTSpaceContext *pContext) static int dm_ts_GetNumFaces(const SMikkTSpaceContext *pContext)
{ {
SGLSLMeshToTangent *pMesh = pContext->m_pUserData; SGLSLMeshToTangent *pMesh = pContext->m_pUserData;

@ -169,7 +169,8 @@ static void scene_collection_copy(SceneCollection *sc_dst, SceneCollection *sc_s
BLI_duplicatelist(&sc_dst->scene_collections, &sc_src->scene_collections); BLI_duplicatelist(&sc_dst->scene_collections, &sc_src->scene_collections);
for (SceneCollection *nsc_src = sc_src->scene_collections.first, *nsc_dst = sc_dst->scene_collections.first; for (SceneCollection *nsc_src = sc_src->scene_collections.first, *nsc_dst = sc_dst->scene_collections.first;
nsc_src; nsc_src;
nsc_src = nsc_src->next, nsc_dst = nsc_dst->next) { nsc_src = nsc_src->next, nsc_dst = nsc_dst->next)
{
scene_collection_copy(nsc_dst, nsc_src, flag); scene_collection_copy(nsc_dst, nsc_src, flag);
} }
} }
@ -2330,7 +2331,7 @@ int BKE_scene_multiview_num_videos_get(const RenderData *rd)
} }
} }
Depsgraph* BKE_scene_get_depsgraph(Scene *scene, SceneLayer *scene_layer) Depsgraph *BKE_scene_get_depsgraph(Scene *scene, SceneLayer *scene_layer)
{ {
(void) scene_layer; (void) scene_layer;
return scene->depsgraph_legacy; return scene->depsgraph_legacy;

@ -117,11 +117,11 @@ static void *workspace_relation_get_data_matching_parent(
* Hence, this should only be used as assert check before assigining a screen to a workspace. * Hence, this should only be used as assert check before assigining a screen to a workspace.
*/ */
#ifndef NDEBUG #ifndef NDEBUG
static bool workspaces_is_screen_used( static bool workspaces_is_screen_used
#else #else
static bool UNUSED_FUNCTION(workspaces_is_screen_used)( static bool UNUSED_FUNCTION(workspaces_is_screen_used)
#endif #endif
const Main *bmain, bScreen *screen) (const Main *bmain, bScreen *screen)
{ {
for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) { for (WorkSpace *workspace = bmain->workspaces.first; workspace; workspace = workspace->id.next) {
if (workspace_layout_find_exec(workspace, screen)) { if (workspace_layout_find_exec(workspace, screen)) {

@ -195,7 +195,7 @@ void normalize_m3_m3(float R[3][3], const float A[3][3]) ATTR_NONNULL();
void normalize_m4_ex(float R[4][4], float r_scale[3]) ATTR_NONNULL(); void normalize_m4_ex(float R[4][4], float r_scale[3]) ATTR_NONNULL();
void normalize_m4(float R[4][4]) ATTR_NONNULL(); void normalize_m4(float R[4][4]) ATTR_NONNULL();
void normalize_m4_m4_ex(float R[4][4], const float A[4][4], float r_scale[3]) ATTR_NONNULL(); void normalize_m4_m4_ex(float R[4][4], const float A[4][4], float r_scale[3]) ATTR_NONNULL();
void normalize_m4_m4(float R[4][4],const float A[4][4]) ATTR_NONNULL(); void normalize_m4_m4(float R[4][4], const float A[4][4]) ATTR_NONNULL();
void orthogonalize_m3(float R[3][3], int axis); void orthogonalize_m3(float R[3][3], int axis);
void orthogonalize_m4(float R[4][4], int axis); void orthogonalize_m4(float R[4][4], int axis);

@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
/** \file blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc /** \file blender/depsgraph/intern/builder/deg_builder_nodes_layer.cc
* \ingroup depsgraph * \ingroup depsgraph
* *
* Methods for constructing depsgraph's nodes * Methods for constructing depsgraph's nodes

@ -1413,7 +1413,8 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
} }
else if ((psys->flag & PSYS_HAIR_DYNAMICS) && else if ((psys->flag & PSYS_HAIR_DYNAMICS) &&
psys->clmd != NULL && psys->clmd != NULL &&
psys->clmd->coll_parms != NULL) { psys->clmd->coll_parms != NULL)
{
add_collision_relations(psys_key, add_collision_relations(psys_key,
scene, scene,
ob, ob,

@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
/** \file blender/depsgraph/intern/builder/deg_builder_relations_scene.cc /** \file blender/depsgraph/intern/builder/deg_builder_relations_layer.cc
* \ingroup depsgraph * \ingroup depsgraph
* *
* Methods for constructing depsgraph * Methods for constructing depsgraph

@ -88,7 +88,7 @@ static const int deg_debug_node_type_color_map[][2] = {
{DEG_NODE_TYPE_GEOMETRY, 6}, {DEG_NODE_TYPE_GEOMETRY, 6},
{DEG_NODE_TYPE_SEQUENCER, 7}, {DEG_NODE_TYPE_SEQUENCER, 7},
{DEG_NODE_TYPE_SHADING, 8}, {DEG_NODE_TYPE_SHADING, 8},
{DEG_NODE_TYPE_SHADING_PARAMETERS,9}, {DEG_NODE_TYPE_SHADING_PARAMETERS, 9},
{DEG_NODE_TYPE_CACHE, 10}, {DEG_NODE_TYPE_CACHE, 10},
{DEG_NODE_TYPE_LAYER_COLLECTIONS, 11}, {DEG_NODE_TYPE_LAYER_COLLECTIONS, 11},
{DEG_NODE_TYPE_COPY_ON_WRITE, 12}, {DEG_NODE_TYPE_COPY_ON_WRITE, 12},

@ -296,7 +296,8 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, bool do_tag, ID *id_cow_hint)
* referencing to. * referencing to.
*/ */
BLI_ghash_insert(id_hash, id, id_node); BLI_ghash_insert(id_hash, id, id_node);
} else if (do_tag) { }
else if (do_tag) {
id->tag |= LIB_TAG_DOIT; id->tag |= LIB_TAG_DOIT;
} }
return id_node; return id_node;

@ -225,9 +225,8 @@ void DEG_objects_iterator_next(BLI_Iterator *iter)
BLI_assert(!BLI_listbase_is_empty(&base->collection_properties->data.group)); BLI_assert(!BLI_listbase_is_empty(&base->collection_properties->data.group));
/* Flushing depsgraph data. */ /* Flushing depsgraph data. */
deg_flush_base_flags_and_settings(ob, deg_flush_base_flags_and_settings(
base, ob, base, data->base_flag);
data->base_flag);
if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (ob->transflag & OB_DUPLI)) { if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (ob->transflag & OB_DUPLI)) {
data->dupli_parent = ob; data->dupli_parent = ob;

@ -25,7 +25,7 @@
*/ */
/** \file blender/depsgraph/intern/eval/deg_eval_copy_on_write.h /** \file blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
* \ingroup depsgraph * \ingroup depsgraph
*/ */
@ -65,9 +65,7 @@ extern "C" {
# include "DNA_lamp_types.h" # include "DNA_lamp_types.h"
# include "DNA_linestyle_types.h" # include "DNA_linestyle_types.h"
# include "DNA_material_types.h" # include "DNA_material_types.h"
# include "DNA_mesh_types.h"
# include "DNA_node_types.h" # include "DNA_node_types.h"
# include "DNA_scene_types.h"
# include "DNA_texture_types.h" # include "DNA_texture_types.h"
# include "DNA_world_types.h" # include "DNA_world_types.h"
#endif #endif

@ -19,7 +19,7 @@
* *
*/ */
/** \file basic_engine.h /** \file basic_engine.c
* \ingroup draw_engine * \ingroup draw_engine
* *
* Simple engine for drawing color and/or depth. * Simple engine for drawing color and/or depth.

@ -1189,7 +1189,7 @@ void EEVEE_effects_cache_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata)
/* This create an empty batch of N triangles to be positioned /* This create an empty batch of N triangles to be positioned
* by the vertex shader 0.4ms against 6ms with instancing */ * by the vertex shader 0.4ms against 6ms with instancing */
const float *viewport_size = DRW_viewport_size_get(); const float *viewport_size = DRW_viewport_size_get();
const int sprite_ct = ((int)viewport_size[0]/2) * ((int)viewport_size[1]/2); /* brackets matters */ const int sprite_ct = ((int)viewport_size[0] / 2) * ((int)viewport_size[1] / 2); /* brackets matters */
grp = DRW_shgroup_empty_tri_batch_create(e_data.dof_scatter_sh, psl->dof_scatter, sprite_ct); grp = DRW_shgroup_empty_tri_batch_create(e_data.dof_scatter_sh, psl->dof_scatter, sprite_ct);
DRW_shgroup_uniform_buffer(grp, "colorBuffer", &effects->unf_source_buffer); DRW_shgroup_uniform_buffer(grp, "colorBuffer", &effects->unf_source_buffer);
@ -1577,7 +1577,7 @@ void EEVEE_draw_effects(EEVEE_Data *vedata)
last = txl->bloom_downsample[0]; last = txl->bloom_downsample[0];
for (int i = 1; i < effects->bloom_iteration_ct; ++i) { for (int i = 1; i < effects->bloom_iteration_ct; ++i) {
copy_v2_v2(effects->unf_source_texel_size, effects->downsamp_texel_size[i-1]); copy_v2_v2(effects->unf_source_texel_size, effects->downsamp_texel_size[i - 1]);
effects->unf_source_buffer = last; effects->unf_source_buffer = last;
DRW_framebuffer_bind(fbl->bloom_down_fb[i]); DRW_framebuffer_bind(fbl->bloom_down_fb[i]);

@ -19,7 +19,7 @@
* *
*/ */
/** \file eevee_lights.c /** \file eevee_lightprobes.c
* \ingroup DNA * \ingroup DNA
*/ */
@ -36,8 +36,6 @@
#include "ED_screen.h" #include "ED_screen.h"
#include "DRW_render.h"
#include "GPU_material.h" #include "GPU_material.h"
#include "GPU_texture.h" #include "GPU_texture.h"
#include "GPU_glew.h" #include "GPU_glew.h"

@ -463,12 +463,12 @@ static void eevee_light_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE_LampEngi
/* Make illumination power constant */ /* Make illumination power constant */
if (la->type == LA_AREA) { if (la->type == LA_AREA) {
power = 1.0f / (evli->sizex * evli->sizey * 4.0f * M_PI) /* 1/(w*h*Pi) */ power = 1.0f / (evli->sizex * evli->sizey * 4.0f * M_PI) * /* 1/(w*h*Pi) */
* 80.0f; /* XXX : Empirical, Fit cycles power */ 80.0f; /* XXX : Empirical, Fit cycles power */
} }
else if (la->type == LA_SPOT || la->type == LA_LOCAL) { else if (la->type == LA_SPOT || la->type == LA_LOCAL) {
power = 1.0f / (4.0f * evli->radius * evli->radius * M_PI * M_PI) /* 1/(4*r²*Pi²) */ power = 1.0f / (4.0f * evli->radius * evli->radius * M_PI * M_PI) * /* 1/(4*r²*Pi²) */
* M_PI * M_PI * M_PI * 10.0; /* XXX : Empirical, Fit cycles power */ M_PI * M_PI * M_PI * 10.0; /* XXX : Empirical, Fit cycles power */
/* for point lights (a.k.a radius == 0.0) */ /* for point lights (a.k.a radius == 0.0) */
// power = M_PI * M_PI * 0.78; /* XXX : Empirical, Fit cycles power */ // power = M_PI * M_PI * 0.78; /* XXX : Empirical, Fit cycles power */
@ -542,7 +542,7 @@ static void frustum_min_bounding_sphere(const float corners[8][4], float r_cente
/* Search the largest distance between the sphere center /* Search the largest distance between the sphere center
* and the front plane corners. */ * and the front plane corners. */
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
float rad = len_v3v3(corners[4+i], r_center); float rad = len_v3v3(corners[4 + i], r_center);
if (rad > *r_radius) { if (rad > *r_radius) {
*r_radius = rad; *r_radius = rad;
} }
@ -648,11 +648,11 @@ static void eevee_shadow_cascade_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE
else { else {
cascade_data->split_start[c] = linear_split; cascade_data->split_start[c] = linear_split;
} }
cascade_data->split_end[c-1] = cascade_data->split_start[c]; cascade_data->split_end[c - 1] = cascade_data->split_start[c];
/* Add some overlap for smooth transition */ /* Add some overlap for smooth transition */
cascade_data->split_start[c] = LERP(la->cascade_fade, cascade_data->split_end[c-1], cascade_data->split_start[c] = LERP(la->cascade_fade, cascade_data->split_end[c - 1],
(c > 1) ? cascade_data->split_end[c-2] : cascade_data->split_start[0]); (c > 1) ? cascade_data->split_end[c - 2] : cascade_data->split_start[0]);
/* NDC Space */ /* NDC Space */
{ {
@ -667,20 +667,20 @@ static void eevee_shadow_cascade_setup(Object *ob, EEVEE_LampsInfo *linfo, EEVEE
} }
{ {
float p[4] = {1.0f, 1.0f, cascade_data->split_end[c-1], 1.0f}; float p[4] = {1.0f, 1.0f, cascade_data->split_end[c - 1], 1.0f};
/* TODO: we don't need full m4 multiply here */ /* TODO: we don't need full m4 multiply here */
mul_m4_v4(viewprojmat, p); mul_m4_v4(viewprojmat, p);
splits_end_ndc[c-1] = p[2]; splits_end_ndc[c - 1] = p[2];
if (is_persp) { if (is_persp) {
splits_end_ndc[c-1] /= p[3]; splits_end_ndc[c - 1] /= p[3];
} }
} }
} }
/* Set last cascade split fade distance into the first split_start. */ /* Set last cascade split fade distance into the first split_start. */
float prev_split = (cascade_nbr > 1) ? cascade_data->split_end[cascade_nbr-2] : cascade_data->split_start[0]; float prev_split = (cascade_nbr > 1) ? cascade_data->split_end[cascade_nbr - 2] : cascade_data->split_start[0];
cascade_data->split_start[0] = LERP(la->cascade_fade, cascade_data->split_end[cascade_nbr-1], prev_split); cascade_data->split_start[0] = LERP(la->cascade_fade, cascade_data->split_end[cascade_nbr - 1], prev_split);
/* For each cascade */ /* For each cascade */
for (int c = 0; c < cascade_nbr; ++c) { for (int c = 0; c < cascade_nbr; ++c) {

@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
/** \file eeveee_lut.h /** \file eevee_lut.h
* \ingroup gpu * \ingroup gpu
*/ */

@ -233,7 +233,7 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h)
DRW_framebuffer_read_data(0, 0, w, h, 3, 0, data); DRW_framebuffer_read_data(0, 0, w, h, 3, 0, data);
#if 1 #if 1
fprintf(f, "\t{\n\t\t"); fprintf(f, "\t{\n\t\t");
for (int i = 0; i < w*h * 3; i+=3) { for (int i = 0; i < w*h * 3; i+=3) {
fprintf(f, "%ff,", data[i]); fprintf(f, "%ff,", data[i]);
@ -241,7 +241,7 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h)
else fprintf(f, " "); else fprintf(f, " ");
} }
fprintf(f, "\n\t},\n"); fprintf(f, "\n\t},\n");
#else #else
for (int i = 0; i < w*h * 3; i+=3) { for (int i = 0; i < w*h * 3; i+=3) {
if (data[i] < 0.01) printf(" "); if (data[i] < 0.01) printf(" ");
else if (data[i] < 0.3) printf("."); else if (data[i] < 0.3) printf(".");
@ -250,7 +250,7 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h)
else printf("#"); else printf("#");
if ((i/3+1) % 64 == 0) printf("\n"); if ((i/3+1) % 64 == 0) printf("\n");
} }
#endif #endif
} while (roughness < 1.0f); } while (roughness < 1.0f);
fprintf(f, "\n};\n"); fprintf(f, "\n};\n");
@ -445,8 +445,8 @@ void EEVEE_update_util_texture(float offset)
/* Copy bsdf_split_sum_ggx into 2nd layer red and green channels. /* Copy bsdf_split_sum_ggx into 2nd layer red and green channels.
Copy ltc_mag_ggx into 2nd layer blue channel. */ Copy ltc_mag_ggx into 2nd layer blue channel. */
for (int i = 0; i < 64 * 64; i++) { for (int i = 0; i < 64 * 64; i++) {
texels_layer[i][0] = bsdf_split_sum_ggx[i*2 + 0]; texels_layer[i][0] = bsdf_split_sum_ggx[i * 2 + 0];
texels_layer[i][1] = bsdf_split_sum_ggx[i*2 + 1]; texels_layer[i][1] = bsdf_split_sum_ggx[i * 2 + 1];
texels_layer[i][2] = ltc_mag_ggx[i]; texels_layer[i][2] = ltc_mag_ggx[i];
} }
texels_layer += 64 * 64; texels_layer += 64 * 64;
@ -467,10 +467,10 @@ void EEVEE_update_util_texture(float offset)
/* Copy Refraction GGX LUT in layer 4 - 20 */ /* Copy Refraction GGX LUT in layer 4 - 20 */
for (int j = 0; j < 16; ++j) { for (int j = 0; j < 16; ++j) {
for (int i = 0; i < 64 * 64; i++) { for (int i = 0; i < 64 * 64; i++) {
texels_layer[i][0] = btdf_split_sum_ggx[j*2][i]; texels_layer[i][0] = btdf_split_sum_ggx[j * 2][i];
texels_layer[i][1] = btdf_split_sum_ggx[j*2][i]; texels_layer[i][1] = btdf_split_sum_ggx[j * 2][i];
texels_layer[i][2] = btdf_split_sum_ggx[j*2][i]; texels_layer[i][2] = btdf_split_sum_ggx[j * 2][i];
texels_layer[i][3] = btdf_split_sum_ggx[j*2][i]; texels_layer[i][3] = btdf_split_sum_ggx[j * 2][i];
} }
texels_layer += 64 * 64; texels_layer += 64 * 64;
} }
@ -933,7 +933,7 @@ void EEVEE_materials_cache_init(EEVEE_Data *vedata)
} \ } \
} while (0) } while (0)
typedef struct EeveeMaterialShadingGroups{ typedef struct EeveeMaterialShadingGroups {
struct DRWShadingGroup *shading_grp; struct DRWShadingGroup *shading_grp;
struct DRWShadingGroup *depth_grp; struct DRWShadingGroup *depth_grp;
struct DRWShadingGroup *depth_clip_grp; struct DRWShadingGroup *depth_clip_grp;

@ -159,7 +159,7 @@ typedef struct EEVEE_FramebufferList {
struct GPUFrameBuffer *effect_fb; struct GPUFrameBuffer *effect_fb;
struct GPUFrameBuffer *bloom_blit_fb; struct GPUFrameBuffer *bloom_blit_fb;
struct GPUFrameBuffer *bloom_down_fb[MAX_BLOOM_STEP]; struct GPUFrameBuffer *bloom_down_fb[MAX_BLOOM_STEP];
struct GPUFrameBuffer *bloom_accum_fb[MAX_BLOOM_STEP-1]; struct GPUFrameBuffer *bloom_accum_fb[MAX_BLOOM_STEP - 1];
struct GPUFrameBuffer *dof_down_fb; struct GPUFrameBuffer *dof_down_fb;
struct GPUFrameBuffer *dof_scatter_far_fb; struct GPUFrameBuffer *dof_scatter_far_fb;
struct GPUFrameBuffer *dof_scatter_near_fb; struct GPUFrameBuffer *dof_scatter_near_fb;
@ -184,7 +184,7 @@ typedef struct EEVEE_TextureList {
struct GPUTexture *dof_far_blur; /* R16_G16_B16_A16 */ struct GPUTexture *dof_far_blur; /* R16_G16_B16_A16 */
struct GPUTexture *bloom_blit; /* R16_G16_B16 */ struct GPUTexture *bloom_blit; /* R16_G16_B16 */
struct GPUTexture *bloom_downsample[MAX_BLOOM_STEP]; /* R16_G16_B16 */ struct GPUTexture *bloom_downsample[MAX_BLOOM_STEP]; /* R16_G16_B16 */
struct GPUTexture *bloom_upsample[MAX_BLOOM_STEP-1]; /* R16_G16_B16 */ struct GPUTexture *bloom_upsample[MAX_BLOOM_STEP - 1]; /* R16_G16_B16 */
struct GPUTexture *ssr_normal_input; struct GPUTexture *ssr_normal_input;
struct GPUTexture *ssr_specrough_input; struct GPUTexture *ssr_specrough_input;
struct GPUTexture *refract_color; struct GPUTexture *refract_color;

@ -19,7 +19,7 @@
* *
*/ */
/** \file external_engine.h /** \file external_engine.c
* \ingroup draw_engine * \ingroup draw_engine
* *
* Base engine for external render engines. * Base engine for external render engines.

@ -391,7 +391,7 @@ Gwn_Batch *DRW_cache_square_get(void)
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2, p[i % 4]); GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2, p[i % 4]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2 + 1, p[(i+1) % 4]); GWN_vertbuf_attr_set(vbo, attr_id.pos, i * 2 + 1, p[(i + 1) % 4]);
} }
SHC.drw_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO); SHC.drw_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO);
@ -1196,8 +1196,8 @@ Gwn_Batch *DRW_cache_lamp_spot_get(void)
GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4, n[(i) % NSEGMENTS]); GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4, n[(i) % NSEGMENTS]);
GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4 + 1, n[(i) % NSEGMENTS]); GWN_vertbuf_attr_set(vbo, attr_id.n1, i * 4 + 1, n[(i) % NSEGMENTS]);
GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4, n[(i+1) % NSEGMENTS]); GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4, n[(i + 1) % NSEGMENTS]);
GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 1, n[(i+1) % NSEGMENTS]); GWN_vertbuf_attr_set(vbo, attr_id.n2, i * 4 + 1, n[(i + 1) % NSEGMENTS]);
/* end ring */ /* end ring */
v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f; v[0] = cv[0], v[1] = cv[1], v[2] = -1.0f;
@ -1245,8 +1245,8 @@ Gwn_Batch *DRW_cache_lamp_spot_square_get(void)
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[0]); GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[0]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[i]); GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[i]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[(i % 4)+1]); GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[(i % 4) + 1]);
GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[((i+1) % 4)+1]); GWN_vertbuf_attr_set(vbo, attr_id.pos, v_idx++, p[((i + 1) % 4) + 1]);
} }
SHC.drw_lamp_spot_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO); SHC.drw_lamp_spot_square = GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO);
@ -1782,10 +1782,10 @@ Gwn_Batch *DRW_cache_bone_envelope_solid_get(void)
float co1[3], co2[3], co3[3], co4[3]; float co1[3], co2[3], co3[3], co4[3];
for (int j = 0; j < lat_res; j++, lat += lat_inc) { for (int j = 0; j < lat_res; j++, lat += lat_inc) {
benv_lat_lon_to_co(lat , lon , co1); benv_lat_lon_to_co(lat, lon, co1);
benv_lat_lon_to_co(lat , lon + lon_inc, co2); benv_lat_lon_to_co(lat, lon + lon_inc, co2);
benv_lat_lon_to_co(lat + lat_inc, lon + lon_inc, co3); benv_lat_lon_to_co(lat + lat_inc, lon + lon_inc, co3);
benv_lat_lon_to_co(lat + lat_inc, lon , co4); benv_lat_lon_to_co(lat + lat_inc, lon, co4);
if (j != 0) { /* At pole, n1 and n2 are identical. */ if (j != 0) { /* At pole, n1 and n2 are identical. */
benv_add_tri(vbo, attr_id.pos, &v_idx, co1, co2, co3); benv_add_tri(vbo, attr_id.pos, &v_idx, co1, co2, co3);

@ -3107,7 +3107,7 @@ static Gwn_VertBuf *mesh_create_edge_pos_with_sel(
const int edge_len = mesh_render_data_edges_len_get(rdata); const int edge_len = mesh_render_data_edges_len_get(rdata);
vbo= GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
const int vbo_len_capacity = edge_len * 2; const int vbo_len_capacity = edge_len * 2;
int vbo_len_used = 0; int vbo_len_used = 0;

@ -85,7 +85,7 @@ void DRW_stats_begin(void)
DTP.timer_count = DTP.chunk_count * CHUNK_SIZE; DTP.timer_count = DTP.chunk_count * CHUNK_SIZE;
DTP.timers = MEM_callocN(sizeof(DRWTimer) * DTP.timer_count, "DRWTimer stack"); DTP.timers = MEM_callocN(sizeof(DRWTimer) * DTP.timer_count, "DRWTimer stack");
} }
else if(!DTP.is_recording && DTP.timers != NULL) { else if (!DTP.is_recording && DTP.timers != NULL) {
DRW_stats_free(); DRW_stats_free();
} }

@ -48,7 +48,6 @@
#include "BKE_image.h" #include "BKE_image.h"
#include "BKE_texture.h" #include "BKE_texture.h"
#include "ED_view3d.h"
#include "ED_view3d.h" #include "ED_view3d.h"
#include "GPU_shader.h" #include "GPU_shader.h"
@ -119,7 +118,7 @@ typedef struct OBJECT_Data {
/* *********** STATIC *********** */ /* *********** STATIC *********** */
typedef struct OBJECT_PrivateData{ typedef struct OBJECT_PrivateData {
/* Empties */ /* Empties */
DRWShadingGroup *plain_axes; DRWShadingGroup *plain_axes;
DRWShadingGroup *cube; DRWShadingGroup *cube;
@ -487,7 +486,8 @@ static void OBJECT_engine_init(void *vedata)
/* Persp : If camera is below floor plane, we switch clipping /* Persp : If camera is below floor plane, we switch clipping
* Ortho : If eye vector is looking up, we switch clipping */ * Ortho : If eye vector is looking up, we switch clipping */
if (((winmat[3][3] == 0.0f) && (e_data.camera_pos[2] > 0.0f)) || if (((winmat[3][3] == 0.0f) && (e_data.camera_pos[2] > 0.0f)) ||
((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f))) { ((winmat[3][3] != 0.0f) && (zvec[2] < 0.0f)))
{
e_data.zpos_flag |= CLIP_ZPOS; e_data.zpos_flag |= CLIP_ZPOS;
e_data.zneg_flag |= CLIP_ZNEG; e_data.zneg_flag |= CLIP_ZNEG;
} }

@ -1650,7 +1650,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, const rcti
immUniformColor3ubv((unsigned char *)wcol->item); immUniformColor3ubv((unsigned char *)wcol->item);
glEnable(GL_LINE_SMOOTH); glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND); glEnable(GL_BLEND);
immBegin(GWN_PRIM_LINE_STRIP, (CM_TABLE+1) + 2); immBegin(GWN_PRIM_LINE_STRIP, (CM_TABLE + 1) + 2);
if (cuma->table == NULL) if (cuma->table == NULL)
curvemapping_changed(cumap, false); curvemapping_changed(cumap, false);
@ -1812,14 +1812,14 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc
UI_GetThemeColor4fv(TH_MARKER_OUTLINE, col_outline); UI_GetThemeColor4fv(TH_MARKER_OUTLINE, col_outline);
/* Do stipple cross with geometry */ /* Do stipple cross with geometry */
immBegin(GWN_PRIM_LINES, 7*2*2); immBegin(GWN_PRIM_LINES, 7 * 2 * 2);
float pos_sel[8] = {-10.0f, -7.0f, -4.0f, -1.0f, 2.0f, 5.0f, 8.0f, 11.0f}; float pos_sel[8] = {-10.0f, -7.0f, -4.0f, -1.0f, 2.0f, 5.0f, 8.0f, 11.0f};
for (int axe = 0; axe < 2; ++axe) { for (int axe = 0; axe < 2; ++axe) {
for (int i = 0; i < 7; ++i) { for (int i = 0; i < 7; ++i) {
float x1 = pos_sel[i] * (1 - axe); float x1 = pos_sel[i] * (1 - axe);
float y1 = pos_sel[i] * axe; float y1 = pos_sel[i] * axe;
float x2 = pos_sel[i+1] * (1 - axe); float x2 = pos_sel[i + 1] * (1 - axe);
float y2 = pos_sel[i+1] * axe; float y2 = pos_sel[i + 1] * axe;
if (i % 2 == 1) if (i % 2 == 1)
immAttrib4fv(col, col_sel); immAttrib4fv(col, col_sel);

@ -121,7 +121,7 @@ static void template_add_button_search_menu(
/* Ugly exception for screens here, drawing their preview in icon size looks ugly/useless */ /* Ugly exception for screens here, drawing their preview in icon size looks ugly/useless */
const bool use_preview_icon = use_big_size || (id && (GS(id->name) != ID_SCR)); const bool use_preview_icon = use_big_size || (id && (GS(id->name) != ID_SCR));
const short width = UI_UNIT_X * (use_big_size ? 6 : 1.6f); const short width = UI_UNIT_X * (use_big_size ? 6 : 1.6f);
const short height = UI_UNIT_Y * (use_big_size ? 6: 1); const short height = UI_UNIT_Y * (use_big_size ? 6 : 1);
but = uiDefBlockButN(block, block_func, block_argN, "", 0, 0, width, height, tip); but = uiDefBlockButN(block, block_func, block_argN, "", 0, 0, width, height, tip);
if (use_preview_icon) { if (use_preview_icon) {

@ -1565,7 +1565,7 @@ void UI_view2d_multi_grid_draw(View2D *v2d, int colorid, float step, int level_s
} }
/* X and Y axis */ /* X and Y axis */
UI_GetThemeColorShade3ubv(colorid, -18 + ((totlevels - 1) * -6) , grid_line_color); UI_GetThemeColorShade3ubv(colorid, -18 + ((totlevels - 1) * -6), grid_line_color);
immSkipAttrib(color); immSkipAttrib(color);
immVertex2f(pos, 0.0f, v2d->cur.ymin); immVertex2f(pos, 0.0f, v2d->cur.ymin);

@ -146,7 +146,7 @@ static void object_fmap_swap_object_mode(Object *ob, int num1, int num2)
if (num1 != -1) { if (num1 != -1) {
if (map[i] == num1) if (map[i] == num1)
map[i] = num2; map[i] = num2;
else if (map[i]== num2) else if (map[i] == num2)
map[i] = num1; map[i] = num1;
} }
} }

@ -400,7 +400,7 @@ static void file_draw_preview(
/* border */ /* border */
if (use_dropshadow) { if (use_dropshadow) {
Gwn_VertFormat *format = immVertexFormat(); Gwn_VertFormat *format = immVertexFormat();
unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2,GWN_FETCH_FLOAT); unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f); immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f);

@ -49,8 +49,6 @@
#include "ED_node.h" #include "ED_node.h"
#include "ED_render.h" #include "ED_render.h"
#include "ED_screen.h" #include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_resources.h" #include "UI_resources.h"
#include "UI_view2d.h" #include "UI_view2d.h"
@ -58,6 +56,7 @@
#include "RNA_access.h" #include "RNA_access.h"
#include "WM_api.h" #include "WM_api.h"
#include "WM_types.h"
#include "node_intern.h" /* own include */ #include "node_intern.h" /* own include */

@ -333,9 +333,7 @@ static void time_draw_idblock_keyframes(View2D *v2d, ID *id, short onlysel, cons
immBeginAtMost(GWN_PRIM_LINES, max_len * 2); immBeginAtMost(GWN_PRIM_LINES, max_len * 2);
for (; (ak) && (ak->cfra <= v2d->cur.xmax); for (; (ak) && (ak->cfra <= v2d->cur.xmax); ak = ak->next) {
ak = ak->next)
{
immVertex2f(pos, ak->cfra, ymin); immVertex2f(pos, ak->cfra, ymin);
immVertex2f(pos, ak->cfra, ymax); immVertex2f(pos, ak->cfra, ymax);
} }

@ -439,7 +439,7 @@ static void drawcube_size(float xsize, float ysize, float zsize)
/* Elements */ /* Elements */
GWN_indexbuf_init(&elb, GWN_PRIM_LINES, 12, 8); GWN_indexbuf_init(&elb, GWN_PRIM_LINES, 12, 8);
for (int i = 0; i < 12; ++i) { for (int i = 0; i < 12; ++i) {
GWN_indexbuf_add_line_verts(&elb, cube_wire[i*2], cube_wire[i*2+1]); GWN_indexbuf_add_line_verts(&elb, cube_wire[i * 2], cube_wire[i * 2 + 1]);
} }
GWN_indexbuf_build_in_place(&elb, &el); GWN_indexbuf_build_in_place(&elb, &el);
@ -591,7 +591,7 @@ static void draw_bone_octahedral(void)
/* Elements */ /* Elements */
GWN_indexbuf_init(&elb, GWN_PRIM_LINES, 12, 6); GWN_indexbuf_init(&elb, GWN_PRIM_LINES, 12, 6);
for (int i = 0; i < 12; ++i) { for (int i = 0; i < 12; ++i) {
GWN_indexbuf_add_line_verts(&elb, bone_octahedral_wire[i*2], bone_octahedral_wire[i*2+1]); GWN_indexbuf_add_line_verts(&elb, bone_octahedral_wire[i * 2], bone_octahedral_wire[i * 2 + 1]);
} }
GWN_indexbuf_build_in_place(&elb, &el); GWN_indexbuf_build_in_place(&elb, &el);
@ -938,7 +938,7 @@ static void draw_sphere_bone_wire(float smat[4][4], float imat[4][4],
/* base */ /* base */
if (armflag & ARM_EDITMODE) { if (armflag & ARM_EDITMODE) {
if (boneflag & BONE_SELECTED){ if (boneflag & BONE_SELECTED) {
UI_GetThemeColor4fv(TH_SELECT, fcolor); UI_GetThemeColor4fv(TH_SELECT, fcolor);
} }
else { else {
@ -1738,7 +1738,7 @@ static void imm_sphere_project(unsigned int pos, float ax, float az)
static void draw_dof_ellipse(unsigned int pos, float ax, float az) static void draw_dof_ellipse(unsigned int pos, float ax, float az)
{ {
const int n = 16; const int n = 16;
const int tri = n*n - 2*n + 1; /* Yay fancy math ! */ const int tri = n * n - 2 * n + 1; /* Yay fancy math ! */
const float staticSine[16] = { const float staticSine[16] = {
0.0f, 0.104528463268f, 0.207911690818f, 0.309016994375f, 0.0f, 0.104528463268f, 0.207911690818f, 0.309016994375f,
0.406736643076f, 0.5f, 0.587785252292f, 0.669130606359f, 0.406736643076f, 0.5f, 0.587785252292f, 0.669130606359f,
@ -1755,7 +1755,7 @@ static void draw_dof_ellipse(unsigned int pos, float ax, float az)
immUniformColor4ub(70, 70, 70, 50); immUniformColor4ub(70, 70, 70, 50);
immBegin(GWN_PRIM_TRIS, tri*3); immBegin(GWN_PRIM_TRIS, tri * 3);
pz = 0.0f; pz = 0.0f;
for (i = 1; i < n; i++) { for (i = 1; i < n; i++) {
z = staticSine[i]; z = staticSine[i];
@ -2245,8 +2245,11 @@ static void draw_pose_bones(
if (arm->flag & ARM_POSEMODE) { if (arm->flag & ARM_POSEMODE) {
if (constflag & PCHAN_HAS_IK) { if (constflag & PCHAN_HAS_IK) {
if (bone->flag & BONE_SELECTED) { if (bone->flag & BONE_SELECTED) {
if (constflag & PCHAN_HAS_TARGET) rgba_float_args_set(fcolor, 200.f/255.f, 120.f/255.f, 0.f/255.f, 1.0f); if (constflag & PCHAN_HAS_TARGET) {
else rgba_float_args_set(fcolor, 200.f/255.f, 200.f/255.f, 50.f/255.f, 1.0f); /* add theme! */ rgba_float_args_set(fcolor, 200.f / 255.f, 120.f / 255.f, 0.f / 255.f, 1.0f);
}
/* add theme! */
else rgba_float_args_set(fcolor, 200.f / 255.f, 200.f / 255.f, 50.f / 255.f, 1.0f);
GPU_select_load_id(index & 0xFFFF); GPU_select_load_id(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & DASH_HELP_LINES)); pchan_draw_IK_root_lines(pchan, !(do_dashed & DASH_HELP_LINES));
@ -2254,7 +2257,8 @@ static void draw_pose_bones(
} }
else if (constflag & PCHAN_HAS_SPLINEIK) { else if (constflag & PCHAN_HAS_SPLINEIK) {
if (bone->flag & BONE_SELECTED) { if (bone->flag & BONE_SELECTED) {
rgba_float_args_set(fcolor, 150.f/255.f, 200.f/255.f, 50.f/255.f, 1.0f); /* add theme! */ /* add theme! */
rgba_float_args_set(fcolor, 150.f / 255.f, 200.f / 255.f, 50.f / 255.f, 1.0f);
GPU_select_load_id(index & 0xFFFF); GPU_select_load_id(index & 0xFFFF);
pchan_draw_IK_root_lines(pchan, !(do_dashed & DASH_HELP_LINES)); pchan_draw_IK_root_lines(pchan, !(do_dashed & DASH_HELP_LINES));

@ -64,13 +64,11 @@
#include "DRW_engine.h" #include "DRW_engine.h"
#include "ED_keyframing.h"
#include "ED_armature.h" #include "ED_armature.h"
#include "ED_keyframing.h" #include "ED_keyframing.h"
#include "ED_gpencil.h" #include "ED_gpencil.h"
#include "ED_screen.h" #include "ED_screen.h"
#include "ED_transform.h" #include "ED_transform.h"
#include "ED_gpencil.h"
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"

@ -72,8 +72,6 @@
#include "DEG_depsgraph.h" #include "DEG_depsgraph.h"
#include "RE_engine.h"
#include "IMB_imbuf_types.h" #include "IMB_imbuf_types.h"
#include "IMB_imbuf.h" #include "IMB_imbuf.h"
#include "IMB_colormanagement.h" #include "IMB_colormanagement.h"

@ -3676,8 +3676,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
new_dist = rv3d->dist; new_dist = rv3d->dist;
/* convert the drawn rectangle into 3d space */ /* convert the drawn rectangle into 3d space */
if (depth_close != FLT_MAX && ED_view3d_unproject(ar, centx, centy, depth_close, p)) if (depth_close != FLT_MAX && ED_view3d_unproject(ar, centx, centy, depth_close, p)) {
{
negate_v3_v3(new_ofs, p); negate_v3_v3(new_ofs, p);
} }
else { else {
@ -4940,8 +4939,7 @@ bool ED_view3d_autodist(
float centx = (float)mval[0] + 0.5f; float centx = (float)mval[0] + 0.5f;
float centy = (float)mval[1] + 0.5f; float centy = (float)mval[1] + 0.5f;
if (ED_view3d_unproject(ar, centx, centy, depth_close, mouse_worldloc)) if (ED_view3d_unproject(ar, centx, centy, depth_close, mouse_worldloc)) {
{
return true; return true;
} }
} }

@ -317,7 +317,7 @@ static bool fcu_test_selected(FCurve *fcu)
/* helper for recalcData() - for Action Editor transforms */ /* helper for recalcData() - for Action Editor transforms */
static void recalcData_actedit(TransInfo *t) static void recalcData_actedit(TransInfo *t)
{ {
SceneLayer *sl= t->scene_layer; SceneLayer *sl = t->scene_layer;
SpaceAction *saction = (SpaceAction *)t->sa->spacedata.first; SpaceAction *saction = (SpaceAction *)t->sa->spacedata.first;
bAnimContext ac = {NULL}; bAnimContext ac = {NULL};

@ -1185,7 +1185,7 @@ static void WIDGETGROUP_manipulator_setup(const bContext *UNUSED(C), wmManipulat
/* custom handler! */ /* custom handler! */
WM_manipulator_set_fn_custom_modal(axis, manipulator_modal); WM_manipulator_set_fn_custom_modal(axis, manipulator_modal);
switch(axis_idx) { switch (axis_idx) {
case MAN_AXIS_TRANS_X: case MAN_AXIS_TRANS_X:
case MAN_AXIS_TRANS_Y: case MAN_AXIS_TRANS_Y:
case MAN_AXIS_TRANS_Z: case MAN_AXIS_TRANS_Z:

@ -1574,8 +1574,9 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_ACTIVE, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_ACTIVE, col);
vbo = GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, stitch_preview->num_static_tris * 3); GWN_vertbuf_data_alloc(vbo, stitch_preview->num_static_tris * 3);
for (int i = 0; i < stitch_preview->num_static_tris * 3; i++) for (int i = 0; i < stitch_preview->num_static_tris * 3; i++) {
GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->static_tris[i*2]); GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->static_tris[i * 2]);
}
stitch_draw_vbo(vbo, GWN_PRIM_TRIS, col); stitch_draw_vbo(vbo, GWN_PRIM_TRIS, col);
@ -1601,16 +1602,17 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar
for (j = 1; j < stitch_preview->uvs_per_polygon[i] - 1; ++j) { for (j = 1; j < stitch_preview->uvs_per_polygon[i] - 1; ++j) {
GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index]); GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index]);
GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j + 0) * 2]);
GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); GWN_vertbuf_attr_set(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j + 1) * 2]);
GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j + 0) * 2]);
GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j + 1) * 2]);
} }
/* Closing line */ /* Closing line */
GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]);
GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j*2]); /* j = uvs_per_polygon[i] - 1*/ /* j = uvs_per_polygon[i] - 1*/
GWN_vertbuf_attr_set(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j * 2]);
index += stitch_preview->uvs_per_polygon[i] * 2; index += stitch_preview->uvs_per_polygon[i] * 2;
} }
@ -1629,30 +1631,34 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col);
vbo = GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, stitch_preview->num_stitchable); GWN_vertbuf_data_alloc(vbo, stitch_preview->num_stitchable);
for (int i = 0; i < stitch_preview->num_stitchable; i++) for (int i = 0; i < stitch_preview->num_stitchable; i++) {
GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_stitchable[i * 2]);
}
stitch_draw_vbo(vbo, GWN_PRIM_POINTS, col); stitch_draw_vbo(vbo, GWN_PRIM_POINTS, col);
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col);
vbo = GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, stitch_preview->num_unstitchable); GWN_vertbuf_data_alloc(vbo, stitch_preview->num_unstitchable);
for (int i = 0; i < stitch_preview->num_unstitchable; i++) for (int i = 0; i < stitch_preview->num_unstitchable; i++) {
GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i * 2]);
}
stitch_draw_vbo(vbo, GWN_PRIM_POINTS, col); stitch_draw_vbo(vbo, GWN_PRIM_POINTS, col);
} }
else { else {
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col);
vbo = GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, stitch_preview->num_stitchable * 2); GWN_vertbuf_data_alloc(vbo, stitch_preview->num_stitchable * 2);
for (int i = 0; i < stitch_preview->num_stitchable * 2; i++) for (int i = 0; i < stitch_preview->num_stitchable * 2; i++) {
GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_stitchable[i * 2]);
}
stitch_draw_vbo(vbo, GWN_PRIM_LINES, col); stitch_draw_vbo(vbo, GWN_PRIM_LINES, col);
UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col);
vbo = GWN_vertbuf_create_with_format(&format); vbo = GWN_vertbuf_create_with_format(&format);
GWN_vertbuf_data_alloc(vbo, stitch_preview->num_unstitchable * 2); GWN_vertbuf_data_alloc(vbo, stitch_preview->num_unstitchable * 2);
for (int i = 0; i < stitch_preview->num_unstitchable * 2; i++) for (int i = 0; i < stitch_preview->num_unstitchable * 2; i++) {
GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); GWN_vertbuf_attr_set(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i * 2]);
}
stitch_draw_vbo(vbo, GWN_PRIM_LINES, col); stitch_draw_vbo(vbo, GWN_PRIM_LINES, col);
} }
} }

@ -39,7 +39,7 @@
#include "GPU_shader.h" #include "GPU_shader.h"
/* Extend GWN_batch_program_set to use Blenders library of built-in shader programs. */ /* Extend GWN_batch_program_set to use Blenders library of built-in shader programs. */
void GWN_batch_program_set_builtin(Gwn_Batch*, GPUBuiltinShader); void GWN_batch_program_set_builtin(Gwn_Batch *, GPUBuiltinShader);
/* Replacement for gluSphere */ /* Replacement for gluSphere */
Gwn_Batch *GPU_batch_preset_sphere(int lod); Gwn_Batch *GPU_batch_preset_sphere(int lod);

@ -1280,7 +1280,7 @@ void GPU_create_smoke(SmokeModifierData *smd, int highres)
} }
sds->tex_flame = (smoke_turbulence_has_fuel(sds->wt)) ? sds->tex_flame = (smoke_turbulence_has_fuel(sds->wt)) ?
GPU_texture_create_3D_custom(sds->res_wt[0], sds->res_wt[1], sds->res_wt[2], 1, GPU_texture_create_3D_custom(sds->res_wt[0], sds->res_wt[1], sds->res_wt[2], 1,
GPU_R8, smoke_turbulence_get_flame(sds->wt), NULL): GPU_R8, smoke_turbulence_get_flame(sds->wt), NULL) :
NULL; NULL;
} }
@ -2425,7 +2425,8 @@ void gpuPushAttrib(eGPUAttribMask mask)
AttribStack.top++; AttribStack.top++;
} }
static void restore_mask(GLenum cap, const bool value) { static void restore_mask(GLenum cap, const bool value)
{
if (value) { if (value) {
glEnable(cap); glEnable(cap);
} }

@ -573,7 +573,7 @@ void GPU_framebuffer_recursive_downsample(
glReadBuffer(GL_COLOR_ATTACHMENT0); glReadBuffer(GL_COLOR_ATTACHMENT0);
} }
for (i=1; i < num_iter+1 && (current_dim[0] > 4 && current_dim[1] > 4); i++) { for (i = 1; i < num_iter + 1 && (current_dim[0] > 4 && current_dim[1] > 4); i++) {
/* calculate next viewport size */ /* calculate next viewport size */
current_dim[0] /= 2; current_dim[0] /= 2;
@ -587,8 +587,8 @@ void GPU_framebuffer_recursive_downsample(
/* bind next level for rendering but first restrict fetches only to previous level */ /* bind next level for rendering but first restrict fetches only to previous level */
GPU_texture_bind(tex, 0); GPU_texture_bind(tex, 0);
glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_BASE_LEVEL, i-1); glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_BASE_LEVEL, i - 1);
glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_MAX_LEVEL, i-1); glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_MAX_LEVEL, i - 1);
GPU_texture_unbind(tex); GPU_texture_unbind(tex);
glFramebufferTexture(GL_FRAMEBUFFER, attachment, GPU_texture_opengl_bindcode(tex), i); glFramebufferTexture(GL_FRAMEBUFFER, attachment, GPU_texture_opengl_bindcode(tex), i);
@ -601,7 +601,7 @@ void GPU_framebuffer_recursive_downsample(
/* reset mipmap level range for the depth image */ /* reset mipmap level range for the depth image */
GPU_texture_bind(tex, 0); GPU_texture_bind(tex, 0);
glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_BASE_LEVEL, 0); glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_MAX_LEVEL, i-1); glTexParameteri(GPU_texture_target(tex), GL_TEXTURE_MAX_LEVEL, i - 1);
GPU_texture_unbind(tex); GPU_texture_unbind(tex);
} }

@ -574,33 +574,33 @@ void gpuBindMatrices(const Gwn_ShaderInterface *shaderface)
const Gwn_ShaderInput *P_inv = GWN_shaderinterface_uniform_builtin(shaderface, GWN_UNIFORM_PROJECTION_INV); const Gwn_ShaderInput *P_inv = GWN_shaderinterface_uniform_builtin(shaderface, GWN_UNIFORM_PROJECTION_INV);
if (MV) { if (MV) {
#if DEBUG_MATRIX_BIND #if DEBUG_MATRIX_BIND
puts("setting MV matrix"); puts("setting MV matrix");
#endif #endif
glUniformMatrix4fv(MV->location, 1, GL_FALSE, (const float *)gpuGetModelViewMatrix(NULL)); glUniformMatrix4fv(MV->location, 1, GL_FALSE, (const float *)gpuGetModelViewMatrix(NULL));
} }
if (P) { if (P) {
#if DEBUG_MATRIX_BIND #if DEBUG_MATRIX_BIND
puts("setting P matrix"); puts("setting P matrix");
#endif #endif
glUniformMatrix4fv(P->location, 1, GL_FALSE, (const float *)gpuGetProjectionMatrix(NULL)); glUniformMatrix4fv(P->location, 1, GL_FALSE, (const float *)gpuGetProjectionMatrix(NULL));
} }
if (MVP) { if (MVP) {
#if DEBUG_MATRIX_BIND #if DEBUG_MATRIX_BIND
puts("setting MVP matrix"); puts("setting MVP matrix");
#endif #endif
glUniformMatrix4fv(MVP->location, 1, GL_FALSE, (const float *)gpuGetModelViewProjectionMatrix(NULL)); glUniformMatrix4fv(MVP->location, 1, GL_FALSE, (const float *)gpuGetModelViewProjectionMatrix(NULL));
} }
if (N) { if (N) {
#if DEBUG_MATRIX_BIND #if DEBUG_MATRIX_BIND
puts("setting normal matrix"); puts("setting normal matrix");
#endif #endif
glUniformMatrix3fv(N->location, 1, GL_FALSE, (const float *)gpuGetNormalMatrix(NULL)); glUniformMatrix3fv(N->location, 1, GL_FALSE, (const float *)gpuGetNormalMatrix(NULL));
} }
@ -609,14 +609,14 @@ void gpuBindMatrices(const Gwn_ShaderInterface *shaderface)
Mat4 m; Mat4 m;
gpuGetModelViewMatrix(m); gpuGetModelViewMatrix(m);
invert_m4(m); invert_m4(m);
glUniformMatrix4fv(MV_inv->location, 1, GL_FALSE, (const float*) m); glUniformMatrix4fv(MV_inv->location, 1, GL_FALSE, (const float *)m);
} }
if (P_inv) { if (P_inv) {
Mat4 m; Mat4 m;
gpuGetProjectionMatrix(m); gpuGetProjectionMatrix(m);
invert_m4(m); invert_m4(m);
glUniformMatrix4fv(P_inv->location, 1, GL_FALSE, (const float*) m); glUniformMatrix4fv(P_inv->location, 1, GL_FALSE, (const float *)m);
} }
state.dirty = false; state.dirty = false;

@ -368,7 +368,8 @@ int GPU_uniformbuffer_bindpoint(GPUUniformBuffer *ubo)
return ubo->bindpoint; return ubo->bindpoint;
} }
void GPU_uniformbuffer_tag_dirty(GPUUniformBuffer *ubo_) { void GPU_uniformbuffer_tag_dirty(GPUUniformBuffer *ubo_)
{
BLI_assert(ubo_->type == GPU_UBO_DYNAMIC); BLI_assert(ubo_->type == GPU_UBO_DYNAMIC);
GPUUniformBufferDynamic *ubo = (GPUUniformBufferDynamic *)ubo_; GPUUniformBufferDynamic *ubo = (GPUUniformBufferDynamic *)ubo_;
ubo->flag |= GPU_UBO_FLAG_DIRTY; ubo->flag |= GPU_UBO_FLAG_DIRTY;

@ -42,7 +42,6 @@
#include "BLI_iterator.h" #include "BLI_iterator.h"
#include "BKE_report.h" #include "BKE_report.h"
#include "DNA_object_types.h"
#include "DEG_depsgraph_build.h" #include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_debug.h" #include "DEG_depsgraph_debug.h"
@ -266,7 +265,7 @@ static void rna_def_depsgraph_iter(BlenderRNA *brna)
prop = RNA_def_property(srna, "persistent_id", PROP_INT, PROP_NONE); prop = RNA_def_property(srna, "persistent_id", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Persistent ID", RNA_def_property_ui_text(prop, "Persistent ID",
"Persistent identifier for inter-frame matching of objects with motion blur"); "Persistent identifier for inter-frame matching of objects with motion blur");
RNA_def_property_array(prop, 2*MAX_DUPLI_RECUR); RNA_def_property_array(prop, 2 * MAX_DUPLI_RECUR);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
RNA_def_property_int_funcs(prop, "rna_DepsgraphIter_persistent_id_get", NULL, NULL); RNA_def_property_int_funcs(prop, "rna_DepsgraphIter_persistent_id_get", NULL, NULL);

@ -37,8 +37,6 @@
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
#include "DNA_object_types.h"
#include "MEM_guardedalloc.h" #include "MEM_guardedalloc.h"
#include "BKE_main.h" #include "BKE_main.h"
@ -47,7 +45,6 @@
#include "DNA_object_types.h" #include "DNA_object_types.h"
#include "WM_api.h" #include "WM_api.h"
#include "WM_types.h"
static void rna_LightProbe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) static void rna_LightProbe_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{ {

@ -1865,13 +1865,13 @@ void RNA_def_material(BlenderRNA *brna)
prop = RNA_def_property(srna, "transparent_hide_backside", PROP_BOOLEAN, PROP_NONE); prop = RNA_def_property(srna, "transparent_hide_backside", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_HIDE_BACKSIDE); RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_HIDE_BACKSIDE);
RNA_def_property_ui_text(prop, "Hide Backside" , "Limit transparency to a single layer " RNA_def_property_ui_text(prop, "Hide Backside", "Limit transparency to a single layer "
"(avoids transparency sorting problems)"); "(avoids transparency sorting problems)");
RNA_def_property_update(prop, 0, "rna_Material_draw_update"); RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop = RNA_def_property(srna, "use_screen_refraction", PROP_BOOLEAN, PROP_NONE); prop = RNA_def_property(srna, "use_screen_refraction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_SS_REFRACTION); RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_SS_REFRACTION);
RNA_def_property_ui_text(prop, "Screen Space Refraction" , "Use raytraced screen space refractions"); RNA_def_property_ui_text(prop, "Screen Space Refraction", "Use raytraced screen space refractions");
RNA_def_property_update(prop, 0, "rna_Material_draw_update"); RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop = RNA_def_property(srna, "refraction_depth", PROP_FLOAT, PROP_DISTANCE); prop = RNA_def_property(srna, "refraction_depth", PROP_FLOAT, PROP_DISTANCE);

@ -401,7 +401,7 @@ static PointerRNA rna_RenderEngine_scene_layer_get(PointerRNA *ptr)
{ {
RenderEngine *engine = (RenderEngine *)ptr->data; RenderEngine *engine = (RenderEngine *)ptr->data;
if (engine->re != NULL) { if (engine->re != NULL) {
SceneLayer* scene_layer = RE_engine_get_scene_layer(engine->re); SceneLayer *scene_layer = RE_engine_get_scene_layer(engine->re);
return rna_pointer_inherit_refine(ptr, &RNA_SceneLayer, scene_layer); return rna_pointer_inherit_refine(ptr, &RNA_SceneLayer, scene_layer);
} }
return rna_pointer_inherit_refine(ptr, &RNA_SceneLayer, NULL); return rna_pointer_inherit_refine(ptr, &RNA_SceneLayer, NULL);

@ -471,7 +471,6 @@ EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = {
#include "BKE_node.h" #include "BKE_node.h"
#include "BKE_pointcache.h" #include "BKE_pointcache.h"
#include "BKE_scene.h" #include "BKE_scene.h"
#include "BKE_idprop.h"
#include "BKE_mesh.h" #include "BKE_mesh.h"
#include "BKE_sound.h" #include "BKE_sound.h"
#include "BKE_screen.h" #include "BKE_screen.h"
@ -480,9 +479,6 @@ EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = {
#include "BKE_freestyle.h" #include "BKE_freestyle.h"
#include "BKE_gpencil.h" #include "BKE_gpencil.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "ED_info.h" #include "ED_info.h"
#include "ED_node.h" #include "ED_node.h"
#include "ED_view3d.h" #include "ED_view3d.h"
@ -492,6 +488,7 @@ EnumPropertyItem rna_enum_layer_collection_mode_settings_type_items[] = {
#include "ED_scene.h" #include "ED_scene.h"
#include "DEG_depsgraph.h" #include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h" #include "DEG_depsgraph_query.h"
#ifdef WITH_FREESTYLE #ifdef WITH_FREESTYLE

@ -41,7 +41,6 @@
#include "rna_internal.h" #include "rna_internal.h"
#include "WM_api.h"
#include "WM_types.h" #include "WM_types.h"
#ifdef RNA_RUNTIME #ifdef RNA_RUNTIME
@ -53,7 +52,6 @@
#include <assert.h> #include <assert.h>
#include "WM_api.h" #include "WM_api.h"
#include "WM_types.h"
#include "DNA_workspace_types.h" #include "DNA_workspace_types.h"

@ -258,7 +258,7 @@ void RNA_api_manipulator(StructRNA *srna)
func = RNA_def_function(srna, "target_set_operator", "rna_manipulator_target_set_operator"); func = RNA_def_function(srna, "target_set_operator", "rna_manipulator_target_set_operator");
RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description( RNA_def_function_ui_description(
func,"Operator to run when activating the manipulator " func, "Operator to run when activating the manipulator "
"(overrides property targets)"); "(overrides property targets)");
parm = RNA_def_string(func, "operator", NULL, 0, "", "Target operator"); parm = RNA_def_string(func, "operator", NULL, 0, "", "Target operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);

@ -18,8 +18,8 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
#ifndef __GWN_PY_API__ #ifndef __GWN_PY_API_H__
#define __GWN_PY_API__ #define __GWN_PY_API_H__
/** \file blender/python/gawain/gwn_py_api.h /** \file blender/python/gawain/gwn_py_api.h
* \ingroup pygawain * \ingroup pygawain
@ -27,4 +27,4 @@
PyObject *BPyInit_gawain(void); PyObject *BPyInit_gawain(void);
#endif /* __GWN_PY_API__ */ #endif /* __GWN_PY_API_H__ */

@ -647,7 +647,7 @@ static PyObject *bpygwn_VertBatch_uniform_f32(BPyGwn_Batch *self, PyObject *args
return NULL; return NULL;
} }
switch(PyTuple_GET_SIZE(args)) { switch (PyTuple_GET_SIZE(args)) {
case 2: GWN_batch_uniform_1f(self->batch, params.id, params.values[0]); break; case 2: GWN_batch_uniform_1f(self->batch, params.id, params.values[0]); break;
case 3: GWN_batch_uniform_2fv(self->batch, params.id, params.values); break; case 3: GWN_batch_uniform_2fv(self->batch, params.id, params.values); break;
case 4: GWN_batch_uniform_3fv(self->batch, params.id, params.values); break; case 4: GWN_batch_uniform_3fv(self->batch, params.id, params.values); break;

@ -1967,7 +1967,7 @@ void WM_window_set_active_workspace(wmWindow *win, WorkSpace *workspace)
WorkSpaceLayout *WM_window_get_active_layout(const wmWindow *win) WorkSpaceLayout *WM_window_get_active_layout(const wmWindow *win)
{ {
const WorkSpace *workspace = WM_window_get_active_workspace(win); const WorkSpace *workspace = WM_window_get_active_workspace(win);
return (LIKELY(workspace != NULL) ? BKE_workspace_active_layout_get(win->workspace_hook): NULL); return (LIKELY(workspace != NULL) ? BKE_workspace_active_layout_get(win->workspace_hook) : NULL);
} }
void WM_window_set_active_layout(wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout) void WM_window_set_active_layout(wmWindow *win, WorkSpace *workspace, WorkSpaceLayout *layout)
{ {

@ -236,7 +236,7 @@ bool WM_manipulator_target_property_range_get(
mpr_prop->custom_func.range_get_fn(mpr, mpr_prop, range); mpr_prop->custom_func.range_get_fn(mpr, mpr_prop, range);
return true; return true;
} }
else{ else {
return false; return false;
} }