diff options
Diffstat (limited to 'editor/collada')
-rw-r--r-- | editor/collada/collada.cpp | 18 | ||||
-rw-r--r-- | editor/collada/collada.h | 4 |
2 files changed, 6 insertions, 16 deletions
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index 57c00e1bef..e38171eef9 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -28,8 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef TOOLS_ENABLED - #include "collada.h" #include <stdio.h> @@ -618,7 +616,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String & if (colorarr.size() >= 3) { - // alpha strangely not allright? maybe it needs to be multiplied by value as a channel intensity + // alpha strangely not alright? maybe it needs to be multiplied by value as a channel intensity Color color(colorarr[0], colorarr[1], colorarr[2], 1.0); if (what == "diffuse") effect.diffuse.color = color; @@ -856,7 +854,7 @@ void Collada::_parse_light(XMLParser &parser) { COLLADA_PRINT("colorarr size: " + rtos(colorarr.size())); if (colorarr.size() >= 4) { - // alpha strangely not allright? maybe it needs to be multiplied by value as a channel intensity + // alpha strangely not alright? maybe it needs to be multiplied by value as a channel intensity Color color(colorarr[0], colorarr[1], colorarr[2], 1.0); light.color = color; } @@ -1696,7 +1694,7 @@ Collada::Node *Collada::_parse_visual_scene_node(XMLParser &parser) { } } - } else if (section == "node") { + } else { /* Found a child node!! what to do..*/ @@ -1903,8 +1901,7 @@ void Collada::_parse_animation(XMLParser &parser) { Vector<float> &output = float_sources[output_id]; - ERR_EXPLAIN("Wrong number of keys in output"); - ERR_CONTINUE((output.size() / stride) != key_count); + ERR_CONTINUE_MSG((output.size() / stride) != key_count, "Wrong number of keys in output."); for (int j = 0; j < key_count; j++) { track.keys.write[j].data.resize(output_len); @@ -2300,7 +2297,7 @@ bool Collada::_optimize_skeletons(VisualScene *p_vscene, Node *p_node) { //replace parent by this... Node *parent = node->parent; - //i wonder if this is allright.. i think it is since created skeleton (first joint) is already animated by bone.. + //i wonder if this is alright.. i think it is since created skeleton (first joint) is already animated by bone.. node->id = parent->id; node->name = parent->name; node->xform_list = parent->xform_list; @@ -2447,8 +2444,7 @@ void Collada::_find_morph_nodes(VisualScene *p_vscene, Node *p_node) { state.morph_ownership_map[base] = nj->id; break; } else { - ERR_EXPLAIN("Invalid scene"); - ERR_FAIL(); + ERR_FAIL_MSG("Invalid scene."); } } } @@ -2578,5 +2574,3 @@ Error Collada::load(const String &p_path, int p_flags) { Collada::Collada() { } - -#endif diff --git a/editor/collada/collada.h b/editor/collada/collada.h index 9ed62b46b7..317c3f1d37 100644 --- a/editor/collada/collada.h +++ b/editor/collada/collada.h @@ -28,8 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef TOOLS_ENABLED - #ifndef COLLADA_H #define COLLADA_H @@ -647,5 +645,3 @@ private: // private stuff }; #endif // COLLADA_H - -#endif |