Hey Y'all,
I'm running into an issue with a JSON encoding bit, I'm getting a type error of this
TypeError: unable to convert unicode to @net.maxon.interface.url-C
I am trying to read a JSON file into cinema and make it a path in the plugin, below is the current code I have
#----------------------------------------------------------------------------------------------------------------------------------------
# IMPORT OBJECTS
#----------------------------------------------------------------------------------------------------------------------------------------
import os
from os import listdir
from os.path import isfile, join
def import_objs(OBJ_LIST):
global SETTINGS
LIBPATH = SETTINGS["SETTING_ASSET_LIBRARY_FULLPATH"]
FILES = [f for f in listdir(LIBPATH) if isfile(join(LIBPATH, f))]
for OBJ in OBJ_LIST:
OBJ_FILENAME = OBJ[0] + ".c4d"
if OBJ_FILENAME in FILES:
FILEPATH = os.path.join(LIBPATH,OBJ_FILENAME)
c4d.documents.MergeDocument(doc, FILEPATH, c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS, None)
c4d.EventAdd()
return True
Any thoughts?
Cheers!
MattG