NickTiny / Blender-VR-Controller-Capture

4 stars 0 forks source link

Permissions Error when Starting MoCap Session #2

Open NickTiny opened 3 months ago

NickTiny commented 3 months ago

This Error comes when starting a new mocap session, the software cannot overwrite the default configuration.

Python: Traceback (most recent call last):
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\Blender-VR-Controller-Capture\mocap_operators.py", line 196, in execute
    vr_mocap_actionmaps_clear(context, context.window_manager.xr_session_state)
  File "C:\Users\nalbe\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\Blender-VR-Controller-Capture\mocap_actionmaps.py", line 1400, in vr_mocap_actionmaps_clear
    action_map.vr_save_actionmaps(session_state, filepath, sort=False)
  File "c:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\addons\viewport_vr_preview\action_map.py", line 118, in vr_save_actionmaps
    action_map_io.actionconfig_export_as_data(session_state, filepath, sort=sort)
  File "c:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\addons\viewport_vr_preview\action_map_io.py", line 201, in actionconfig_export_as_data
    with open(filepath, "w", encoding="utf-8") as fh:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'c:\\Program Files\\Blender Foundation\\Blender 4.1\\4.1\\scripts\\addons\\viewport_vr_preview\\configs\\default.py'

The only workaround I have is to run Blender in administrator mode for now, I will improve the error handling, and hopefully find a workaround to this issue soon, likely the best solution is implementing my own keymap and setting it the way a custom keymap is set in VR Scene inspection, instead of overwriting the defaults file. Again the software isn't ready for release yet, this is one of the reasons why.