Cleanup: style, warning
authorCampbell Barton <ideasman42@gmail.com>
Mon, 22 Oct 2018 23:53:40 +0000 (10:53 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 23 Oct 2018 00:01:25 +0000 (11:01 +1100)
source/blender/blenkernel/intern/particle_distribute.c
source/blender/draw/engines/gpencil/gpencil_draw_utils.c
source/blender/draw/intern/draw_cache.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/space_outliner/outliner_dragdrop.c
source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
source/blender/makesrna/intern/rna_gpencil_modifier.c

index 2e056aa7a3f43bb2c0cb2187e44ec8af5a095e51..6c5a9085e71d8b1a0009f188f16d43b012fe01e9 100644 (file)
@@ -478,7 +478,7 @@ static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, i
                int w, maxw;
 
                psys_particle_on_dm(ctx->mesh,from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co1,0,0,0,orco1,0);
-               BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
+               BKE_mesh_orco_verts_transform(ob->data, &orco1, 1, 1);
                maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,ptn,3);
 
                for (w=0; w<maxw; w++) {
@@ -671,7 +671,7 @@ static void distribute_children_exec(ParticleTask *thread, ChildParticle *cpa, i
                float pweight[10];
 
                psys_particle_on_dm(mesh,cfrom,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,co1,nor1,NULL,NULL,orco1);
-               BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco1, 1, 1);
+               BKE_mesh_orco_verts_transform(ob->data, &orco1, 1, 1);
                maxw = BLI_kdtree_find_nearest_n(ctx->tree,orco1,ptn,3);
 
                maxd=ptn[maxw-1].dist;
@@ -903,7 +903,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
 
                for (p=0,pa=psys->particles; p<totpart; p++,pa++) {
                        psys_particle_on_dm(mesh,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,nor,0,0,orco);
-                       BKE_mesh_orco_verts_transform((Mesh*)ob->data, &orco, 1, 1);
+                       BKE_mesh_orco_verts_transform(ob->data, &orco, 1, 1);
                        BLI_kdtree_insert(tree, p, orco);
                }
 
@@ -944,7 +944,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
                        for (p=0; p<totvert; p++) {
                                if (orcodata) {
                                        copy_v3_v3(co,orcodata[p]);
-                                       BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co, 1, 1);
+                                       BKE_mesh_orco_verts_transform(ob->data, &co, 1, 1);
                                }
                                else
                                        copy_v3_v3(co,mv[p].co);
@@ -977,7 +977,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
        jitter_offset    = MEM_callocN(sizeof(float) * totelem, "particle_distribution_jitoff");
 
        /* Calculate weights from face areas */
-       if ((part->flag&PART_EDISTR || children) && from != PART_FROM_VERT) {
+       if ((part->flag & PART_EDISTR || children) && from != PART_FROM_VERT) {
                MVert *v1, *v2, *v3, *v4;
                float totarea=0.f, co1[3], co2[3], co3[3], co4[3];
                float (*orcodata)[3];
@@ -991,12 +991,12 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
                                copy_v3_v3(co1, orcodata[mf->v1]);
                                copy_v3_v3(co2, orcodata[mf->v2]);
                                copy_v3_v3(co3, orcodata[mf->v3]);
-                               BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co1, 1, 1);
-                               BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co2, 1, 1);
-                               BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co3, 1, 1);
+                               BKE_mesh_orco_verts_transform(ob->data, &co1, 1, 1);
+                               BKE_mesh_orco_verts_transform(ob->data, &co2, 1, 1);
+                               BKE_mesh_orco_verts_transform(ob->data, &co3, 1, 1);
                                if (mf->v4) {
                                        copy_v3_v3(co4, orcodata[mf->v4]);
-                                       BKE_mesh_orco_verts_transform((Mesh*)ob->data, &co4, 1, 1);
+                                       BKE_mesh_orco_verts_transform(ob->data, &co4, 1, 1);
                                }
                        }
                        else {
index 4375d62f4b28528cabf46386d163403d5c8dae29..641229446b9ffac28f089a39366113fa7694823c 100644 (file)
@@ -1283,8 +1283,8 @@ void DRW_gpencil_populate_datablock(
                }
                else {
                        int remap_cfra = BKE_gpencil_time_modifier(
-                                                                                       draw_ctx->depsgraph, scene,ob, gpl, cfra_eval,
-                                                                                       stl->storage->is_render);
+                               draw_ctx->depsgraph, scene, ob, gpl, cfra_eval,
+                               stl->storage->is_render);
 
                        gpf = BKE_gpencil_layer_getframe(gpl, remap_cfra, GP_GETFRAME_USE_PREV);
                }
