Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 26/02/2013 at 07:29, xxxxxxxx wrote:
User Information: Cinema 4D Version: Platform: Language(s) :
--------- Hi!
I'm probably just blind, the documentation is a little unclear in the VolumeData section. I'm searching for a way to obtain the RayLight* from a BaseObject* that has been defined in my shader plugin via link-field, something like this:
BaseObject* light = bc->GetLink(MYSHADER_LIGHTSOURCE, doc); LONG index = **vd- >GetLightObjectIndex(light); // This is what I search for** RayLight* ray = vd->GetLight(index);
Is it possible and I just couldn't find it in the docs?
Thank you! -Niklas
EDIT: Corrected RayObject to RayLight.
On 26/02/2013 at 09:46, xxxxxxxx wrote:
Ah, I see there's the GetObj() method. Do I have to iterator over all available RayObject's to find the RayObject associated with the light in the scene?
EDIT: Ok, I think RayObject's are not the light objects..
On 26/02/2013 at 23:11, xxxxxxxx wrote:
Hi Niklas,
Originally posted by xxxxxxxx Ah, I see there's the GetObj() method. Do I have to iterator over all available RayObject's to find the RayObject associated with the light in the scene?
Originally posted by xxxxxxxx
You can get each light with GetLight() then check BaseObject* RayLight::link against the light link pointer in your shader.
On 27/02/2013 at 07:07, xxxxxxxx wrote:
Thank you, Yannick. This works fine.