2.80 Cheat Sheet for updating add-ons

Nice little list you have created, thanks for posting it!


Recently I have been updating my own legacy code while attempting to maintain support for both versions in a single file.

I have declared LEGACY_MODE as the switch that toggles between the two command sets based on the version tuple provided by bpy.app.version.

Example:

LEGACY_MODE = bpy.app.version < (2, 80, 0) #Switch based on version for Blender 2.8+ or legacy support.
...

...
o = byp.data.object[0]
if LEGACY_MODE:
    o.hide = False #unhide object using legacy commands
else:
    o.hide_viewport = 0 #unhide object using modern commands

Anyways, just felt like sharing something :slight_smile:

1 Like