how can I convert a c4d file to fbx format
-
S22 has an FBX export (judging from the documentation). You can use
FORMAT_FBX_EXPORT
in theSaveDocument
function. If you want to do it in Python, the function is here:
https://developers.maxon.net/docs/py/2023_2/modules/c4d.documents/index.html?highlight=savedocument#c4d.documents.SaveDocument(that's also the API documentation; you do not need any separate development tools for simple Python dev tasks but I'm sure there is some thread here to explain how to use a separate Python IDE and connect it to C4D)
-
Hi @liushu thanks for reaching out us and sorry for the late answer.
As pointed out by @Cairyn exporting a c4d scene from Cinema 4D to FBX format is indeed straightforward (see abc exporter example) on the contrary, Cineware SDK (which in any case doesn't come in a Python flavor) was not designed with this in mind and it's actually not possible without re-creating completely the whole FBX exporter.
Best, R
-
thanks for answer.
there are 2 quesions.1 . if i use python sdk. where can I download it.
In [URL-REMOVED]
there is not free python sdk.
I notice that: "c4dpy does work only with commercial licenses"2 . I can download c++ sdk. I am c++ programmer.
I do it according to https://medium.com/@antoinefortin_64750/how-to-setup-cinema4d-and-melange-c-sdk-924110725c01env:
vs2019
22.004_RBCinewaresdk22.0_317036but i encounter compile problems.
I add include lines as below
#include "c4d_file.h"
#include "default_alien_overloads.h"then, there ars many errors likes that:
C2065 'objectToDelete': undeclared identifier use_r22 ...\includes\private_ge_mtools.h 633
see reference to class template instantiation 'cineware::GeTempDynArray<TYPE>' being compiled use_r22 ...\includes\private_ge_mtools.h 687
C3861 'objectToDelete': identifier not found use_r22 C:\Users\boluo\3D Objects\cineware\r22\includes\private_ge_mtools.h 633I have add include directives and libs config
I think i missed something or , there is confiure error.
I tried different version vs and different version c4d lib, and I tried c++ 14. But these errors still exist.
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
@liushu
The Python SDK is automatically installed with C4D, so you don't need any further installation of a separate SDK. However, it is possible that your C4D version is not supporting Python at all. I remember that C4D Lite didn't support it, anyway (but that is information from years ago).As you are working with the cineware interface, I need to leave the answer to the Maxon specialists; I do not work with Adobe software and do not have cineware installed (and whatever flavor of C4D currently comes with that).
-
@liushu said in how can I convert a c4d file to fbx format:
2 . I can download c++ sdk. I am c++ programmer.
I do it according to https://medium.com/@antoinefortin_64750/how-to-setup-cinema4d-and-melange-c-sdk-924110725c01This is NOT the C++ SDK. The C++ SDK is included in your installation of Cinema 4D; you find the C++ documentation online.
What you are looking at is some random online source talking about the Cineware SDK (formerly known as Melange), which is something else. See
Cineware
[URL-REMOVED].
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
As said by @PluginStudent and @r_gigante
Python SDK = Can only be used within Cinema 4D or c4dpy.
C++ SDK = Only have the ability to register a plugin to be loaded in Cinema 4D.
Cineware (previously Melange) = Use Cinema 4D file saved for Cineware without the need to have Cinema 4D installed.Python SDK and C++ SDK have the ability to export a C4D scene to an FBX.
Cineware/Melange doesn't have the ability to export a C4D Scene to an FBX file.So if your goal is to export a C4D file to FBX you will need Cinema 4D to be installed and probably use C4D or a Cinema 4D dedicated Plugin that parse Command Line Argument to export a given file to an FBX.
Cheers,
Maxime. -
@m_adam
so what you mean is I can't convert a c4d file to fbx without a Cinema 4D sofware installed ?c++ SDK or python SDK just work with running Cinema 4D, sdk do not work alone.
I haven't Cinema 4D, and I want convert some c4d files to fbx. There ary some other ways?
-
You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK.
However: The C4D file format knows mathematical, procedural objects, e.g. procedural cubes, spheres, or other shapes. And you cannot assume that there are perfect counterparts in the FBX format.
So what do you want to do with such C4D specific object types?
The only proper way of handling this is when a user exports a C4D scene optimized for Cineware, so that polygon and animation caches are build.
-
@PluginStudent said in how can I convert a c4d file to fbx format:
You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK.
you said "You could write a standalone C++ application that uses the Cineware SDK and the FBX SDK."
this is I want to do.
but is there a free and legal way to get fbx sdk.
only cineware sdk cannot complete the task.I have not c4d software.
https://developers.maxon.net/docs/cpp/2023_2/index.html
-
The Cinema 4D C++ SDK is not the same as the Cineware SDK.
The Cinema 4D C++ SDK is included in every distribution of Cinema 4D.
The Maxon Cineware SDK can be downloaded from the
developers' blog
[URL-REMOVED], as you already did, according to your previous posts.
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.