}
/* 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;
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
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;
/* 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],
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++;
}
}
else {
float *vmask = CustomData_bmesh_get(&bm->vdata,
- v->head.data,
- CD_PAINT_MASK);
+ v->head.data,
+ CD_PAINT_MASK);
return (*vmask);
}
}
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);
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);
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);
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);
}
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)
{
}
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;
}
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);
/* 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 */