THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/12/2003 at 10:52, xxxxxxxx wrote:
Cinema 4D Version: 8.206
Language(s) : C++ ;
Im confused how to retrieve the properties of a light.
my code so far is
// Get first object in document
// Continue looking for lights
if(object->GetType() == Olight)
LightColour = data.GetVector(LIGHT_MAIN_F);
LightPosition = object->GetPos();
LightIntensity = data.GetReal(LIGHT_MAIN_HELL);
LightFallOffMin = data.GetReal(LIGHT_MAIN_INNERDIST);
LightFallOffMax = data.GetReal(LIGHT_MAIN_OUTERDIST);
I get compile errors on the #define labels:
LIGHT_MAIN_INNERDIST' : undeclared identifier
this is declare in ge_prepass.h which is declare c4d.h, which I have #included. So I don't undestand why i am getting that error.
Also, there doesn't seem to be any documentation for those variables in the SDK
On 24/12/2003 at 01:05, xxxxxxxx wrote:
Object parameters are usually defined in their description files, the light IDs are in Olight.h, also keep in mind some objects have to have their parameters obtained directly with GetParameter(), some work with GetData and then you can also use GetDataInstance. Finally, the GetParameter for the LIGHT_TYPE (which is defined in Olight.h) will return a LONG with the values LIGHT_TYPE_SPOT etc. so this is what 'data' will contain, nothing else. GetParameter fetches a single parameter.