summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-02-17 03:01:04 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-02-17 03:01:04 +0200
commit8920beabc4b01dfdbd8eb3bbe33deefe03896f7d (patch)
tree69cbe6085e566490cb239178afdc87961c626ca9 /indra
parent72685fe1cb6faffa648cc46259699097033a31e3 (diff)
MAINT-5678 Improvement: ImporterPreprocessDAE debug setting to disable DAE preprocessing when needed
Diffstat (limited to 'indra')
-rw-r--r--indra/llprimitive/lldaeloader.cpp17
-rw-r--r--indra/llprimitive/lldaeloader.h4
-rwxr-xr-xindra/newview/app_settings/settings.xml11
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp3
4 files changed, 30 insertions, 5 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 9ce17ef276..720986a411 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -816,7 +816,8 @@ LLDAELoader::LLDAELoader(
void* opaque_userdata,
JointTransformMap& jointMap,
JointSet& jointsFromNodes,
- U32 modelLimit)
+ U32 modelLimit,
+ bool preprocess)
: LLModelLoader(
filename,
lod,
@@ -827,7 +828,8 @@ LLDAELoader::LLDAELoader(
opaque_userdata,
jointMap,
jointsFromNodes),
-mGeneratedModelLimit(modelLimit)
+mGeneratedModelLimit(modelLimit),
+mPreprocessDAE(preprocess)
{
}
@@ -851,7 +853,16 @@ bool LLDAELoader::OpenFile(const std::string& filename)
{
//no suitable slm exists, load from the .dae file
DAE dae;
- domCOLLADA* dom = dae.openFromMemory(filename, preprocessDAE(filename).c_str());
+ domCOLLADA* dom;
+ if (mPreprocessDAE)
+ {
+ dom = dae.openFromMemory(filename, preprocessDAE(filename).c_str());
+ }
+ else
+ {
+ LL_INFOS() << "Skipping dae preprocessing" << LL_ENDL;
+ dom = dae.open(filename);
+ }
if (!dom)
{
diff --git a/indra/llprimitive/lldaeloader.h b/indra/llprimitive/lldaeloader.h
index 19a85a5339..27db5326d5 100644
--- a/indra/llprimitive/lldaeloader.h
+++ b/indra/llprimitive/lldaeloader.h
@@ -56,7 +56,8 @@ public:
void* opaque_userdata,
JointTransformMap& jointMap,
JointSet& jointsFromNodes,
- U32 modelLimit);
+ U32 modelLimit,
+ bool preprocess);
virtual ~LLDAELoader() ;
virtual bool OpenFile(const std::string& filename);
@@ -104,6 +105,7 @@ protected:
private:
U32 mGeneratedModelLimit; // Attempt to limit amount of generated submodels
+ bool mPreprocessDAE;
};
#endif // LL_LLDAELLOADER_H
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 1fdfdb51a8..4a69133fde 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -35,6 +35,17 @@
<key>Value</key>
<integer>768</integer>
</map>
+ <key>ImporterPreprocessDAE</key>
+ <map>
+ <key>Comment</key>
+ <string>Enable preprocessing for DAE files to fix some ColladaDOM related problems (like support for space characters within names and ids).</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>IMShowTime</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 29bbf7d01e..2255e10678 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1766,7 +1766,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
this,
mJointTransformMap,
mJointsFromNode,
- gSavedSettings.getU32("ImporterModelLimit"));
+ gSavedSettings.getU32("ImporterModelLimit"),
+ gSavedSettings.getBOOL("ImporterPreprocessDAE"));
if (force_disable_slm)
{