Handling newer c4d files
-
On 29/01/2018 at 05:12, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) : C++ ;---------
Hi,I am currently improving error reporting in our software when attempting to import file formats newer than currently supported.
At the moment we're linking Melange R18 and I have no problems opening an R19 file with just a cube inside. What would it take to create an R19 file that Melange R18 can't read? Is there any sample file readily available?
And - is there any way of getting retrieving more failure information beyond the nullptr I assume melange::LoadDocument() will return?
/ Lars @ Capture
-
On 30/01/2018 at 05:10, xxxxxxxx wrote:
Hi Lars,
Melange won't fail on reading files from newer Cinema 4D versions. Of course I won't promise this for all future, but that's how it is now. Instead it will ignore parts of the scene it knows nothing about.
You could add a version check, to warn the user about this possibility (similar to C4D warning about missing plugins in such a situation). Check out the commandline example inside of the Melange archive to get an idea, either with HyperFile::GetFileVersion() (preferred) or by evaluating document information as shown in AlienBaseDocument::Execute() of the example.