Cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Fri, 29 Mar 2019 20:13:55 +0000 (07:13 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 29 Mar 2019 20:14:28 +0000 (07:14 +1100)
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenloader/intern/readfile.c
source/blender/draw/intern/draw_cache_impl_displist.c
source/blender/editors/curve/editcurve.c
source/blender/editors/gpencil/gpencil_fill.c
source/blender/makesrna/intern/rna_space.c
source/blender/nodes/shader/nodes/node_shader_tex_coord.c
source/blender/python/intern/bpy_msgbus.c

index 875ff1851843cf182e5d26933dde89c326d6d628..6d9be9fb639a7a2bfba1e447dfd84d79fa058555 100644 (file)
@@ -995,7 +995,7 @@ static void mesh_calc_modifier_final_normals(
         const Mesh *mesh_input,
         const CustomData_MeshMasks *dataMask,
         const bool sculpt_dyntopo,
-               Mesh *mesh_final)
+        Mesh *mesh_final)
 {
        /* Compute normals. */
        const bool do_loop_normals = ((mesh_input->flag & ME_AUTOSMOOTH) != 0 ||
@@ -1517,7 +1517,7 @@ bool editbmesh_modifier_is_enabled(Scene *scene, ModifierData *md, bool has_prev
 static void editbmesh_calc_modifier_final_normals(
         const Mesh *mesh_input,
         const CustomData_MeshMasks *dataMask,
-               Mesh *mesh_final)
+        Mesh *mesh_final)
 {
        const bool do_loop_normals = ((mesh_input->flag & ME_AUTOSMOOTH) != 0 ||
                                      (dataMask->lmask & CD_MASK_NORMAL) != 0);
index f1aecc92bfd37fdcafe9a8112ca26a1af485f6a4..f6742ac55cdd1e19e05d1fa3c77bc4e5c4b8e5b8 100644 (file)
@@ -2617,8 +2617,7 @@ static void lib_link_brush(FileData *fd, Main *main)
                        brush->paint_curve = newlibadr_us(fd, brush->id.lib, brush->paint_curve);
 
                        /* link default grease pencil palette */
-                       if (brush->gpencil_settings != NULL)
-                       {
+                       if (brush->gpencil_settings != NULL) {
                                if (brush->gpencil_settings->flag & GP_BRUSH_MATERIAL_PINNED) {
                                        brush->gpencil_settings->material = newlibadr_us(fd, brush->id.lib, brush->gpencil_settings->material);
 
index dfac50e084cff47a481130be6640aa655e9b4950..4dfe71df36ca491d22c9e5bf166b4783d75de681 100644 (file)
@@ -621,7 +621,7 @@ void DRW_displist_indexbuf_create_edges_adjacency_lines(struct ListBase *lb, str
        EdgeHash *eh = BLI_edgehash_new_ex(__func__, tri_len * 3);
 
        /* pack values to pass to `set_edges_adjacency_lines_indices` function. */
-       void* thunk[3] = {&elb,eh, r_is_manifold};
+       void *thunk[3] = {&elb, eh, r_is_manifold};
        int v_idx = 0;
        for (const DispList *dl = lb->first; dl; dl = dl->next) {
                displist_indexbufbuilder_set(
index 3a284d80e5faf17674776a43c8a530e782609e11..10729ecaa5e0232052e48522cf9298169a128f70 100644 (file)
@@ -4319,7 +4319,7 @@ static bool merge_2_nurb(Curve *cu, ListBase *editnurb, Nurb *nu1, Nurb *nu2)
                if (len1 < len2) {
                        bp2 = &nu2->bp[v * nu2->pntsu];
                }
-               else             {
+               else {
                        bp2 = &nu2->bp[(nu1->pntsv - v - 1) * nu2->pntsu];
                }
 
index 17cb21d62bd7fc971a999b8dc55692f70a248586..5922872070d7a11b6f01c24c628498ac2be2230a 100644 (file)
@@ -1156,8 +1156,9 @@ static bool gpencil_fill_poll(bContext *C)
                ScrArea *sa = CTX_wm_area(C);
                if (sa->spacetype == SPACE_VIEW3D) {
                        if ((obact == NULL) ||
-                               (obact->type != OB_GPENCIL) ||
-                               (obact->mode != OB_MODE_PAINT_GPENCIL)) {
+                           (obact->type != OB_GPENCIL) ||
+                           (obact->mode != OB_MODE_PAINT_GPENCIL))
+                       {
                                return false;
                        }
 
index 78b702dfd0b4318ad01923f541c3d2c47cbd87e0..97b997c46042284ff19008e7fc2249f1d0651082 100644 (file)
@@ -661,7 +661,7 @@ static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA
                DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
        }
 
-       View3DShading *shading = (View3DShading*)ptr->data;
+       View3DShading *shading = ptr->data;
        if (shading->type == OB_MATERIAL ||
            (shading->type == OB_RENDER && (strcmp(scene->r.engine, RE_engine_id_BLENDER_EEVEE) == 0 ||
                                            strcmp(scene->r.engine, RE_engine_id_CYCLES)))) {
index 08dbeb5454fa3ecf803c9306a79c4bf8ed79851a..dfd5a46d4c7bcbad89de1e976fe7c49cb8f8b748 100644 (file)
@@ -39,7 +39,7 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *node, bNodeExecDat
        Object *ob = (Object *)node->id;
        invert_m4_m4(ob->imat, ob->obmat);
 
-       GPUNodeLink *inv_obmat = (ob != NULL) ? GPU_uniform((float*)ob->imat) : GPU_builtin(GPU_INVERSE_OBJECT_MATRIX);
+       GPUNodeLink *inv_obmat = (ob != NULL) ? GPU_uniform(&ob->imat[0][0]) : GPU_builtin(GPU_INVERSE_OBJECT_MATRIX);
 
        GPUNodeLink *orco = GPU_attribute(CD_ORCO, "");
        GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, "");
index 08ed60b5073f13efdfe6a865d30957c481f15e19..bfcf089fb60663e96261931dfa931afe54e402ed 100644 (file)
@@ -247,11 +247,11 @@ static PyObject *bpy_msgbus_subscribe_rna(PyObject *UNUSED(self), PyObject *args
        int options = 0;
 
        if (PyTuple_GET_SIZE(args) != 0) {
-                       PyErr_Format(
-                               PyExc_TypeError,
-                               "%s: only keyword arguments are supported",
-                               error_prefix);
-                       return NULL;
+               PyErr_Format(
+                       PyExc_TypeError,
+                       "%s: only keyword arguments are supported",
+                       error_prefix);
+               return NULL;
        }
        static const char *_keywords[] = {
                "key",
@@ -343,11 +343,11 @@ static PyObject *bpy_msgbus_publish_rna(PyObject *UNUSED(self), PyObject *args,
        PyObject *py_sub = NULL;
 
        if (PyTuple_GET_SIZE(args) != 0) {
-                       PyErr_Format(
-                               PyExc_TypeError,
-                               "%s: only keyword arguments are supported",
-                               error_prefix);
-                       return NULL;
+               PyErr_Format(
+                       PyExc_TypeError,
+                       "%s: only keyword arguments are supported",
+                       error_prefix);
+               return NULL;
        }
        static const char *_keywords[] = {
                "key",