]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
set-material-flag!
authorJavier Sancho <jsf@jsancho.org>
Sun, 15 Mar 2020 18:27:14 +0000 (19:27 +0100)
committerJavier Sancho <jsf@jsancho.org>
Sun, 15 Mar 2020 18:27:14 +0000 (19:27 +0100)
src/material-flags.cpp

index 788a305a0b28f7a86a4f08796571c784e929652f..d700e4c3bb258e24738e516f585f4fd2d790b40e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <irrlicht/irrlicht.h>
 #include <libguile.h>
+#include "animated-mesh-scene-node.h"
 #include "material-flags.h"
 #include "scene-node.h"
 
@@ -37,7 +38,12 @@ extern "C" {
                              SCM flag,
                              SCM newvalue)
   {
-    if (scene_node_p (wrapped_obj))
+    if (animated_mesh_scene_node_p (wrapped_obj))
+      {
+        unwrap_animated_mesh_scene_node (wrapped_obj)->setMaterialFlag (scm_to_material_flag (flag),
+                                                                        scm_to_bool (newvalue));
+      }
+    else if (scene_node_p (wrapped_obj))
       {
         unwrap_scene_node (wrapped_obj)->setMaterialFlag (scm_to_material_flag (flag),
                                                           scm_to_bool (newvalue));