Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Thu, 19 Apr 2018 05:47:03 +0000 (07:47 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 19 Apr 2018 05:47:03 +0000 (07:47 +0200)
26 files changed:
source/blender/draw/engines/eevee/eevee_render.c
source/blender/draw/engines/workbench/solid_flat_mode.c
source/blender/draw/engines/workbench/solid_studio_mode.c
source/blender/draw/engines/workbench/workbench_materials.c
source/blender/draw/engines/workbench/workbench_private.h
source/blender/draw/intern/draw_instance_data.c
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_manager_exec.c
source/blender/draw/intern/draw_manager_shader.c
source/blender/draw/modes/object_mode.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mesh/editmesh_extrude.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_edit.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_view3d/view3d_project.c
source/blender/editors/transform/transform_conversions.c
source/blender/gpu/intern/gpu_batch.c
source/blender/gpu/intern/gpu_framebuffer.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/intern/gpu_texture.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/windowmanager/message_bus/intern/wm_message_bus_rna.c

index 08dcb626964c8f63adc5264ca2a592343f996512..6d9824f7ca95e1cab248190be33777f7565641ee 100644 (file)
@@ -256,8 +256,8 @@ static void eevee_render_result_normal(
                        }
 
                        float fenc[2];
-                       fenc[0] = rp->rect[i+0] * 4.0f - 2.0f;
-                       fenc[1] = rp->rect[i+1] * 4.0f - 2.0f;
+                       fenc[0] = rp->rect[i + 0] * 4.0f - 2.0f;
+                       fenc[1] = rp->rect[i + 1] * 4.0f - 2.0f;
 
                        float f = dot_v2v2(fenc, fenc);
                        float g = sqrtf(1.0f - f / 4.0f);
@@ -360,7 +360,7 @@ static void eevee_render_result_occlusion(
 
                /* This is the accumulated color. Divide by the number of samples. */
                for (int i = 0; i < rp->rectx * rp->recty * 3; i += 3) {
-                       rp->rect[i] = rp->rect[i + 1] = rp->rect[i+2] = min_ff(1.0f, rp->rect[i] / (float)render_samples);
+                       rp->rect[i] = rp->rect[i + 1] = rp->rect[i + 2] = min_ff(1.0f, rp->rect[i] / (float)render_samples);
                }
        }
 }
@@ -483,7 +483,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
                DRW_uniformbuffer_update(sldata->common_ubo, &sldata->common_data);
 
                char info[42];
-               BLI_snprintf(info, sizeof(info), "Rendering %u / %u samples", render_samples+1, tot_sample);
+               BLI_snprintf(info, sizeof(info), "Rendering %u / %u samples", render_samples + 1, tot_sample);
                RE_engine_update_stats(engine, NULL, info);
 
                /* Refresh Shadows */
index 5ae46c060dbd8f3baa93dc77eddbabde088adb99..bed87518f397f9812c99e19753be454f41fac95f 100644 (file)
@@ -71,7 +71,7 @@ static void workbench_solid_flat_cache_populate(void *vedata, Object *ob)
        WORKBENCH_StorageList *stl = data->stl;
 
        IDProperty *props = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_NONE, RE_engine_id_BLENDER_WORKBENCH);
-       const floatcolor = BKE_collection_engine_property_value_get_float_array(props, "object_color");
+       const float *color = BKE_collection_engine_property_value_get_float_array(props, "object_color");
 
        if (!DRW_object_is_renderable(ob))
                return;
@@ -90,7 +90,7 @@ static void workbench_solid_flat_cache_populate(void *vedata, Object *ob)
 
 static void workbench_solid_flat_cache_finish(void *vedata)
 {
-       workbench_materials_cache_finish((WORKBENCH_Data*)vedata);
+       workbench_materials_cache_finish((WORKBENCH_Data *)vedata);
 }
 
 static void workbench_solid_flat_draw_scene(void *vedata)
index e8664bda740b2561e6fb43bb571c592d0726b5f0..6ac63fbca67c0bf27d787b3549e1a12b9bab5be0 100644 (file)
@@ -90,7 +90,7 @@ static void workbench_solid_studio_cache_populate(void *vedata, Object *ob)
 
 static void workbench_solid_studio_cache_finish(void *vedata)
 {
-       workbench_materials_cache_finish((WORKBENCH_Data*)vedata);
+       workbench_materials_cache_finish((WORKBENCH_Data *)vedata);
 }
 
 static void workbench_solid_studio_draw_scene(void *vedata)
