I just switched to R23 and am fixing some my python scripts. I'm running into an issue setting an OBJ Export Option. In particular it's something that I think is new - OBJEXPORTOPTIONS_EXPORT_UVS. In the documentation it looks like I should be setting it to a number.
Parameter: UVs
Parameter ID: c4d.OBJEXPORTOPTIONS_EXPORT_UVS
Parameter Type: int
Cycle Values:
None (c4d.OBJEXPORTOPTIONS_UV_NONE)
Original (c4d.OBJEXPORTOPTIONS_UV_ORIGINAL)
Flip U (c4d.OBJEXPORTOPTIONS_FLIP_U)
Flip V (c4d.OBJEXPORTOPTIONS_FLIP_V)
Flip UV (c4d.OBJEXPORTOPTIONS_FLIP_UV)
Based on the documentation I think I should have something like this - objExport[c4d.OBJEXPORTOPTIONS_EXPORT_UVS] = 1 but it's throwing an error in the console 'AttributeError: parameter set failed'
Here's my block of code for this -
#set up obj exporter
plug = plugins.FindPlugin(1030178, c4d.PLUGINTYPE_SCENESAVER)
if plug is None:
print ("noPlug")
op = {} # create dictionary to store key
# Send MSG_RETRIEVEPRIVATEDATA to fbx export plugin
if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA, op):
# BaseList2D object stored in "imexporter" key hold the settings
objExport = op["imexporter"]
# Define the settings
objExport[c4d.OBJEXPORTOPTIONS_SCALE] = 1
objExport[c4d.OBJEXPORTOPTIONS_MATERIAL] = 2
objExport[c4d.OBJEXPORTOPTIONS_INVERT_TRANSPARENCY] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPX] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPY] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_FLIPZ] = True
objExport[c4d.OBJEXPORTOPTIONS_FLIPFACES] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPXY] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPXZ] = False
objExport[c4d.OBJEXPORTOPTIONS_POINTTRANSFORM_SWAPYZ] = False
objExport[c4d.OBJEXPORTOPTIONS_EXPORT_UVS] = 1
objExport[c4d.OBJEXPORTOPTIONS_OBJECTS_AS_GROUPS] = False
objExport[c4d.OBJEXPORTOPTIONS_TRIANGULATE_NGONS] = True
Is anybody else running into this or am I missing something on how to set the UV parameter of the export?
Any help is appreciated.