code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
This commit is contained in:
parent
9d060b0333
commit
0807c976f4
@ -169,7 +169,7 @@ int BKE_mesh_nurbs_displist_to_mdata(struct Object *ob, struct ListBase *dispbas
|
||||
struct MLoopUV **alluv, int *_totloop, int *_totpoly);
|
||||
void BKE_mesh_from_nurbs_displist(struct Object *ob, struct ListBase *dispbase, int use_orco_uv);
|
||||
void BKE_mesh_from_nurbs(struct Object *ob);
|
||||
void BKE_mesh_to_curve_ex(struct DerivedMesh *dm, struct ListBase *nurblist);
|
||||
void BKE_mesh_to_curve_nurblist(struct DerivedMesh *dm, struct ListBase *nurblist, const int edge_users_test);
|
||||
void BKE_mesh_to_curve(struct Scene *scene, struct Object *ob);
|
||||
void BKE_mesh_delete_material_index(struct Mesh *me, short index);
|
||||
void BKE_mesh_smooth_flag_set(struct Object *meshOb, int enableSmooth);
|
||||
|
@ -1586,7 +1586,7 @@ static void appendPolyLineVert(ListBase *lb, unsigned int index)
|
||||
BLI_addtail(lb, vl);
|
||||
}
|
||||
|
||||
void BKE_mesh_to_curve_ex(DerivedMesh *dm, ListBase *nurblist)
|
||||
void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int edge_users_test)
|
||||
{
|
||||
MVert *mverts = dm->getVertArray(dm);
|
||||
MEdge *med, *medge = dm->getEdgeArray(dm);
|
||||
@ -1616,10 +1616,8 @@ void BKE_mesh_to_curve_ex(DerivedMesh *dm, ListBase *nurblist)
|
||||
/* create edges from all faces (so as to find edges not in any faces) */
|
||||
med = medge;
|
||||
for (i = 0; i < totedge; i++, med++) {
|
||||
if (edge_users[i] == 0) {
|
||||
if (edge_users[i] == edge_users_test) {
|
||||
EdgeLink *edl = MEM_callocN(sizeof(EdgeLink), "EdgeLink");
|
||||
|
||||
// BLI_edgehash_insert(eh_edge, med->v1, med->v2, NULL);
|
||||
edl->edge = med;
|
||||
|
||||
BLI_addtail(&edges, edl); totedges++;
|
||||
@ -1728,7 +1726,7 @@ void BKE_mesh_to_curve(Scene *scene, Object *ob)
|
||||
ListBase nurblist = {NULL, NULL};
|
||||
bool needsFree = false;
|
||||
|
||||
BKE_mesh_to_curve_ex(dm, &nurblist);
|
||||
BKE_mesh_to_curve_nurblist(dm, &nurblist, 0);
|
||||
|
||||
if (nurblist.first) {
|
||||
Curve *cu = BKE_curve_add(G.main, ob->id.name + 2, OB_CURVE);
|
||||
|
@ -201,16 +201,16 @@ static float sb_time_scale(Object *ob)
|
||||
if (sb) {
|
||||
return(sb->physics_speed);
|
||||
/* hrms .. this could be IPO as well :)
|
||||
estimated range [0.001 sluggish slug - 100.0 very fast (i hope ODE solver can handle that)]
|
||||
1 approx = a unit 1 pendulum at g = 9.8 [earth conditions] has period 65 frames
|
||||
theory would give a 50 frames period .. so there must be something inaccurate .. looking for that (BM)
|
||||
* estimated range [0.001 sluggish slug - 100.0 very fast (i hope ODE solver can handle that)]
|
||||
* 1 approx = a unit 1 pendulum at g = 9.8 [earth conditions] has period 65 frames
|
||||
* theory would give a 50 frames period .. so there must be something inaccurate .. looking for that (BM)
|
||||
*/
|
||||
}
|
||||
return (1.0f);
|
||||
/*
|
||||
this would be frames/sec independent timing assuming 25 fps is default
|
||||
but does not work very well with NLA
|
||||
return (25.0f/scene->r.frs_sec)
|
||||
* this would be frames/sec independent timing assuming 25 fps is default
|
||||
* but does not work very well with NLA
|
||||
* return (25.0f/scene->r.frs_sec)
|
||||
*/
|
||||
}
|
||||
/*--- frame based timing ---*/
|
||||
@ -1305,7 +1305,7 @@ static int sb_detect_face_collisionCached(float face_v1[3], float face_v2[3], fl
|
||||
normalize_v3(d_nvect);
|
||||
if (
|
||||
/* isect_line_tri_v3(nv1, nv3, face_v1, face_v2, face_v3, &t, NULL) ||
|
||||
we did that edge already */
|
||||
* we did that edge already */
|
||||
isect_line_tri_v3(nv3, nv4, face_v1, face_v2, face_v3, &t, NULL) ||
|
||||
isect_line_tri_v3(nv4, nv1, face_v1, face_v2, face_v3, &t, NULL) ) {
|
||||
Vec3PlusStVec(force, -0.5f, d_nvect);
|
||||
|
@ -56,9 +56,10 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[4][4],
|
||||
// XXX Why are joints handled differently ?
|
||||
node.addMatrix("transform", dmat);
|
||||
}
|
||||
else
|
||||
else {
|
||||
add_transform(node, loc, rot, scale);
|
||||
}
|
||||
}
|
||||
|
||||
void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob, BC_export_transformation_type transformation_type)
|
||||
{
|
||||
|
@ -287,7 +287,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve
|
||||
/* XXX: meh, this is round about because
|
||||
* BKE_brush_jitter_pos isn't written in the best way to
|
||||
* be reused here */
|
||||
if(factor != 1.0) {
|
||||
if(factor != 1.0f) {
|
||||
sub_v2_v2v2(delta, mouse_out, mouse_in);
|
||||
mul_v2_fl(delta, factor);
|
||||
add_v2_v2v2(mouse_out, mouse_in, delta);
|
||||
|
Loading…
Reference in New Issue
Block a user