THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 31/07/2011 at 05:40, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;
---------
Hi there,
might be a simple solution, but I don't get it at the moment.
I have created a Tag that includes a DateTime field:
DATETIME TORBIT_START
{
TIME_CONTROL;
DATE_CONTROL;
COMPACT_MODE;
}
Now I want to initalize this Control with the current time and date. What I tried was this (but it didn't work) :
BaseTag* tag = (BaseTag* )node;
BaseContainer* data = tag->GetDataInstance();
DateTimeData *dtd = (DateTimeData* )data->GetCustomDataType(TORBIT_START, DATETIME_DATA);
if (dtd)
{
tagDateTime dt = dtd->GetDateTime();
DateTimeNow(dt); // Aktuelle Zeit setzen
dtd->SetDateTime(&dt;);
}
With this I did not even get the datatype, i.e. dtd remains NULL.
Would be great if someone could help!
Juergen