summaryrefslogtreecommitdiff
path: root/editor/collada/collada.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/collada/collada.cpp')
-rw-r--r--editor/collada/collada.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp
index 231173e459..cf39abdc53 100644
--- a/editor/collada/collada.cpp
+++ b/editor/collada/collada.cpp
@@ -2194,7 +2194,11 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
ERR_CONTINUE(!state.scene_map.has(nodeid)); //weird, it should have it...
- NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]);
+#ifdef NO_SAFE_CAST
+ NodeJoint *nj = static_cast<NodeJoint *>(state.scene_map[nodeid]);
+#else
+ NodeJoint *nj = dynamic_cast<NodeJoint *>(state.scene_map[nodeid]);
+#endif
ERR_CONTINUE(!nj); //broken collada
ERR_CONTINUE(!nj->owner); //weird, node should have a skeleton owner
@@ -2366,7 +2370,11 @@ bool Collada::_move_geometry_to_skeletons(VisualScene *p_vscene, Node *p_node, L
String nodeid = ng->skeletons[0];
ERR_FAIL_COND_V(!state.scene_map.has(nodeid), false); //weird, it should have it...
- NodeJoint *nj = SAFE_CAST<NodeJoint *>(state.scene_map[nodeid]);
+#ifdef NO_SAFE_CAST
+ NodeJoint *nj = static_cast<NodeJoint *>(state.scene_map[nodeid]);
+#else
+ NodeJoint *nj = dynamic_cast<NodeJoint *>(state.scene_map[nodeid]);
+#endif
ERR_FAIL_COND_V(!nj, false);
ERR_FAIL_COND_V(!nj->owner, false); //weird, node should have a skeleton owner