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:
User Information:
Cinema 4D Version: 8.206
Platform:
Language(s) : C++ ;
---------
Hi,
Im confused how to retrieve the properties of a light.
my code so far is
BaseObject *object=NULL;
GeData data;
LONG LightCount=0;
Vector LightColour;
Real LightIntensity;
Vector LightPosition;
Real LightFallOffMin=1000;
Real LightFallOffMax=1000;
// Get first object in document
object=doc->GetFirstObject();
// Continue looking for lights
while(object)
{
if(object->GetType() == Olight)
{
object->GetParameter(DescID(LIGHT_TYPE), data,0);
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