Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2011-01-27 22:39:06 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2011-01-27 22:39:06 +0300
commit71cb7459413160b47a47bbf0d45171ff0905a6c3 (patch)
tree8115760672463426c0a2f774977ea11374cd1018 /source/blender/collada/GeometryExporter.cpp
parentba9dacbd3dc7e0ff80b2bb7e54dd2c1532db5512 (diff)
Commit to cope with API changes in OpenCOLLADA (latest for Windows right now r827).
Diffstat (limited to 'source/blender/collada/GeometryExporter.cpp')
-rw-r--r--source/blender/collada/GeometryExporter.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index 7b5b5397955..73ad6f475de 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -92,9 +92,9 @@ void GeometryExporter::operator()(Object *ob)
// <vertices>
COLLADASW::Vertices verts(mSW);
- verts.setId(getIdBySemantics(geom_id, COLLADASW::VERTEX));
+ verts.setId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::VERTEX));
COLLADASW::InputList &input_list = verts.getInputList();
- COLLADASW::Input input(COLLADASW::POSITION, getUrlBySemantics(geom_id, COLLADASW::POSITION));
+ COLLADASW::Input input(COLLADASW::InputSemantic::POSITION, getUrlBySemantics(geom_id, COLLADASW::InputSemantic::POSITION));
input_list.push_back(input);
verts.add();
@@ -168,10 +168,10 @@ void GeometryExporter::createPolylist(int material_index,
COLLADASW::InputList &til = polylist.getInputList();
// creates <input> in <polylist> for vertices
- COLLADASW::Input input1(COLLADASW::VERTEX, getUrlBySemantics(geom_id, COLLADASW::VERTEX), 0);
+ COLLADASW::Input input1(COLLADASW::InputSemantic::VERTEX, getUrlBySemantics(geom_id, COLLADASW::InputSemantic::VERTEX), 0);
// creates <input> in <polylist> for normals
- COLLADASW::Input input2(COLLADASW::NORMAL, getUrlBySemantics(geom_id, COLLADASW::NORMAL), 1);
+ COLLADASW::Input input2(COLLADASW::InputSemantic::NORMAL, getUrlBySemantics(geom_id, COLLADASW::InputSemantic::NORMAL), 1);
til.push_back(input1);
til.push_back(input2);
@@ -181,7 +181,7 @@ void GeometryExporter::createPolylist(int material_index,
for (i = 0; i < num_layers; i++) {
// char *name = CustomData_get_layer_name(&me->fdata, CD_MTFACE, i);
- COLLADASW::Input input3(COLLADASW::TEXCOORD,
+ COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD,
makeUrl(makeTexcoordSourceId(geom_id, i)),
2, // offset always 2, this is only until we have optimized UV sets
i // set number equals UV layer index
@@ -190,7 +190,7 @@ void GeometryExporter::createPolylist(int material_index,
}
if (has_color) {
- COLLADASW::Input input4(COLLADASW::COLOR, getUrlBySemantics(geom_id, COLLADASW::COLOR), has_uvs ? 3 : 2);
+ COLLADASW::Input input4(COLLADASW::InputSemantic::COLOR, getUrlBySemantics(geom_id, COLLADASW::InputSemantic::COLOR), has_uvs ? 3 : 2);
til.push_back(input4);
}
@@ -240,8 +240,8 @@ void GeometryExporter::createVertsSource(std::string geom_id, Mesh *me)
MVert *verts = me->mvert;
COLLADASW::FloatSourceF source(mSW);
- source.setId(getIdBySemantics(geom_id, COLLADASW::POSITION));
- source.setArrayId(getIdBySemantics(geom_id, COLLADASW::POSITION) +
+ source.setId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::POSITION));
+ source.setArrayId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::POSITION) +
ARRAY_ID_SUFFIX);
source.setAccessorCount(totverts);
source.setAccessorStride(3);
@@ -274,8 +274,8 @@ void GeometryExporter::createVertexColorSource(std::string geom_id, Mesh *me)
totcolor += f->v4 ? 4 : 3;
COLLADASW::FloatSourceF source(mSW);
- source.setId(getIdBySemantics(geom_id, COLLADASW::COLOR));
- source.setArrayId(getIdBySemantics(geom_id, COLLADASW::COLOR) + ARRAY_ID_SUFFIX);
+ source.setId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::COLOR));
+ source.setArrayId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::COLOR) + ARRAY_ID_SUFFIX);
source.setAccessorCount(totcolor);
source.setAccessorStride(3);
@@ -302,7 +302,7 @@ std::string GeometryExporter::makeTexcoordSourceId(std::string& geom_id, int lay
{
char suffix[20];
sprintf(suffix, "-%d", layer_index);
- return getIdBySemantics(geom_id, COLLADASW::TEXCOORD) + suffix;
+ return getIdBySemantics(geom_id, COLLADASW::InputSemantic::TEXCOORD) + suffix;
}
//creates <source> for texcoords
@@ -373,8 +373,8 @@ void GeometryExporter::createNormalsSource(std::string geom_id, Mesh *me, std::v
#endif
COLLADASW::FloatSourceF source(mSW);
- source.setId(getIdBySemantics(geom_id, COLLADASW::NORMAL));
- source.setArrayId(getIdBySemantics(geom_id, COLLADASW::NORMAL) +
+ source.setId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::NORMAL));
+ source.setArrayId(getIdBySemantics(geom_id, COLLADASW::InputSemantic::NORMAL) +
ARRAY_ID_SUFFIX);
source.setAccessorCount((unsigned long)nor.size());
source.setAccessorStride(3);
@@ -444,12 +444,12 @@ void GeometryExporter::create_normals(std::vector<Normal> &nor, std::vector<Face
}
}
-std::string GeometryExporter::getIdBySemantics(std::string geom_id, COLLADASW::Semantics type, std::string other_suffix) {
+std::string GeometryExporter::getIdBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix) {
return geom_id + getSuffixBySemantic(type) + other_suffix;
}
-COLLADASW::URI GeometryExporter::getUrlBySemantics(std::string geom_id, COLLADASW::Semantics type, std::string other_suffix) {
+COLLADASW::URI GeometryExporter::getUrlBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix) {
std::string id(getIdBySemantics(geom_id, type, other_suffix));
return COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, id);