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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-13 02:05:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-13 02:05:33 +0400
commit2e8a2f7668e5687a0a9a5087e76eeb739c818b2b (patch)
tree75aa5fe8746df4cd369afff88c4fd367cb78f72c /source/blender/collada/collada_internal.cpp
parent46c95d37c6fae2268a7f39f90ef46e9c3c696e3f (diff)
style cleanup
Diffstat (limited to 'source/blender/collada/collada_internal.cpp')
-rw-r--r--source/blender/collada/collada_internal.cpp147
1 files changed, 75 insertions, 72 deletions
diff --git a/source/blender/collada/collada_internal.cpp b/source/blender/collada/collada_internal.cpp
index 06e688a93ac..0ee8419eda7 100644
--- a/source/blender/collada/collada_internal.cpp
+++ b/source/blender/collada/collada_internal.cpp
@@ -31,9 +31,10 @@
#include "BLI_linklist.h"
-UnitConverter::UnitConverter() : unit(), up_axis(COLLADAFW::FileInfo::Z_UP) {}
+UnitConverter::UnitConverter() : unit(), up_axis(COLLADAFW::FileInfo::Z_UP) {
+}
-void UnitConverter::read_asset(const COLLADAFW::FileInfo* asset)
+void UnitConverter::read_asset(const COLLADAFW::FileInfo *asset)
{
unit = asset->getUnit();
up_axis = asset->getUpAxisType();
@@ -121,72 +122,74 @@ void TransformBase::decompose(float mat[][4], float *loc, float eul[3], float qu
* must obviously be removed too, otherwise they would be heavily misinterpreted.
*/
const unsigned char translate_start_name_map[256] = {
-95, 95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-65, 66, 67, 68, 69, 70, 71, 72,
-73, 74, 75, 76, 77, 78, 79, 80,
-81, 82, 83, 84, 85, 86, 87, 88,
-89, 90, 95, 95, 95, 95, 95, 95,
-97, 98, 99, 100, 101, 102, 103, 104,
-105, 106, 107, 108, 109, 110, 111, 112,
-113, 114, 115, 116, 117, 118, 119, 120,
-121, 122, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 192,
-193, 194, 195, 196, 197, 198, 199, 200,
-201, 202, 203, 204, 205, 206, 207, 208,
-209, 210, 211, 212, 213, 214, 95, 216,
-217, 218, 219, 220, 221, 222, 223, 224,
-225, 226, 227, 228, 229, 230, 231, 232,
-233, 234, 235, 236, 237, 238, 239, 240,
-241, 242, 243, 244, 245, 246, 95, 248,
-249, 250, 251, 252, 253, 254, 255};
+ 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 95, 95, 95, 95, 95, 95,
+ 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 95, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 95, 248,
+ 249, 250, 251, 252, 253, 254, 255
+};
const unsigned char translate_name_map[256] = {
-95, 95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 45, 95, 95, 48,
-49, 50, 51, 52, 53, 54, 55, 56,
-57, 95, 95, 95, 95, 95, 95, 95,
-65, 66, 67, 68, 69, 70, 71, 72,
-73, 74, 75, 76, 77, 78, 79, 80,
-81, 82, 83, 84, 85, 86, 87, 88,
-89, 90, 95, 95, 95, 95, 95, 95,
-97, 98, 99, 100, 101, 102, 103, 104,
-105, 106, 107, 108, 109, 110, 111, 112,
-113, 114, 115, 116, 117, 118, 119, 120,
-121, 122, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 95, 95,
-95, 95, 95, 95, 95, 95, 183, 95,
-95, 95, 95, 95, 95, 95, 95, 192,
-193, 194, 195, 196, 197, 198, 199, 200,
-201, 202, 203, 204, 205, 206, 207, 208,
-209, 210, 211, 212, 213, 214, 95, 216,
-217, 218, 219, 220, 221, 222, 223, 224,
-225, 226, 227, 228, 229, 230, 231, 232,
-233, 234, 235, 236, 237, 238, 239, 240,
-241, 242, 243, 244, 245, 246, 95, 248,
-249, 250, 251, 252, 253, 254, 255};
+ 95, 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 45, 95, 95, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56,
+ 57, 95, 95, 95, 95, 95, 95, 95,
+ 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80,
+ 81, 82, 83, 84, 85, 86, 87, 88,
+ 89, 90, 95, 95, 95, 95, 95, 95,
+ 97, 98, 99, 100, 101, 102, 103, 104,
+ 105, 106, 107, 108, 109, 110, 111, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 95, 95,
+ 95, 95, 95, 95, 95, 95, 183, 95,
+ 95, 95, 95, 95, 95, 95, 95, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200,
+ 201, 202, 203, 204, 205, 206, 207, 208,
+ 209, 210, 211, 212, 213, 214, 95, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 246, 95, 248,
+ 249, 250, 251, 252, 253, 254, 255
+};
typedef std::map< std::string, std::vector<std::string> > map_string_list;
map_string_list global_id_map;
@@ -205,7 +208,7 @@ std::string translate_id(const std::string &id)
std::string id_translated = id;
id_translated[0] = translate_start_name_map[(unsigned int)id_translated[0]];
- for (unsigned int i=1; i < id_translated.size(); i++) {
+ for (unsigned int i = 1; i < id_translated.size(); i++) {
id_translated[i] = translate_name_map[(unsigned int)id_translated[i]];
}
// It's so much workload now, the if () should speed up things.
@@ -215,7 +218,7 @@ std::string translate_id(const std::string &id)
if (iter != global_id_map.end()) {
unsigned int i = 0;
bool found = false;
- for (i=0; i < iter->second.size(); i++) {
+ for (i = 0; i < iter->second.size(); i++) {
if (id == iter->second[i]) {
found = true;
break;
@@ -223,9 +226,9 @@ std::string translate_id(const std::string &id)
}
bool convert = false;
if (found) {
- if (i > 0) {
- convert = true;
- }
+ if (i > 0) {
+ convert = true;
+ }
}
else {
convert = true;
@@ -244,7 +247,7 @@ std::string translate_id(const std::string &id)
std::string id_name(void *id)
{
- return ((ID*)id)->name + 2;
+ return ((ID *)id)->name + 2;
}
std::string get_geometry_id(Object *ob)