code cleanup: change order of args in void BKE_object_where_is_calc_time_ex() so...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 17 Feb 2013 03:57:20 +0000 (03:57 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 17 Feb 2013 03:57:20 +0000 (03:57 +0000)
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/rigidbody.c
source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
source/blender/editors/sculpt_paint/sculpt.c

index 19c04676548044c917f25a5e0484d155c93cb785..8a929297acf3a6e0f5d17a76fe0223b5f7438fd0 100644 (file)
@@ -103,7 +103,8 @@ struct Object *BKE_object_pose_armature_get(struct Object *ob);
 void BKE_object_where_is_calc(struct Scene *scene, struct Object *ob);
 void BKE_object_where_is_calc_ex(struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob);
 void BKE_object_where_is_calc_time(struct Scene *scene, struct Object *ob, float ctime);
-void BKE_object_where_is_calc_time_ex(struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob, float ctime);
+void BKE_object_where_is_calc_time_ex(struct Scene *scene, struct Object *ob, float ctime,
+                                      struct RigidBodyWorld *rbw);
 void BKE_object_where_is_calc_simul(struct Scene *scene, struct Object *ob);
 void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float obmat[4][4]);
 
index 117e9fe280cc2b097f741c1fc1afc7a589ae1b59..ef3c98ee3f4ee7b13e8f60789c7d8b3b5e382ed9 100644 (file)
@@ -2118,7 +2118,8 @@ static int where_is_object_parslow(Object *ob, float obmat[4][4], float slowmat[
 }
 
 /* note, scene is the active scene while actual_scene is the scene the object resides in */
-void BKE_object_where_is_calc_time_ex(Scene *scene,  RigidBodyWorld *rbw, Object *ob, float ctime)
+void BKE_object_where_is_calc_time_ex(Scene *scene, Object *ob, float ctime,
+                                      RigidBodyWorld *rbw)
 {
        if (ob == NULL) return;
        
@@ -2163,7 +2164,7 @@ void BKE_object_where_is_calc_time_ex(Scene *scene,  RigidBodyWorld *rbw, Object
 
 void BKE_object_where_is_calc_time(Scene *scene, Object *ob, float ctime)
 {
-       BKE_object_where_is_calc_time_ex(scene, NULL, ob, ctime);
+       BKE_object_where_is_calc_time_ex(scene, ob, ctime, NULL);
 }
 
 /* get object transformation matrix without recalculating dependencies and
@@ -2189,17 +2190,17 @@ void BKE_object_where_is_calc_mat4(Scene *scene, Object *ob, float obmat[4][4])
 
 void BKE_object_where_is_calc_ex(Scene *scene, RigidBodyWorld *rbw, Object *ob)
 {
-       BKE_object_where_is_calc_time_ex(scene, rbw, ob, BKE_scene_frame_get(scene));
+       BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), rbw);
 }
 void BKE_object_where_is_calc(Scene *scene, Object *ob)
 {
-       BKE_object_where_is_calc_time_ex(scene, NULL, ob, BKE_scene_frame_get(scene));
+       BKE_object_where_is_calc_time_ex(scene, ob, BKE_scene_frame_get(scene), NULL);
 }
 
-void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
 /* was written for the old game engine (until 2.04) */
 /* It seems that this function is only called
  * for a lamp that is the child of another object */
+void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
 {
        Object *par;
        float *fp1, *fp2;
index 26f0c25617f979429e4b517c2304f50b2aec724e..66edfe2fe157ba533e011ebd0185a13fffbf9dd9 100644 (file)
@@ -1308,7 +1308,7 @@ struct RigidBodyCon *BKE_rigidbody_create_constraint(Scene *scene, Object *ob, s
 struct RigidBodyWorld *BKE_rigidbody_get_world(Scene *scene) { return NULL; }
 void BKE_rigidbody_remove_object(Scene *scene, Object *ob) {}
 void BKE_rigidbody_remove_constraint(Scene *scene, Object *ob) {}
-void BKE_rigidbody_sync_transforms(Scene *scene, Object *ob, float ctime) {}
+void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime) {}
 void BKE_rigidbody_aftertrans_update(Object *ob, float loc[3], float rot[3], float quat[4], float rotAxis[3], float rotAngle) {}
 void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw) {}
 void BKE_rigidbody_do_simulation(Scene *scene, float ctime) {}
index cf379d91652f0e33aefc16a147a51b256b544ca3..b0fc21d4d5568d1f62df19facad980390dc63651 100644 (file)
@@ -115,8 +115,8 @@ void MovieDistortionOperation::executePixel(float output[4], float x, float y, P
 
 bool MovieDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
 {
-       const int marginX = this->m_width*0.15;
-       const int marginY = this->m_height*0.15;
+       const int marginX = this->m_width * 0.15;
+       const int marginY = this->m_height * 0.15;
 
        rcti newInput;
        newInput.xmin = input->xmin - marginX;
index 976181f837a233f595d86b88d5f554ecf52e6c18..342671698d23403c327e7db82127862edbd1fc71 100644 (file)
@@ -883,7 +883,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather)
 
 /* Return a multiplier for brush strength on a particular vertex. */
 static float tex_strength(SculptSession *ss, Brush *br,
-                                                 const float point[3],
+                          const float point[3],
                           const float len,
                           const float sculpt_normal[3],
                           const short vno[3],
@@ -1411,8 +1411,8 @@ static float bmesh_neighbor_average_mask(BMesh *bm, BMVert *v)
                for (i = 0; i < 3; i++) {
                        BMVert *v2 = adj_v[i];
                        float *vmask = CustomData_bmesh_get(&bm->vdata,
-                                                                                               v2->head.data,
-                                                                                               CD_PAINT_MASK);
+                                                           v2->head.data,
+                                                           CD_PAINT_MASK);
                        avg += (*vmask);
                        total++;
                }
@@ -1423,8 +1423,8 @@ static float bmesh_neighbor_average_mask(BMesh *bm, BMVert *v)
        }
        else {
                float *vmask = CustomData_bmesh_get(&bm->vdata,
-                                                                                       v->head.data,
-                                                                                       CD_PAINT_MASK);
+                                                       v->head.data,
+                                                       CD_PAINT_MASK);
                return (*vmask);
        }
 }
@@ -1938,11 +1938,11 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
                        if (sculpt_brush_test(&test, orig_data.co)) {
                                const float fade = bstrength * tex_strength(ss, brush,
-                                                                                                                       orig_data.co,
-                                                                                                                       test.dist,
+                                                                           orig_data.co,
+                                                                           test.dist,
                                                                            ss->cache->sculpt_normal_symm,
-                                                                                                                       orig_data.no,
-                                                                                                                       NULL, vd.mask ? *vd.mask : 0.0f);
+                                                                           orig_data.no,
+                                                                           NULL, vd.mask ? *vd.mask : 0.0f);
 
                                mul_v3_v3fl(proxy[vd.i], grab_delta, fade);
 
@@ -2077,11 +2077,11 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
                        if (sculpt_brush_test(&test, orig_data.co)) {
                                const float fade = bstrength * tex_strength(ss, brush,
-                                                                                                                       orig_data.co,
-                                                                                                                       test.dist,
+                                                                           orig_data.co,
+                                                                           test.dist,
                                                                            ss->cache->sculpt_normal_symm,
                                                                            orig_data.no,
-                                                                                                                       NULL, vd.mask ? *vd.mask : 0.0f);
+                                                                           NULL, vd.mask ? *vd.mask : 0.0f);
 
                                mul_v3_v3fl(proxy[vd.i], cono, fade);
 
@@ -2135,7 +2135,7 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod
                                                                            test.dist,
                                                                            ss->cache->sculpt_normal_symm,
                                                                            orig_data.no,
-                                                                   NULL, vd.mask ? *vd.mask : 0.0f);
+                                                                           NULL, vd.mask ? *vd.mask : 0.0f);
 
                                mul_v3_m4v3(proxy[vd.i], m, orig_data.co);
                                sub_v3_v3(proxy[vd.i], orig_data.co);
