I am looking to drive a property in a material node based on the current Scene when rendering. The purpose would be to mix between two different parts of the node tree so that one Scene renders one input of a Mix node, and the other scene renders the other. The objects the material is on exist in one scene, and a group instance of the objects exists in the other scene.
The reason for using different Scenes is that part of the material is regular shaders that need to be GPU rendered, and part are OSL shaders that need to be CPU rendered. So the only difference between the scenes is that one has the device set to GPU and the other CPU.
I know that I could make copies of the objects/materials and so have a different material on the OSL version, but this gets cumbersome as i'll need to re-copy the objects or re-create the whole scene every time I change an object. This is too inefficient while still working on the project. The Group instance means that any changes I make to the models are instantly updated in the other scene, and lets me use the Group to control which models are rendered in the OSL scene at all.
Is this possible?