FBX Importer Plugin ID Please..
-
On 21/06/2014 at 03:18, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ; PYTHON ;---------
Can anybody tell me what the ID is for the FBX importer or how to find it?I know the ID for FBX exporter is 1026370, but can`t find a reference to the importer anywhere..
-
On 21/06/2014 at 04:18, xxxxxxxx wrote:
I`m using python atm but i think this applies to either:
Managed to get the FBX Importer by stepping down 1 from the Exporter ID ( which is 1026370 ).
But the way to access it seems a bit unexpected and a bit of guesswork involved. There have been a couple of threads on here about changing Export settings and i`ve adapted the code for import as follows:
plug = plugins.FindPlugin(1026369, c4d.PLUGINTYPE_SCENELOADER) if plug is None: print "no plugin found" return print "plugin found" op = {} # Send MSG_RETRIEVEPRIVATEDATA to FBX export plugin if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA, op) : if "imexporter" not in op: print "no loader found" return print "loader found" # BaseList2D object stored in "imexporter" key hold the settings fbxImport = op["imexporter"] if fbxImport is None: print "no importer found" return print "importer found" print "setting = "+str(fbxImport[c4d.FBXIMPORT_SCALE]) fbxImport[c4d.FBXIMPORT_ANIMATION] = True fbxImport[c4d.FBXIMPORT_SCALE] = 100 file = documents.MergeDocument(doc, "C://MyFile.fbx", c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS)
The FBXIMPORT_ANIMATION setting allows me to change the
animation
setting from true to false, and this is reflected in the FBX Import settings in preferences.. However it doesn`t seem to have any impact on my plugins import which ignores animation regardless..The FBXIMPORT_SCALE also has no effect although i
m guessing with that one that it
s a number.Anybody tried this at all?
-
On 23/06/2014 at 01:32, xxxxxxxx wrote:
Using the above i`ve tried changing the MergeDocument to LoadDocument and also with and without the SCENEFILTER_MERGESCENE flag with mixed results..
I
m a bit confused now as i
ve tried too many different combo`s of the above But i think the general idea is that setting the importer properties as per the above only affects import when bringing in an FBX via File->Open..Be interested to know exactly how the FBXIMPORT_SCALE works internally. Importing some FBX i have noticed the default viewport view will encompass the scene, but the scene scale settings will change to accommodate that - for example import then create a Cube, the default cube size will have changed from 200cm to 20000cm or some other value.
Would be useful to hear any input from others on this. I`m basically just trying to create a one-click FBX importer which has custom settings.
-
On 23/06/2014 at 14:19, xxxxxxxx wrote:
Apparently my code throws an error in R15. I`m using R14 so might have a look at the newer docs for that..