Skip to content

Commit

Permalink
object_animrenderbake: suppress errors registering
Browse files Browse the repository at this point in the history
  • Loading branch information
ideasman42 committed Oct 16, 2020
1 parent 26a8b2e commit eae381b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions object_animrenderbake.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,16 @@ def register():
description="End frame of the animated bake",
default=250)

bpy.types.CYCLES_RENDER_PT_bake.prepend(draw)
cycles_panel = getattr(bpy.types, "CYCLES_RENDER_PT_bake", None)
# if cycles_panel:
# cycles_panel.prepend(draw)
if cycles_panel:
cycles_panel.prepend(draw)


def unregister():
# restore original panel draw function
del bpy.types.Scene.animrenderbake_start
del bpy.types.Scene.animrenderbake_end

bpy.types.CYCLES_RENDER_PT_bake.remove(draw)
cycles_panel = getattr(bpy.types, "CYCLES_RENDER_PT_bake", None)
if cycles_panel:
cycles_panel.remove(draw)
Expand Down

0 comments on commit eae381b

Please sign in to comment.