On 17/09/2014 at 11:57, xxxxxxxx wrote:
Cinema 4D Version: 15
Platform: Mac OSX ;
Language(s) : PYTHON ;
I have been gifted a fully functioning Python script from a colleague that turns text data into .OBJ files. The issue I'm having is that ideally I could load my external files into this script using User Data I attach to a Null. The script works perfectly if I hard code the file path like this...
inpName = '/Users/winnebango/Desktop/DataFile.dynain'
If I do this...
inpName = '[c4d.ID_USERDATA,1]'
Nothing works and it tells me that file does not exist.
I've been searching for 2 days how to get the file directory info from this User Data and just cannot seem to find anything. Is there a way to get the file path from the User Data and store it into a string that can be assigned to a variable? I've been out of coding practice for almost 10 years so I know I'm just missing a couple key things, but I don't know what those are. Any help is greatly appreciated. Thank you.