to indicate bugs, left a comment about those.
std::vector<float> fra;
//char prefix[256];
- FCurve *fcu = (FCurve *)ob_arm->adt->action->curves.first;
-
//Check if there is a fcurve in the armature for the bone in param
//when baking this check is not needed, solve every bone for every frame.
- /*while (fcu) {
+ /*FCurve *fcu = (FCurve *)ob_arm->adt->action->curves.first;
+
+ while (fcu) {
std::string bone_name = getObjectBoneName(ob_arm, fcu);
int val = BLI_strcasecmp((char *)bone_name.c_str(), bone->name);
if (val == 0) break;
bPoseChannel *parchan = NULL;
bPoseChannel *pchan = NULL;
- bPoseChannel *rootchan = NULL;
-
+
if (ob->type == OB_ARMATURE ){
bPose *pose = ob->pose;
pchan = BKE_pose_channel_find_name(pose, bone->name);
return true;
}
+#if 0
void ArmatureExporter::operator()(Object *ob)
{
Object *ob_arm = bc_get_assigned_armature(ob);
}
-#if 0
bool ArmatureExporter::already_written(Object *ob_arm)
{
void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW::Node& node)
{
- bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name);
+ //bPoseChannel *pchan = BKE_pose_channel_find_name(ob_arm->pose, bone->name);
float mat[4][4];
//void export_controllers(Scene *sce);*/
- void operator()(Object *ob);
+ //void operator()(Object *ob);
private:
Scene *scene;
void ArmatureImporter::fix_leaf_bones( )
{
// just setting tail for leaf bones here
- float correctionMin = 1.0f;
std::vector<LeafBone>::iterator it;
for (it = leaf_bones.begin(); it != leaf_bones.end(); it++) {
LeafBone& leaf = *it;
mul_v3_fl(vec, leaf_bone_length);
add_v3_v3v3(leaf.bone->tail, leaf.bone->head , vec);
- }
+ }
}
#if 0
float mat[4][4];
float obmat[4][4];
- float angle = 0.0f;
-
// object-space
get_node_mat(obmat, root_node, NULL, NULL);
}
+ //float angle = 0.0f;
///*mat4_to_axis_angle(ax, &angle, mat);
//pchan->bone->roll = angle;*/
//skip the basis
kb = kb->next;
for (; kb; kb = kb->next) {
+ // XXX why is the weight not used here and set to 0.0?
float weight = kb->curval;
extra.addExtraTechniqueParameter ("KHR", "morph_weights" , 0.000, "MORPH_WEIGHT_TO_TARGET");
}
std::string name;
short* type = 0;
et->setData("type", type);
- bConstraint * con = BKE_add_ob_constraint(ob, "Test_con", *type);
+ BKE_add_ob_constraint(ob, "Test_con", *type);
}
}
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
bool read_transform = true;
- ExtraTags *et = getExtraTags(node->getUniqueId());
-
std::vector<Object *> *objects_done = new std::vector<Object *>();
if (is_joint) {
cti->get_constraint_targets(con, &targets);
if(cti){
- int i = 1;
for (ct = (bConstraintTarget*)targets.first; ct; ct = ct->next){
obtar = ct->tar;
std::string tar_id(id_name(obtar));
COLLADAFW::Transformation::TransformationType type = tm->getTransformationType();
if(type == COLLADAFW::Transformation::MATRIX){
+ // XXX why does this return and discard all following transformations?
dae_matrix_to_mat4(tm, mat);
return;
}