Revision: 50759
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50759
Author:   blendix
Date:     2012-09-19 23:55:12 +0000 (Wed, 19 Sep 2012)
Log Message:
-----------
Fix #31888: cycles crashes using movie for image texture. This is not supported
but should not crash either. This fix is more of a workaround, the crash seems
to be in openimageio or one of the libraries it uses.

Modified Paths:
--------------
    trunk/blender/intern/cycles/blender/blender_shader.cpp

Modified: trunk/blender/intern/cycles/blender/blender_shader.cpp
===================================================================
--- trunk/blender/intern/cycles/blender/blender_shader.cpp      2012-09-19 
22:25:02 UTC (rev 50758)
+++ trunk/blender/intern/cycles/blender/blender_shader.cpp      2012-09-19 
23:55:12 UTC (rev 50759)
@@ -403,7 +403,7 @@
                        BL::Image b_image(b_image_node.image());
                        ImageTextureNode *image = new ImageTextureNode();
                        /* todo: handle generated/builtin images */
-                       if(b_image)
+                       if(b_image && b_image.source() != 
BL::Image::source_MOVIE)
                                image->filename = 
image_user_file_path(b_image_node.image_user(), b_image, 
b_scene.frame_current());
                        image->color_space = 
ImageTextureNode::color_space_enum[(int)b_image_node.color_space()];
                        image->projection = 
ImageTextureNode::projection_enum[(int)b_image_node.projection()];
@@ -416,7 +416,7 @@
                        BL::ShaderNodeTexEnvironment b_env_node(b_node);
                        BL::Image b_image(b_env_node.image());
                        EnvironmentTextureNode *env = new 
EnvironmentTextureNode();
-                       if(b_image)
+                       if(b_image && b_image.source() != 
BL::Image::source_MOVIE)
                                env->filename = 
image_user_file_path(b_env_node.image_user(), b_image, b_scene.frame_current());
                        env->color_space = 
EnvironmentTextureNode::color_space_enum[(int)b_env_node.color_space()];
                        env->projection = 
EnvironmentTextureNode::projection_enum[(int)b_env_node.projection()];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to