Is there any possibility to load animated gifs as a custom icon, which then would be viewed as animated sequence right in the preview? for now, it's just blank and no static preview generated

For testing I used the "Ui previews dynamic enum" template in python templates (in Text editor)

enter image description here

EDIT: IF there is no possibility to load gif, anyone here knows the alternative? Maybe fake somehow animated preview, but for user it'll be looked like gif animation

  • 1
    $\begingroup$ AFAIK animated gifs are not supported by blender. $\endgroup$
    – batFINGER
    Aug 8, 2018 at 9:39
  • 1
    $\begingroup$ One option coul be to draw your own stuff with bgl module somewhere in the UI. You would have to update that draw call in app.handler to make an animation or to use a modal operator if you needed to react to user input. $\endgroup$ Aug 8, 2018 at 10:37

1 Answer 1


Fudge it via the draw system.

Emulating the frames of an animated gif by using the 4 triangle icons. The simple panel template has been edited to add this "animated" icon to a label. The icon will step thru its list when the draw is called and panel updated. Mousing over the area, scrolling the area etc will tick the animation.

import bpy

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"
    i = 0
    icons = ['TRIA_RIGHT',

    def icon(cls):
        cls.i += 1
        if cls.i >= len(cls.icons):
            cls.i = 0
        return cls.icons[cls.i]

    def draw(self, context):
        layout = self.layout
        layout.label("Anim %d" % self.i, icon=self.icon())

def register():

def unregister():

if __name__ == "__main__":

Ok that's not too impressive, need some way to tie it to time better. As an example redraw the properties area on a frame change. Run code and start an animation to see effect.

import bpy

def redraw_props(scene):
    for a in bpy.context.screen.areas:
        if a.type == 'PROPERTIES':


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.