Fix T39921: Collada export creates invalid XML when using Track To constraint

Constraints are no ID...
This commit is contained in:
Bastien Montagne 2014-04-27 18:43:50 +02:00
parent 835765926f
commit f0ec202099
Notes: blender-bot 2023-02-14 10:44:51 +01:00
Referenced by issue #39921, Collada export creates invalid XML when using Track To constraint
1 changed files with 3 additions and 1 deletions

View File

@ -193,8 +193,10 @@ void SceneExporter::writeNodes(Object *ob, Scene *sce)
if (BLI_listbase_is_empty(&ob->constraints) == false) {
bConstraint *con = (bConstraint *) ob->constraints.first;
while (con) {
std::string con_name(id_name(con));
std::string con_name(translate_id(con->name));
std::string con_tag = con_name + "_constraint";
printf("%s\n", con_name.c_str());
printf("%s\n\n", con_tag.c_str());
colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"type",con->type);
colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"enforce",con->enforce);
colladaNode.addExtraTechniqueChildParameter("blender",con_tag,"flag",con->flag);