I'm running Blender 2.78
Using OSL, I am trying to find the location of an object. In the Node editor, I am in Shader Nodes for World. The object I'm trying to find is a UV sphere named 'MySun' and has an emitter material using cycles.
In the OSL script, I'm trying to get the location of MySun like this:
vector Sv;
getattribute("MySun","object:location", Sv);
When I run it, I get an EXCEPTION_ACCESS_VIOLATION
error and Blender crashes. I've searched all over for the correct way to do this and have found people saying it couldn't be done, or that you can only get the location of the current object. What's the current object when you're working on "World"?
These were posts from several years ago, so I'm hoping that if there was a bug it's fixed by now, because the documentation certainly seems like getattribute
is made to get the attributes of any object you name.
Is there another way I'm supposed to reference an object?
Thanks!