BlenderProc
BlenderProc copied to clipboard
Cannot debug and open blender project automatically
Describe the issue
When I tried to debug a script(quickstart.py), the program control opened blender, but it didn't automatically open the project file and couldn't debug
Minimal code example
No response
Files required to run the code
No response
Expected behavior
According to your tutorial, when I debug quickstart.py, it should automatically open blender and Blender UI opens up, the scripting tab is selected and the correct script is loaded. But it did not work when I debug .
BlenderProc version
v2.6.1
Could you please copy here the command line output, so I can see if there are any errors?
For me it does open with the codes. However, I have a different issue, it opens only with import lines on the top than the comments.
(.bpenv) raja@raja-HP-Pavilion-Gaming-Laptop-15-dk1xxx:~/Raja/synthetic_image$ blenderproc debug BlenderProc/blenderproc/scripts/quickstart.py
Using blender in /home/raja/Raja/synthetic_image/blender-3.3.1-linux-x64/
Traceback (most recent call last):
File "/home/raja/Raja/synthetic_image/.bpenv/bin/blenderproc", line 33, in <module>
sys.exit(load_entry_point('blenderproc', 'console_scripts', 'blenderproc')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/raja/Raja/synthetic_image/BlenderProc/blenderproc/command_line.py", line 147, in cli
SetupUtility.check_if_setup_utilities_are_at_the_top(path_src_run)
File "/home/raja/Raja/synthetic_image/BlenderProc/blenderproc/python/utility/SetupUtility.py", line 405, in check_if_setup_utilities_are_at_the_top
raise RuntimeError(f'The given script "{path_to_run_file}" does not have a blenderproc '
RuntimeError: The given script "BlenderProc/blenderproc/scripts/quickstart.py" does not have a blenderproc import at the top! Make sure that is the first thing you import, as otherwise the import of third-party packages installed in the blender environment will fail.
Your code:
#####################
"""
The quickstart example:
""####################
Replaces this with:
""import blenderproc as bproc"