index e9337761231bb53220e1548cce54782fd97c188a..873d24116a1744ade415d3e87db0da553065be70 100644 (file)
@@ -22,7 +22,7 @@
 /** \file workbench_materials.c
  *  \ingroup draw_engine
  */
+
 #include "workbench_private.h"
 #include "GPU_shader.h"
 
@@ -32,7 +32,7 @@ static struct {
 
        /* Solid flat mode */
        struct GPUShader *solid_flat_sh;
-       
+
        /* Solid studio mode */
        struct GPUShader *solid_studio_sh;
 
@@ -46,22 +46,24 @@ extern char datatoc_workbench_studio_vert_glsl[];
 extern char datatoc_workbench_diffuse_lib_glsl[];
 
 /* Functions */
-static uint get_material_hash(const float color[3]) {
+static uint get_material_hash(const float color[3])
+{
        uint r = (uint)(color[0] * 512);
        uint g = (uint)(color[1] * 512);
        uint b = (uint)(color[2] * 512);
-       
+
        return r + g * 4096 + b * 4096 * 4096;
 }
 
-WORKBENCH_MaterialData* workbench_get_or_create_solid_flat_material_data(WORKBENCH_Data *vedata, const float color[3]) {
+WORKBENCH_MaterialData *workbench_get_or_create_solid_flat_material_data(WORKBENCH_Data *vedata, const float color[3])
+{
        WORKBENCH_StorageList *stl = vedata->stl;
        WORKBENCH_PassList *psl = vedata->psl;
-       WORKBENCH_PrivateDatawpd = stl->g_data;
-       
+       WORKBENCH_PrivateData *wpd = stl->g_data;
+
        uint hash = get_material_hash(color);
        WORKBENCH_MaterialData *material;
-       
+
        material = BLI_ghash_lookup(wpd->material_hash, SET_UINT_IN_POINTER(hash));
        if (material == NULL) {
                material = MEM_mallocN(sizeof(WORKBENCH_MaterialData), "WORKBENCH_MaterialData");
@@ -75,14 +77,15 @@ WORKBENCH_MaterialData* workbench_get_or_create_solid_flat_material_data(WORKBEN
        return material;
 }
 
-WORKBENCH_MaterialData* workbench_get_or_create_solid_studio_material_data(WORKBENCH_Data *vedata, const float color[3]) {
+WORKBENCH_MaterialData *workbench_get_or_create_solid_studio_material_data(WORKBENCH_Data *vedata, const float color[3])
+{
        WORKBENCH_StorageList *stl = vedata->stl;
        WORKBENCH_PassList *psl = vedata->psl;
-       WORKBENCH_PrivateDatawpd = stl->g_data;
-       
+       WORKBENCH_PrivateData *wpd = stl->g_data;
+
        uint hash = get_material_hash(color);
        WORKBENCH_MaterialData *material;
-       
+
        material = BLI_ghash_lookup(wpd->material_hash, SET_UINT_IN_POINTER(hash));
        if (material == NULL) {
                material = MEM_mallocN(sizeof(WORKBENCH_MaterialData), "WORKBENCH_MaterialData");
@@ -96,7 +99,8 @@ WORKBENCH_MaterialData* workbench_get_or_create_solid_studio_material_data(WORKB
        return material;
 }
 
-void workbench_materials_engine_init(void) {
+void workbench_materials_engine_init(void)
+{
        if (!e_data.depth_sh) {
                /* Depth pass */
                e_data.depth_sh = DRW_shader_create_3D_depth_only();
@@ -107,22 +111,25 @@ void workbench_materials_engine_init(void) {
        }
 }
 
-void workbench_materials_engine_finish(void) {
+void workbench_materials_engine_finish(void)
+{
        DRW_SHADER_FREE_SAFE(e_data.solid_flat_sh);
        DRW_SHADER_FREE_SAFE(e_data.solid_studio_sh);
 }
 
-void workbench_materials_cache_init(WORKBENCH_Data *vedata) {
-       WORKBENCH_StorageList* stl = vedata->stl;
-       WORKBENCH_PassList* psl = vedata->psl;
-       WORKBENCH_PrivateData* wpd = stl->g_data;
-       
+void workbench_materials_cache_init(WORKBENCH_Data *vedata)
+{
+       WORKBENCH_StorageList *stl = vedata->stl;
+       WORKBENCH_PassList *psl = vedata->psl;
+       WORKBENCH_PrivateData *wpd = stl->g_data;
+
        wpd->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
        wpd->material_hash = BLI_ghash_ptr_new("Workbench material_hash");
 }
 
-void workbench_materials_cache_finish(WORKBENCH_Data *vedata) {
-       WORKBENCH_StorageList* stl = vedata->stl;
-       WORKBENCH_PrivateData* wpd = stl->g_data;
+void workbench_materials_cache_finish(WORKBENCH_Data *vedata)
+{
+       WORKBENCH_StorageList *stl = vedata->stl;
+       WORKBENCH_PrivateData *wpd = stl->g_data;
        BLI_ghash_free(wpd->material_hash, NULL, MEM_freeN);
 }
index d96565b6864bb1a385bc672028af6a7407e44309..e45ee9bd043054d7c51ac5325c4d8ec2402d2481 100644 (file)
@@ -62,24 +62,24 @@ typedef struct WORKBENCH_MaterialData {
        float color[3];
        
        /* Linked shgroup for drawing */
-       DRWShadingGroup * shgrp;
+       DRWShadingGroup *shgrp;
 } WORKBENCH_MaterialData;
 
 
 /* workbench_engine.c */
 void workbench_solid_materials_init(void);
-void workbench_solid_materials_cache_init(WORKBENCH_Datavedata);
-void workbench_solid_materials_cache_populate(WORKBENCH_Data* vedata, Object* ob);
-void workbench_solid_materials_cache_finish(WORKBENCH_Datavedata);
-void workbench_solid_materials_draw_scene(WORKBENCH_Datavedata);
+void workbench_solid_materials_cache_init(WORKBENCH_Data *vedata);
+void workbench_solid_materials_cache_populate(WORKBENCH_Data *vedata, Object *ob);
+void workbench_solid_materials_cache_finish(WORKBENCH_Data *vedata);
+void workbench_solid_materials_draw_scene(WORKBENCH_Data *vedata);
 void workbench_solid_materials_free(void);
 
 /* workbench_materials.c */
 void workbench_materials_engine_init(void);
 void workbench_materials_engine_finish(void);
 void workbench_materials_cache_init(WORKBENCH_Data *vedata);
-WORKBENCH_MaterialDataworkbench_get_or_create_solid_flat_material_data(WORKBENCH_Data *vedata, const float color[3]);
-WORKBENCH_MaterialDataworkbench_get_or_create_solid_studio_material_data(WORKBENCH_Data *vedata, const float color[3]);
+WORKBENCH_MaterialData *workbench_get_or_create_solid_flat_material_data(WORKBENCH_Data *vedata, const float color[3]);
+WORKBENCH_MaterialData *workbench_get_or_create_solid_studio_material_data(WORKBENCH_Data *vedata, const float color[3]);
 void workbench_materials_cache_finish(WORKBENCH_Data *vedata);
 
 
index ee73a2ba2c63ba42e1fe2fd12603f61f9be18d1e..350d4a0c20d073c5c777a4e068119a8bd135da49 100644 (file)
@@ -297,13 +297,13 @@ static DRWInstanceData *drw_instance_data_create(
        BLI_assert(attrib_size > 0);
 
        /* Push to linked list. */
-       if (idatalist->idata_head[attrib_size-1] == NULL) {
-               idatalist->idata_head[attrib_size-1] = idata;
+       if (idatalist->idata_head[attrib_size - 1] == NULL) {
+               idatalist->idata_head[attrib_size - 1] = idata;
        }
        else {
-               idatalist->idata_tail[attrib_size-1]->next = idata;
+               idatalist->idata_tail[attrib_size - 1]->next = idata;
        }
-       idatalist->idata_tail[attrib_size-1] = idata;
+       idatalist->idata_tail[attrib_size - 1] = idata;
 
        return idata;
 }
index 66de79314b44da9c6aa18c8352d4d4413b890318..c99cd25df6776f53ab6d6dc173db2769d898c80e 100644 (file)
@@ -496,7 +496,7 @@ static void drw_viewport_var_init(void)
 void DRW_viewport_matrix_get(float mat[4][4], DRWViewportMatrixType type)
 {
        BLI_assert(type >= 0 && type < DRW_MAT_COUNT);
-       BLI_assert(((DST.override_mat & (1 << type)) != 0)|| DST.draw_ctx.rv3d != NULL); /* Can't use this in render mode. */
+       BLI_assert(((DST.override_mat & (1 << type)) != 0) || DST.draw_ctx.rv3d != NULL); /* Can't use this in render mode. */
 
        copy_m4_m4(mat, DST.view_data.matstate.mat[type]);
 }
@@ -905,8 +905,8 @@ static void drw_engines_enable_from_engine(RenderEngineType *engine_type, int dr
                case OB_SOLID:
                        if (drawtype_solid == OB_LIGHTING_FLAT) {
                                use_drw_engine(&draw_engine_workbench_solid_flat);
-
-                       else if (drawtype_solid == OB_LIGHTING_STUDIO) {
+                       }
+                       else if (drawtype_solid == OB_LIGHTING_STUDIO) {
                                use_drw_engine(&draw_engine_workbench_solid_studio);
 
                        }
@@ -1465,8 +1465,8 @@ static void draw_select_framebuffer_setup(const rcti *rect)
 
        /* If size mismatch recreate the texture. */
        if ((g_select_buffer.texture_depth != NULL) &&
-               ((GPU_texture_width(g_select_buffer.texture_depth) != BLI_rcti_size_x(rect)) ||
-               (GPU_texture_height(g_select_buffer.texture_depth) != BLI_rcti_size_y(rect))))
+           ((GPU_texture_width(g_select_buffer.texture_depth) != BLI_rcti_size_x(rect)) ||
+            (GPU_texture_height(g_select_buffer.texture_depth) != BLI_rcti_size_y(rect))))
        {
                GPU_texture_free(g_select_buffer.texture_depth);
                g_select_buffer.texture_depth = NULL;
index 3208e4e5017ae21de0dbc6f26dcb765c0962b802..ff29d7d7f3da2f65a32d4f54b47527bcc6e32790 100644 (file)
@@ -462,12 +462,12 @@ static void draw_clipping_setup_from_view(void)
        for (int p = 0; p < 6; p++) {
                int q, r;
                switch (p) {
-                       case 0:  q=1; r=2; break;
-                       case 1:  q=0; r=5; break;
-                       case 2:  q=1; r=5; break;
-                       case 3:  q=2; r=6; break;
-                       case 4:  q=0; r=3; break;
-                       default: q=4; r=7; break;
+                       case 0:  q = 1; r = 2; break;
+                       case 1:  q = 0; r = 5; break;
+                       case 2:  q = 1; r = 5; break;
+                       case 3:  q = 2; r = 6; break;
+                       case 4:  q = 0; r = 3; break;
+                       default: q = 4; r = 7; break;
                }
                if (DST.frontface == GL_CW) {
                        SWAP(int, q, r);
@@ -573,8 +573,8 @@ static void draw_clipping_setup_from_view(void)
                /* the big formula, it simplifies to (F-N)/(2(e-s)) for the symmetric case */
                z = (F-N) / (2.0f * (e-s + c*(f-n)));
 
-               bsphere->center[0] = farcenter[0] * z/e;
-               bsphere->center[1] = farcenter[1] * z/e;
+               bsphere->center[0] = farcenter[0] * z / e;
+               bsphere->center[1] = farcenter[1] * z / e;
                bsphere->center[2] = z;
                bsphere->radius = len_v3v3(bsphere->center, farpoint);
 
index 814109ee1e983a97f1635da9f152303401c970ee..a0c8cd4195ac188b3aeb837c6bacb2d3d285e8e8 100644 (file)
@@ -90,7 +90,7 @@ static void drw_deferred_shader_free(DRWDeferredShader *dsh)
 static void drw_deferred_shader_queue_free(ListBase *queue)
 {
        DRWDeferredShader *dsh;
-       while((dsh = BLI_pophead(queue))) {
+       while ((dsh = BLI_pophead(queue))) {
                drw_deferred_shader_free(dsh);
        }
 }
index 7868e8a823299a921910d6275e78aa9199377041..b7d20fd48d1ba92a478e374c08c35125cb8d235c 100644 (file)
@@ -826,10 +826,10 @@ static void DRW_shgroup_empty_image(
 
                if (tex) {
                        DRW_shgroup_instance_format(e_data.empty_image_format, {
-                               {"objectColor"         , DRW_ATTRIB_FLOAT, 4},
-                               {"size"                , DRW_ATTRIB_FLOAT, 1},
-                               {"offset"              , DRW_ATTRIB_FLOAT, 2},
-                               {"InstanceModelMatrix" , DRW_ATTRIB_FLOAT, 16},
+                               {"objectColor",         DRW_ATTRIB_FLOAT, 4},
+                               {"size",                DRW_ATTRIB_FLOAT, 1},
+                               {"offset",              DRW_ATTRIB_FLOAT, 2},
+                               {"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16},
                        });
 
                        struct Gwn_Batch *geom = DRW_cache_image_plane_get();
@@ -846,10 +846,10 @@ static void DRW_shgroup_empty_image(
 
                {
                        DRW_shgroup_instance_format(e_data.empty_image_wire_format, {
-                               {"objectColor"         , DRW_ATTRIB_FLOAT, 4},
-                               {"size"                , DRW_ATTRIB_FLOAT, 1},
-                               {"offset"              , DRW_ATTRIB_FLOAT, 2},
-                               {"InstanceModelMatrix" , DRW_ATTRIB_FLOAT, 16}
+                               {"objectColor",         DRW_ATTRIB_FLOAT, 4},
+                               {"size",                DRW_ATTRIB_FLOAT, 1},
+                               {"offset",              DRW_ATTRIB_FLOAT, 2},
+                               {"InstanceModelMatrix", DRW_ATTRIB_FLOAT, 16}
                        });
 
                        struct Gwn_Batch *geom = DRW_cache_image_plane_wire_get();
index 04de8f6c94c65c9c213dee3c80f5aa06ad4f0908..b945965ce6a1c850a4bde5e59ddd8dd73c8a582b 100644 (file)
@@ -1028,7 +1028,7 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
  * efficient than simple glUniform calls. */
 #define ICON_DRAW_CACHE_SIZE 16
 
-typedef struct IconDrawCall{
+typedef struct IconDrawCall {
        rctf pos;
        rctf tex;
        float color[4];
index 71eb764918d99bf2a17ba534300559bf4e6836bf..5cfee9d0e72163b3038261faf98a94abcd11b4a0 100644 (file)
@@ -1131,8 +1131,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
                }
        }
 
-       if (wtb->tria1.type != ROUNDBOX_TRIA_NONE)
-       {
+       if (wtb->tria1.type != ROUNDBOX_TRIA_NONE) {
                tria_col[0] = wcol->item[0];
                tria_col[1] = wcol->item[1];
                tria_col[2] = wcol->item[2];
@@ -1162,7 +1161,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
 
                /* for each AA step */
                immBegin(GWN_PRIM_TRIS, (wtb->tria1.tot + wtb->tria2.tot) * 3 * WIDGET_AA_JITTER);
-               if (wtb->tria1.tot){
+               if (wtb->tria1.tot) {
                        shape_preset_draw_trias_aa(&wtb->tria1, pos);
                }
                if (wtb->tria2.tot) {
index bedb3b614d1bcd61c07a6bdf33fd68912ee5e762..3031d2e09b3fdfaf3b64db7ba6a97f0620518571 100644 (file)
@@ -450,9 +450,7 @@ static int edbm_extrude_verts_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);
                if (em->bm->totvertsel == 0) {
@@ -498,9 +496,7 @@ static int edbm_extrude_edges_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);
                if (em->bm->totedgesel == 0) {
@@ -546,8 +542,7 @@ static int edbm_extrude_faces_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);
                if (em->bm->totfacesel == 0) {
index e6311b60a39d0ca889440fbd1fe3e8e8f36a7f53..e458125328694b1408b5dc675b92108ed167ece1 100644 (file)
@@ -1566,8 +1566,7 @@ static int edbm_duplicate_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);
                if (em->bm->totvertsel == 0) {
@@ -1578,9 +1577,9 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op)
                BMesh *bm = em->bm;
 
                EDBM_op_init(
-                               em, &bmop, op,
-                               "duplicate geom=%hvef use_select_history=%b",
-                               BM_ELEM_SELECT, true);
+                       em, &bmop, op,
+                       "duplicate geom=%hvef use_select_history=%b",
+                       BM_ELEM_SELECT, true);
 
                BMO_op_exec(bm, &bmop);
 
@@ -4099,8 +4098,7 @@ static int edbm_poke_face_exec(bContext *C, wmOperator *op)
        ViewLayer *view_layer = CTX_data_view_layer(C);
        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);
 
@@ -4173,11 +4171,10 @@ static int edbm_quads_convert_to_tris_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++) {
                Object *obedit = objects[ob_index];
-
                BMEditMesh *em = BKE_editmesh_from_object(obedit);
+
                BMOperator bmop;
                BMOIter oiter;
                BMFace *f;
@@ -4196,11 +4193,11 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
                EDBM_selectmode_flush(em);
 
                // XXX, TODO
-       #if 0
+#if 0
                if (!EDBM_op_finish(em, &bmop, op, true)) {
                        return OPERATOR_CANCELLED;
                }
-       #endif
+#endif
 
                EDBM_update_generic(em, true, true);
        }
@@ -4371,8 +4368,7 @@ static int edbm_decimate_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);
                BMesh *bm = em->bm;
index 5565565c6797eb021ebfb21b0323881524227a7c..248501a7baf16ddd4f331fe3e1a61f0f96f2f41e 100644 (file)
@@ -84,7 +84,6 @@
 #include "BKE_editlattice.h"
 #include "BKE_editmesh.h"
 #include "BKE_report.h"
-#include "BKE_object.h"
 #include "BKE_workspace.h"
 #include "BKE_layer.h"
 
@@ -1704,16 +1703,16 @@ static void move_to_collection_menu_create(bContext *UNUSED(C), uiLayout *layout
        MoveToCollectionData *menu = menu_v;
 
        uiItemIntO(layout,
-                          menu->collection->name,
-                          ICON_NONE,
-                          "OBJECT_OT_move_to_collection",
-                          "collection_index",
-                          menu->index);
+                  menu->collection->name,
+                  ICON_NONE,
+                  "OBJECT_OT_move_to_collection",
+                  "collection_index",
+                  menu->index);
        uiItemS(layout);
 
        for (MoveToCollectionData *submenu = menu->submenus.first;
-                submenu != NULL;
-                submenu = submenu->next)
+            submenu != NULL;
+            submenu = submenu->next)
        {
                move_to_collection_menus_items(layout, submenu);
        }
index 1cb9c57404ada4c6cf213213194b56146d306f49..448286c7c3d9aabd426a783413849298d8ee3fa9 100644 (file)
@@ -3441,7 +3441,7 @@ static void nodelink_batch_init(void)
        Gwn_VertBuf *vbo = GWN_vertbuf_create_with_format_ex(&format, GWN_USAGE_STATIC);
        int vcount = LINK_RESOL * 2; /* curve */
        vcount += 2; /* restart strip */
-       vcount += 3*2; /* arrow */
+       vcount += 3 * 2; /* arrow */
        vcount *= 2; /* shadow */
        vcount += 2; /* restart strip */
        GWN_vertbuf_data_alloc(vbo, vcount);
@@ -3458,7 +3458,7 @@ static void nodelink_batch_init(void)
 
                /* curve strip */
                for (int i = 0; i < LINK_RESOL; ++i) {
-                       uv[0] = 255 * (i / (float)(LINK_RESOL-1));
+                       uv[0] = 255 * (i / (float)(LINK_RESOL - 1));
                        uv[1] = 0;
                        set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
                        uv[1] = 255;
index ba501ac7db594514a1cfb5d2e42ba3dd059610ec..543a0b0f8d7ec82739609121dd17110d98fe7c7f 100644 (file)
@@ -288,7 +288,8 @@ static int outliner_item_drag_drop_modal(bContext *C, wmOperator *op, const wmEv
  * It will fail when there is no next/prev TreeElement, or when the
  * element is an Override or something else in the future.
  */
-static bool tree_element_is_collection_get(const TreeElement *te) {
+static bool tree_element_is_collection_get(const TreeElement *te)
+{
        if (te == NULL) {
                return false;
        }
index eff726868c7be2db8714502c3e392db4544021df..d418c571a8db648f1305a09584ec8fbe47db3641 100644 (file)
@@ -2066,7 +2066,7 @@ static bool outliner_element_visible_get(ViewLayer *view_layer, TreeElement *te,
                }
        }
        else if (te->parent != NULL &&
-           TREESTORE(te->parent)->type == 0 && te->parent->idcode == ID_OB)
+                TREESTORE(te->parent)->type == 0 && te->parent->idcode == ID_OB)
        {
                if (exclude_filter & SO_FILTER_NO_OB_CONTENT) {
                        return false;
index 8a52542b2fb9e94ed5b5e6ebd7b06083acd09e9f..eb86800f4a9b07b78d7d9338908d95d18633cd92 100644 (file)
@@ -400,7 +400,7 @@ bool ED_view3d_win_to_ray(
         const ARegion *ar, const View3D *v3d, const float mval[2],
         float r_ray_start[3], float r_ray_normal[3], const bool do_clip)
 {
-       return ED_view3d_win_to_ray_ex(depsgraph,ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip);
+       return ED_view3d_win_to_ray_ex(depsgraph, ar, v3d, mval, NULL, r_ray_normal, r_ray_start, do_clip);
 }
 
 /**
index 91b5be2f81c09d201d6ea1a6cdc7ac9a469ac191..14dd147c309576e7167eaf94685e9b0be5ba4c39 100644 (file)
@@ -1612,6 +1612,11 @@ static int bezt_select_to_transform_triple_flag(
 
 static void createTransCurveVerts(TransInfo *t)
 {
+
+#define SEL_F1 (1 << 0)
+#define SEL_F2 (1 << 1)
+#define SEL_F3 (1 << 2)
+
        FOREACH_TRANS_DATA_CONTAINER (t, tc) {
 
                Curve *cu = tc->obedit->data;
@@ -1629,10 +1634,6 @@ static void createTransCurveVerts(TransInfo *t)
                /* to be sure */
                if (cu->editnurb == NULL) return;
 
-       #define SEL_F1 (1 << 0)
-       #define SEL_F2 (1 << 1)
-       #define SEL_F3 (1 << 2)
-
                /* count total of vertices, check identical as in 2nd loop for making transdata! */
                nurbs = BKE_curve_editNurbs_get(cu);
                for (nu = nurbs->first; nu; nu = nu->next) {
@@ -2644,11 +2645,11 @@ static void createTransEditVerts(TransInfo *t)
                         * correction with quats, relative to the coordinates after
                         * the modifiers that support deform matrices (defcos) */
 
-       #if 0   /* TODO, fix crazyspace+extrude so it can be enabled for general use - campbell */
+#if 0  /* TODO, fix crazyspace+extrude so it can be enabled for general use - campbell */
                        if ((totleft > 0) || (totleft == -1))
-       #else
+#else
                        if (totleft > 0)
-       #endif
+#endif
                        {
                                mappedcos = BKE_crazyspace_get_mapped_editverts(t->depsgraph, t->scene, tc->obedit);
                                quats = MEM_mallocN(em->bm->totvert * sizeof(*quats), "crazy quats");
@@ -2793,13 +2794,13 @@ void flushTransNodes(TransInfo *t)
                        float locx, locy;
 
                        /* weirdo - but the node system is a mix of free 2d elements and dpi sensitive UI */
-       #ifdef USE_NODE_CENTER
+#ifdef USE_NODE_CENTER
                        locx = (td2d->loc[0] - (BLI_rctf_size_x(&node->totr)) * +0.5f) / dpi_fac;
                        locy = (td2d->loc[1] - (BLI_rctf_size_y(&node->totr)) * -0.5f) / dpi_fac;
-       #else
+#else
                        locx = td2d->loc[0] / dpi_fac;
                        locy = td2d->loc[1] / dpi_fac;
-       #endif
+#endif
 
                        /* account for parents (nested nodes) */
                        if (node->parent) {
index 332102aca468cb6831adc720ad68142f15874c10..59d88e81822560918e1aea5652e7c271088a7806 100644 (file)
@@ -25,7 +25,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/gpu/intern/gpu_basic_shader.c
+/** \file blender/gpu/intern/gpu_batch.c
  *  \ingroup gpu
  */
 
index d31ba79d9ed07bdf886e9faabdc3644ffe58fcc2..cb23b436fcbfb68939ef72de9540b1c574e8403c 100644 (file)
@@ -210,8 +210,8 @@ static void gpu_framebuffer_texture_attach_ex(GPUFrameBuffer *fb, GPUTexture *te
        GPUAttachment *attachment = &fb->attachments[type];
 
        if ((attachment->tex == tex) &&
-               (attachment->mip == mip) &&
-               (attachment->layer == layer))
+           (attachment->mip == mip) &&
+           (attachment->layer == layer))
        {
                return; /* Exact same texture already bound here. */
        }
@@ -543,7 +543,7 @@ void GPU_framebuffer_blit(
                BLI_assert(GPU_texture_format(read_tex) == GPU_texture_format(write_tex));
        }
        if (GPU_texture_samples(write_tex) != 0 ||
-               GPU_texture_samples(read_tex) != 0)
+           GPU_texture_samples(read_tex) != 0)
        {
                /* Can only blit multisample textures to another texture of the same size. */
                BLI_assert((fb_read->width == fb_write->width) &&
index 53ef9835d1d5402d29d094e4b5f0b4660ae4af11..eddd2b8582996e4f6d2f29c49493ebdfff559b3b 100644 (file)
@@ -2558,7 +2558,7 @@ GPUMaterial *GPU_material_from_nodetree(
 
 /* Calls this function if /a mat was created with deferred compilation.  */
 void GPU_material_generate_pass(
-               GPUMaterial *mat, const char *vert_code, const char *geom_code, const char *frag_lib, const char *defines)
+        GPUMaterial *mat, const char *vert_code, const char *geom_code, const char *frag_lib, const char *defines)
 {
        BLI_assert(mat->pass == NULL); /* Only run once! */
        if (mat->outlink) {
index f449d9b4cdde1a287ba8c90a30e7558a4f6a4aa6..bccc818aa3450703a40bf8756adbd3b576ba98f9 100644 (file)
@@ -471,8 +471,8 @@ static GPUTexture *GPU_texture_create_nD(
 
        /* Texture Parameters */
        if (GPU_texture_stencil(tex) || /* Does not support filtering */
-               GPU_texture_integer(tex) || /* Does not support filtering */
-               GPU_texture_depth(tex))
+           GPU_texture_integer(tex) || /* Does not support filtering */
+           GPU_texture_depth(tex))
        {
                glTexParameteri(tex->target_base, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
                glTexParameteri(tex->target_base, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
index b3dc9c5757774fb8312f1d67461cf5799e48dab3..ca7d153066f364f05e2938f89b95144f66af1614 100644 (file)
@@ -360,7 +360,7 @@ void RNA_api_scene(StructRNA *srna)
        RNA_def_boolean(func, "export_hair", 1, "Export Hair", "Exports hair particle systems as animated curves");
        RNA_def_boolean(func, "export_particles", 1, "Export Particles", "Exports non-hair particle systems");
        RNA_def_enum(func, "compression_type", rna_enum_abc_compression_items, 0, "Compression", "");
-       RNA_def_boolean(func, "packuv"          , 0, "Export with packed UV islands", "Export with packed UV islands");
+       RNA_def_boolean(func, "packuv", 0, "Export with packed UV islands", "Export with packed UV islands");
        RNA_def_float(func, "scale", 1.0f, 0.0001f, 1000.0f, "Scale", "Value by which to enlarge or shrink the objects with respect to the world's origin", 0.0001f, 1000.0f);
        RNA_def_boolean(func, "triangulate", 0, "Triangulate", "Export Polygons (Quads & NGons) as Triangles");
        RNA_def_enum(func, "quad_method", rna_enum_modifier_triangulate_quad_method_items, 0, "Quad Method", "Method for splitting the quads into triangles");
index c9b43cc2a91d504e1c39d92ad57b2b49e5a647d4..67b96f3d8b33302f339e4a9bb8c798ad4b02f18f 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/windowmanager/intern/wm_message_bus_rna.c
+/** \file blender/windowmanager/message_bus/intern/wm_message_bus_rna.c
  *  \ingroup wm
  */
 
+
 #include <stdio.h>
 #include "DNA_ID.h"