index 576d17d5d2e2c6db77bdfee7aaa53d86c2bc9568..f2f99953418406267f08976e0c71884a17cc7c56 100644 (file)
@@ -698,7 +698,7 @@ void DRW_cache_object_face_wireframe_get(
 {
        switch (ob->type) {
                case OB_MESH:
-                       DRW_mesh_batch_cache_get_wireframes_face_texbuf((Mesh *)ob->data, r_vert_tx, r_faceid_tx, r_tri_count);
+                       DRW_mesh_batch_cache_get_wireframes_face_texbuf(ob->data, r_vert_tx, r_faceid_tx, r_tri_count);
 
                /* TODO, should match 'DRW_cache_object_surface_get' */
        }
index f5d14330499673dad688e009ef1d75f455767091..a3edde2cb6ad79609c5c06f1cec989681f96b4d6 100644 (file)
@@ -1663,7 +1663,7 @@ static uiLayout *gpencil_draw_modifier(
                        uiLayoutSetEnabled(sub, false);
                }
                uiItemEnumO(sub, "OBJECT_OT_gpencil_modifier_apply", CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
-                               0, "apply_as", MODIFIER_APPLY_DATA);
+                           0, "apply_as", MODIFIER_APPLY_DATA);
                uiItemO(row, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Copy"), ICON_NONE,
                        "OBJECT_OT_gpencil_modifier_copy");
 
index 66052166bf7ec1c76c25471684a51e5f3987750c..f5b25554708f74714fdce69ad9dd5db26178a1df 100644 (file)
@@ -253,8 +253,8 @@ static bool parent_drop_allowed(SpaceOops *soops, TreeElement *te, Object *poten
                */
        if (scene) {
                for (ViewLayer *view_layer = scene->view_layers.first;
-                               view_layer;
-                               view_layer = view_layer->next)
+                    view_layer;
+                    view_layer = view_layer->next)
                {
                        if (BKE_view_layer_base_find(view_layer, potential_child)) {
                                return true;
index 32d3d69050c74fc79c982059226b1e419a161cf9..deb85d36dffa4acdce2c637df74a886e0b5a0221 100644 (file)
@@ -63,8 +63,9 @@ static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
        BKE_gpencil_modifier_copyData_generic(md, target);
 }
 
-static int remapTime(struct GpencilModifierData *md, struct Depsgraph *UNUSED(depsgraph),
-       struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, int cfra)
+static int remapTime(
+        struct GpencilModifierData *md, struct Depsgraph *UNUSED(depsgraph),
+        struct Scene *scene, struct Object *UNUSED(ob), struct bGPDlayer *gpl, int cfra)
 {
        TimeGpencilModifierData *mmd = (TimeGpencilModifierData *)md;
        const int sfra = scene->r.sfra;
@@ -107,7 +108,7 @@ GpencilModifierTypeInfo modifierType_Gpencil_Time = {
        /* structSize */        sizeof(TimeGpencilModifierData),
        /* type */              eGpencilModifierTypeType_Gpencil,
        /* flags */             eGpencilModifierTypeFlag_Single |
-                                                       eGpencilModifierTypeFlag_NoApply,
+                               eGpencilModifierTypeFlag_NoApply,
 
        /* copyData */          copyData,
 
index 032cf01c57d89e9d40ed7ea98c8720a8afd9a1a0..51c6f0db69834412308be9d7b24fbf4df7286671 100644 (file)
@@ -746,13 +746,13 @@ static void rna_def_modifier_gpenciltime(BlenderRNA *brna)
        RNA_def_property_int_sdna(prop, NULL, "offset");
        RNA_def_property_range(prop, -INT_MAX, INT_MAX);
        RNA_def_property_ui_text(prop, "Offset",
-                       "Number of frames to offset original keyframe number");
+                                "Number of frames to offset original keyframe number");
        RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 
        prop = RNA_def_property(srna, "use_keep_loop", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TIME_KEEP_LOOP);
        RNA_def_property_ui_text(prop, "Keep Loop",
-               "Retiming end frames and move to start of animation to keep loop");
+                                "Retiming end frames and move to start of animation to keep loop");
        RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
 }