THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/02/2011 at 11:19, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
---------
I am using a BaseFile to create presets for my plugin. The plugin writes all of the AM descriptions to a file and calls those from the file when a preset is loaded. This works great unless I use a LONG or dropdown box. When I try to call the long from the file I get nothing. Here's the code I am using to write to the file and read from the file.
WRITING TO THE BASEFILE
//Open the BaseFile for writing.
bf->Open(file, FILEOPEN_WRITE, FILEDIALOG_IGNOREOPEN, BYTEORDER_INTEL, MACTYPE_CINEMA, MACCREATOR_CINEMA);
//Rotation Direction
if (bc->GetLong(PLANETX_GENERAL_ROTATION_DIRECTION) == PLANETX_GENERAL_ROTATION_CLOCKWISE)
{
bf->WriteLong(bc->GetLong(PLANETX_GENERAL_ROTATION_CLOCKWISE));
}
else
{
bf->WriteLong(bc->GetLong(PLANETX_GENERAL_ROTATION_COUNTER_CLOCKWISE));
}
READING THE BASEFILE
//Open the BaseFile for Reading.
bf->Open(file, FILEOPEN_READ, FILEDIALOG_IGNOREOPEN, BYTEORDER_INTEL, MACTYPE_CINEMA, MACCREATOR_CINEMA);
//Rotation Direction
LONG rotdir;
bf->ReadLong(&rotdir);
bc->SetLong(PLANETX_GENERAL_ROTATION_DIRECTION, enrot);
Any reason why it wouldn't read the data stored in the LONG that holds the dropdown box options. ? Am I using it wrong?
Thanks,
Shawn