Hello,
I'm having issues wrapping my head around how to change an FBX Importer preference via Python. Any help would be appreciated, below explains my approach and what I was able to figure out so far. Please note that I am fairly new to the C4D Python API.
The specific goal is to change c4d.FBXIMPORT_NORMALS
of the FBX Import.
First I need to figure out what the plugin ID is. I used the below approach to do. Please let me know if there is a better way to do this -
for p in c4d.plugins.FilterPluginList(c4d.PLUGINTYPE_ANY,True):
print (p.GetID(), " = ", p.GetName())
The above output gives me -
1026370 = FBX (*.fbx)
1026369 = FBX (*.fbx)
1026370 = FBX (*.fbx) Export
1026369 = FBX (*.fbx) Import
1026371 = FBXExportReferenceTag
The FBX Import Plugin Id is 1026369
. I now can return the BasePlugin object and SHOULD be able to set the parameter from here -
plug = c4d.plugins.FindPlugin(1026369, c4d.PLUGINTYPE_SCENELOADER)
print(plug)
>>> <c4d.plugins.BasePlugin object called FBX (*.fbx) with ID 15 at 2429143389120>
plug[c4d.FBXIMPORT_NORMALS] = c4d.FBXIMPORT_NORMALS_NORMALTAGS
I run the above without any changes to the Preferences/FBX Import UI. Following the same concept for the "Units" plugin I get the expected results when modifying it's parm Units[c4d.PREF_UNITS_AUTOCONVERT] = False
Am I doing something incorrectly? Is this access via Python just not supported? Any help would be great. Thank you.