From: Javier Sancho Date: Thu, 9 Apr 2020 12:12:03 +0000 (+0200) Subject: Improve support for animated mesh scene nodes X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=8b5eb514c6fb720fa395ee26fde67b596f47f819;p=guile-irrlicht.git Improve support for animated mesh scene nodes --- diff --git a/src/guile-irrlicht.cpp b/src/guile-irrlicht.cpp index db77dab..f0ed9c7 100644 --- a/src/guile-irrlicht.cpp +++ b/src/guile-irrlicht.cpp @@ -140,7 +140,9 @@ extern "C" { SCM flag, SCM newvalue) { - if (mesh_scene_node_p (wrapped_obj) || scene_node_p (wrapped_obj)) + if (animated_mesh_scene_node_p (wrapped_obj) || + mesh_scene_node_p (wrapped_obj) || + scene_node_p (wrapped_obj)) { return irr_scene_ISceneNode_setMaterialFlag (wrapped_obj, flag, newvalue); } diff --git a/src/scene-node.cpp b/src/scene-node.cpp index 695fd63..cdad641 100644 --- a/src/scene-node.cpp +++ b/src/scene-node.cpp @@ -54,7 +54,11 @@ extern "C" { { irr::scene::ISceneNode* node; - if (mesh_scene_node_p (wrapped_scene_node)) + if (animated_mesh_scene_node_p (wrapped_scene_node)) + { + node = (irr::scene::ISceneNode*)unwrap_animated_mesh_scene_node (wrapped_scene_node); + } + else if (mesh_scene_node_p (wrapped_scene_node)) { node = (irr::scene::ISceneNode*)unwrap_mesh_scene_node (wrapped_scene_node); }