]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
Improve support for animated mesh scene nodes
authorJavier Sancho <jsf@jsancho.org>
Thu, 9 Apr 2020 12:12:03 +0000 (14:12 +0200)
committerJavier Sancho <jsf@jsancho.org>
Thu, 9 Apr 2020 12:12:03 +0000 (14:12 +0200)
src/guile-irrlicht.cpp
src/scene-node.cpp

index db77dab18be67cab0fde9a936f20c6738954e92d..f0ed9c75e74b413bccadbb9de6f41af5b05b7356 100644 (file)
@@ -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);
       }
index 695fd63f34f153682cc4850b8893ff7e3704a6b7..cdad6417e3ba31ff9543d677ae9bcbcc09dd3c50 100644 (file)
@@ -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);
       }