diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-17 07:57:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-17 07:57:20 +0400 |
commit | 2e0017efd4d6858a1d4d78dc5e72fdd2f1aafaa9 (patch) | |
tree | 04e8bda50eb5da635a5c72e43bdb1ce271e09673 /source | |
parent | 39ee06421c63f52afa2a544cf090cb62be954b94 (diff) |
code cleanup: change order of args in void BKE_object_where_is_calc_time_ex() so extra arg is at the end (loose convention for *_ex() funcs). also some style cleanup.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_object.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/rigidbody.c | 2 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.cpp | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 51 |
5 files changed, 37 insertions, 34 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 19c04676548..8a929297acf 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -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]); diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 117e9fe280c..ef3c98ee3f4 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -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; diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 26f0c25617f..66edfe2fe15 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -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) {} diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index cf379d91652..b0fc21d4d55 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -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; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 976181f837a..342671698d2 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -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 */ |