Moguri / BlenderPanda

Blender addon for integrating Panda3D
MIT License
76 stars 11 forks source link

Error when creating/opening project and rendering #45

Closed typewriter1 closed 5 years ago

typewriter1 commented 5 years ago

I have managed to install and enable the addon thanks to the fixes in 0.4.1. However when I create a new project using the "Create New Project" button or open one using "Switch Project" button, I get the following error on the system console (window -> enable system console):

Updating project in C:\Users\avise\Desktop\Games\blender_panda_project\
Creating directories...
        Skipping existing directory: C:\Users\avise\Desktop\Games\blender_panda_project\assets/
        Skipping existing directory: C:\Users\avise\Desktop\Games\blender_panda_project\game
        Skipping existing directory: C:\Users\avise\Desktop\Games\blender_panda_project\tests
Creating C:\Users\avise\Desktop\Games\blender_panda_project\game/main.py
        C:\Users\avise\Desktop\Games\blender_panda_project\game/main.py already exists, skipping
Creating C:\Users\avise\Desktop\Games\blender_panda_project\requirements.txt
        C:\Users\avise\Desktop\Games\blender_panda_project\requirements.txt already exists, skipping
Creating C:\Users\avise\Desktop\Games\blender_panda_project\setup.py
        C:\Users\avise\Desktop\Games\blender_panda_project\setup.py already exists, skipping
Creating C:\Users\avise\Desktop\Games\blender_panda_project\setup.cfg
        C:\Users\avise\Desktop\Games\blender_panda_project\setup.cfg already exists, skipping
Creating C:\Users\avise\Desktop\Games\blender_panda_project\.pylintrc
        C:\Users\avise\Desktop\Games\blender_panda_project\.pylintrc already exists, skipping
Creating C:\Users\avise\Desktop\Games\blender_panda_project\tests/test_imports.py
        C:\Users\avise\Desktop\Games\blender_panda_project\tests/test_imports.py already exists, skipping
Traceback (most recent call last):
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 26, in f
    value = pman.get_abs_path(project_conf, config[section][field])
KeyError: 'render_plugin'
File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 13, in f
Traceback (most recent call last):
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 26, in f
    value = pman.get_abs_path(project_conf, config[section][field])
KeyError: 'render_plugin'
File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 13, in f
Traceback (most recent call last):
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 26, in f
    value = pman.get_abs_path(project_conf, config[section][field])
KeyError: 'render_plugin'
File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 13, in f
Traceback (most recent call last):
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 26, in f
    value = pman.get_abs_path(project_conf, config[section][field])
KeyError: 'render_plugin'
File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\properties.py", line 13, in f

Blender does not crash, but if I leave the "Panda 3D" option for the render engine and change the viewport display method to "rendered" then the following error is thrown (perhaps due to the traceback regarding the render_plugin), and I observe only a blank screen with the grey-and-black chequered pattern that blender uses for transparency and a render that is being prepared.

Traceback (most recent call last):
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\panda_engine.py", line 143, in __init__
    ExternalConnection.get_ptr()
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\panda_engine.py", line 121, in get_ptr
    cls.ptr = ExternalConnection()
  File "C:\Users\avise\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlenderPanda\panda_engine.py", line 34, in __init__
    if user_config is not None and use_venv and user_config['python']['in_venv']:
NameError: name 'use_venv' is not defined

location: <unknown location>:-1

Like the other error, this error is also thrown more than once. It seems like the BlenderPanda viewport rendering system has been changed in some way - both from the release notes and from the fact that this works for me using the 0.3.0 release.

Moguri commented 5 years ago

This is a dumb mistake on my part. I'll get to work on a fix.

typewriter1 commented 5 years ago

Thank you! Error fixed. However the performance is not very good, the rendered window takes time to load and update.

Moguri commented 5 years ago

Yes, 0.4 has simpler, more robust logic for doing rendered viewport. However, this new method is pretty brute force and introduces a fair amount of latency. Do you have a sample scene that you'd be able to send me so I can do some analysis? I have some ideas on how to get some performance back, but I could use a good test case to figure out what optimizations to try first. If you have a scene you do not mind sharing publicly, please feel free to file another bug report on performance with the sample scene attached. Otherwise, an email works (mogurijin at gmail dot com).