mikeycal / the-video-editors-render-script-for-blender

A cross platform script that renders non-3D blender projects faster and gives access to additional FFmpeg features
GNU General Public License v3.0
208 stars 27 forks source link

AttributeError: 'Context' object has no attribute 'user_preferences'. #26

Open miguev opened 1 year ago

miguev commented 1 year ago

The latest (master) version of the script (Sep 17, 2020) fails with Blender 3:

Sound Found
Error: Python: Traceback (most recent call last):
  File "/home/miguev/Fotos/scripts/video_editors_render_script_2020_blender_snap.py", line 520, in <module>
    try_sample_format = bpy.context.user_preferences.system.audio_sample_format
AttributeError: 'Context' object has no attribute 'user_preferences'. Did you mean: 'preferences'?

Blender quit

This seems to happen because blender_ver has only 3 digits, at least for some versions (e.g. 340 for Blender 3.4.1).

miguev commented 1 year ago

I should also mention that, other than this, the script works wonderfully well with Blender 3.