2

I am using Python script to load a mesh from .obj format file. It output some information when it loading. I want to disable the output. How can I do? enter image description here

1 Answers1

2

Quick and dirty workaround : Navigate to your blender installation folder. Open "2.**/scripts/addons/io_scene_obj" folder and open import_obj.py in your favorite text editor.

Press CTRLSHIFTF to bring in the Search & Replace tool. Replace print( by if False: print( for all occurences in file. This will neutralize all outputs to the console.

enter image description here

You'll have to do it again every time you update Blender.

Gorgious
  • 30,723
  • 2
  • 44
  • 101
  • I noticed afterwards that it was for a script. If you're going to distribute it, this answer won't help one bit and you should indeed follow the suggested duplicate. – Gorgious Jun 04 '21 at 10:11