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',
'TRIA_DOWN',
'TRIA_LEFT',
'TRIA_UP']
@classmethod
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():
bpy.utils.register_class(LayoutDemoPanel)
def unregister():
bpy.utils.unregister_class(LayoutDemoPanel)
if __name__ == "__main__":
register()
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':
a.tag_redraw()
bpy.app.handlers.frame_change_post.append(redraw_props)