0

enter image description hereCan't seem to get this script to work please help.

I think it's got some thing to do with opening a blend file and it not being able to carry on with the script.

import bpy

bpy.ops.wm.open_mainfile(filepath="Z:\Projects\Test\blend\template\template.blend", filter_blender=True, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=8, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', load_ui=True, use_scripts=True)

bpy.ops.wm.alembic_import(filepath="Z:\Projects\Test\abc\A\box.abc", relative_path=True, as_background_job=False)

bpy.ops.wm.save_as_mainfile(filepath="Z:\Projects\Test\blend\A\A.blend", check_existing=True, filter_blender=True, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=8, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', compress=False, relative_remap=True, copy=False, use_mesh_compat=False)

Linton
  • 1
  • 1
  • Please add a screenshot of the actual error message to your question. Also, if that's only a section of your python code, please include all of the relevant bits. As a guess, your problem is that you're not escaping '' (backslash) characters. Either change you filepath strings to have \ everywhere you now have \ or put an r in front of the opening double quote. – Marty Fouts Oct 21 '21 at 22:15
  • Added the image, I can run each line on it's own but the moment I open a scene and the import it gives me issues. – Linton Oct 22 '21 at 07:12
  • Dupe, different operator, same issue. Can copy the text of an error message from system console and post as text. (in a code bleck) https://blender.meta.stackexchange.com/questions/2788/policy-on-posting-code-error-message-etc-as-images?r=SearchResults&s=1|28.0449 – batFINGER Oct 22 '21 at 11:29
  • Sorry, I wasn't aware. I was read screenshot and did exactly that. – Linton Oct 22 '21 at 12:41

0 Answers0