@@ -3005,7 +3005,7 @@ static void sculpt_topology_update(Sculpt *sd, Object *ob, Brush *brush)
 
                if (BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) {
                        BKE_pbvh_bmesh_update_topology(ss->pbvh, mode,
-                                                                                  ss->cache->location,
+                                                      ss->cache->location,
                                                       ss->cache->radius);
                }
 
@@ -3313,7 +3313,7 @@ static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm,
 typedef void (*BrushActionFunc)(Sculpt *sd, Object *ob, Brush *brush);
 
 static void do_radial_symmetry(Sculpt *sd, Object *ob, Brush *brush,
-                                                          BrushActionFunc action,
+                               BrushActionFunc action,
                                const char symm, const int axis,
                                const float feather)
 {
@@ -4077,7 +4077,7 @@ static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin)
                }
 
                if (BKE_pbvh_node_raycast(srd->ss->pbvh, node, origco, use_origco,
-                                                                 srd->ray_start, srd->ray_normal, &srd->dist))
+                                         srd->ray_start, srd->ray_normal, &srd->dist))
                {
                        srd->hit = 1;
                        *tmin = srd->dist;
@@ -4665,24 +4665,25 @@ static int sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *UNUSED(o
 }
 
 static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op,
-                                                                                                wmEvent *UNUSED(event))
+                                                 wmEvent *UNUSED(event))
 {
        Object *ob = CTX_data_active_object(C);
        Mesh *me = ob->data;
        SculptSession *ss = ob->sculpt;
        const char *msg = "Dynamic-topology sculpting will not preserve"
-                             "vertex colors, UVs, or other customdata";
+                         "vertex colors, UVs, or other customdata";
 
        if (!ss->bm) {
                int i;
 
                for (i = 0; i < CD_NUMTYPES; i++) {
                        if (!ELEM7(i, CD_MVERT, CD_MEDGE, CD_MFACE,
-                                          CD_MLOOP, CD_MPOLY, CD_PAINT_MASK,
-                                          CD_ORIGINDEX) &&
-                               (CustomData_has_layer(&me->vdata, i) ||
-                                CustomData_has_layer(&me->edata, i) ||
-                                CustomData_has_layer(&me->fdata, i))) {
+                                  CD_MLOOP, CD_MPOLY, CD_PAINT_MASK,
+                                  CD_ORIGINDEX) &&
+                           (CustomData_has_layer(&me->vdata, i) ||
+                            CustomData_has_layer(&me->edata, i) ||
+                            CustomData_has_layer(&me->fdata, i)))
+                       {
                                /* The mesh has customdata that will be lost, let the
                                 * user confirm this is OK */
                                return WM_operator_confirm_message(C, op, msg);
@@ -4763,8 +4764,8 @@ static int sculpt_symmetrize_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* Symmetrize and re-triangulate */
        BMO_op_callf(ss->bm, BMO_FLAG_DEFAULTS,
-                                "symmetrize input=%avef direction=%i",
-                                sd->symmetrize_direction);
+                    "symmetrize input=%avef direction=%i",
+                    sd->symmetrize_direction);
        sculpt_dynamic_topology_triangulate(ss->bm);
 
        /* Finish undo */