Python export fbx
Hi!
With Python I would like to automate the process of fitting clothes for multiple animations. And export the result as fbx.
I am starting with the edited function "fbx" from example.py.
object.clear_console()
object.initialize()
object.set_import_scale_unit("mm")
object.set_export_scale_unit("mm")
object.set_export_unified_uv_texcoordnate(True, 1000, 5)
object.set_garment_file_path("C:\\Users\\Public\\Documents\\CLO\\Assets\\Garment\\Female_T-shirt.zpac")
object.set_fabric_folder("C:\\Users\\Public\\Documents\\CLO\\Assets\\", "zfab")
object.set_avatar_file_path("C:\\Users\\Public\\Documents\\CLO\\Assets\\Avatar\\Avatar\\Female_V2\\FV2_Feifei.avt")
object.set_animation_folder("C:\\Users\\Public\\Documents\\CLO\\Assets\\Avatar\\Avatar\\Female_V2\\Pose\\", "pos")
object.set_save_folder_path("C:\\Users\\Public\\Documents\\CLO\\Assets\\Output\\", "fbx")
object.set_capture_image_save_folder("C:\\Users\\Public\\Documents\\CLO\\Assets\\Output\\")
object.set_auto_save(True)
object.process()
Mulitple Paths are set,also this:
object.set_capture_image_save_folder("C:\\Users\\Public\\Documents\\CLO\\Assets\\Output\\")
The simulation runs and I get this log:
finish_animation_recording
start save
save_file_path:C:\Users\Public\Documents\CLO\Assets\Output\Nylon_Matte.zfab
GetSaveFilePath:C:\Users\Public\Documents\CLO\Assets\Output\FV2_01_AFV2_FeifeiFemale_T-shirt.fbx
THEN it stops and waits (why?) for an input with :
image_file_path:C:\Users\Public\Documents\CLO\Assets\Output\Nylon_Matte.png
Pressing Enter follows by error:
e_file_path:C:\Users\Public\Documents\CLO\Assets\Output\Nylon_Matte.png
^
SyntaxError: invalid syntax
When I delete the whole input and type this :
r"C:\Users\Public\Documents\CLO\Assets\Output\Nylon_Matte.png"
The process goes on, ends without error but there are no files written... :(
So what seems to be the Problem? And how is it possible to get a look into the: MarvelousDesignerModule();
Thx
Sebastian
-
I see your question was not answered. That is not surprising. The Python interface does not have priority at CLO/MD.
I have some experience with programming for MarvelousDesigner. Things have grounded to a halt there with the MD10 move to a heavily crippled version of Python3.7. I was just looking around here to see if things had been better arranged here at CLO. It seems not.
At MD and CLOViewer there is a copy of MarvelousDesigner.py in the installation. Trust it comes with CLO also. It appears to implement a sort of job queue but I still have to hear the firtst user who managd to get it working. The version that comes with MD is quite buggy but it does give an idea of the workings.
I have no idea what is the cause of the errors you get.
One thing I see is windows paths with a single backslash. Single backslash is an escape character. '\n' is newline for example, so your '\Nylon' may send Python astray. Python os module works perfect when you use forward slash in a file path. you just have to be careful that the os may return paths with a single backslash.
0
評論