Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Tue, 5 Jun 2018 19:32:49 +0000 (21:32 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 5 Jun 2018 19:32:49 +0000 (21:32 +0200)
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/studiolight.c
source/blender/draw/engines/workbench/workbench_data.c
source/blender/draw/intern/draw_cache_impl_mesh.c
source/tools

index 522ed65174c92ebb6e66a4eef7aad5b2ae71ffd2..3951f15a50d52bc9cfe65e996b585c0517a2b144 100644 (file)
@@ -2875,8 +2875,7 @@ Mesh *BKE_object_get_pre_modified_mesh(Object *object)
        if (object->runtime.mesh_orig != NULL) {
                BLI_assert(object->id.tag & LIB_TAG_COPIED_ON_WRITE);
                BLI_assert(object->id.orig_id != NULL);
-               BLI_assert(object->runtime.mesh_orig->id.orig_id ==
-                          ((Object*)object->id.orig_id)->data);
+               BLI_assert(object->runtime.mesh_orig->id.orig_id == ((Object *)object->id.orig_id)->data);
                Mesh *result = object->runtime.mesh_orig;
                BLI_assert((result->id.tag & LIB_TAG_COPIED_ON_WRITE) != 0);
                BLI_assert((result->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0);
@@ -2900,7 +2899,7 @@ Mesh *BKE_object_get_original_mesh(Object *object)
        }
        else {
                BLI_assert((object->id.tag & LIB_TAG_COPIED_ON_WRITE) != 0);
-               result = ((Object*)object->id.orig_id)->data;
+               result = ((Object *)object->id.orig_id)->data;
        }
        BLI_assert(result != NULL);
        BLI_assert((result->id.tag & (LIB_TAG_COPIED_ON_WRITE | LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT)) == 0);
index 0d44509ae652a50a85ed935c48aebc94c4e5856c..8ebc8f7e082d58d0183498aad9f39fbd9649bf39 100644 (file)
@@ -586,15 +586,13 @@ static uint *studiolight_matcap_preview(StudioLight *sl, int icon_size)
 
        uint *rect = MEM_mallocN(icon_size * icon_size * sizeof(uint), __func__);
        int offset = 0;
-       ImBuf* ibuf = sl->equirectangular_radiance_buffer;
-       for (int y= 0; y < icon_size; y ++)
-       {
-               for (int x = 0; x < icon_size; x ++)
-               {
+       ImBuf *ibuf = sl->equirectangular_radiance_buffer;
+       for (int y = 0; y < icon_size; y++) {
+               for (int x = 0; x < icon_size; x++) {
                        uint pixelresult = 0x0;
                        float fx = x * ibuf->x / icon_size;
                        float fy = y * ibuf->y / icon_size;
-                       nearest_interpolation_color(ibuf, (unsigned char*)&pixelresult, NULL, fx, fy);
+                       nearest_interpolation_color(ibuf, (uchar *)&pixelresult, NULL, fx, fy);
                        rect[offset++] = pixelresult;
                }
        }
index 4eca3acf238edd2ecc0b5d445d66a3a30047cb9d..7468d7489865181936ba8411c34bfeadfe72ad0b 100644 (file)
@@ -16,9 +16,12 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
                wpd->shading = v3d->shading;
                wpd->drawtype = v3d->drawtype;
                if (wpd->shading.light == V3D_LIGHTING_MATCAP) {
-                       wpd->studio_light = BKE_studiolight_find(wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
-               } else {
-                       wpd->studio_light = BKE_studiolight_find(wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
+                       wpd->studio_light = BKE_studiolight_find(
+                               wpd->shading.matcap, STUDIOLIGHT_ORIENTATION_VIEWNORMAL);
+               }
+               else {
+                       wpd->studio_light = BKE_studiolight_find(
+                               wpd->shading.studio_light, STUDIOLIGHT_ORIENTATION_CAMERA | STUDIOLIGHT_ORIENTATION_WORLD);
                }
        }
        else {
index fa78e143e9872d6d6c8707883c570723833f4095..53b3cadafe2e526e85c656a79a455c27c4251985 100644 (file)
@@ -3438,8 +3438,8 @@ static Gwn_VertBuf *mesh_batch_cache_create_edges_overlay_adj_texture_buf(MeshRe
                        GWN_vertbuf_attr_set(vbo, index_id, vidx++, &value);
 
                        if (do_adjacency) {
-                               int v1 = mloop[mlt->tri[(e+1) % 3]].v;
-                               int v2 = mloop[mlt->tri[(e+2) % 3]].v;
+                               int v1 = mloop[mlt->tri[(e + 1) % 3]].v;
+                               int v2 = mloop[mlt->tri[(e + 2) % 3]].v;
                                EdgeAdjacentVerts *eav = BLI_edgehash_lookup(eh, v0, v1);
                                int adj_v;
                                if (eav->vert_index[0] != v2) {
index 48736838d421447d5e4d67ccd59bf1d22dcc85d9..fca325137b6ee2dfd0930ca87684ccf30703554f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 48736838d421447d5e4d67ccd59bf1d22dcc85d9
+Subproject commit fca325137b6ee2dfd0930ca87684ccf30703554f