diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-09-20 03:55:12 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-09-20 03:55:12 +0400 |
commit | 51eed03e943b0b113487ef109837240311a31c23 (patch) | |
tree | 5d15c8454dfc8f65e691312f56e9f26a9210da10 | |
parent | a6f447427bbe6dab37431ca00bfc83decc9e7e87 (diff) |
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.
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 9758d9bf92a..ebf8bb45420 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -403,7 +403,7 @@ static ShaderNode *add_node(BL::BlendData b_data, BL::Scene b_scene, ShaderGraph 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 @@ static ShaderNode *add_node(BL::BlendData b_data, BL::Scene b_scene, ShaderGraph 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()]; |