Fix #33405: preview render getting stuck in a particular .blend file, ObjectKey
[blender.git] / intern / cycles / blender / blender_shader.cpp
index da06f1d0a38b9e14babb8930383aac795abf095e..c9380d8d58be5f10ba4c0de47dbd3be1a32dfe1a 100644 (file)
@@ -445,7 +445,7 @@ static ShaderNode *add_node(Scene *scene, BL::BlendData b_data, BL::Scene b_scen
                }
                case BL::ShaderNode::type_SCRIPT: {
 #ifdef WITH_OSL
-                       if(scene->params.shadingsystem != SceneParams::OSL)
+                       if(!scene->shader_manager->use_osl())
                                break;
 
                        /* create script node */