Skip to main content
fix code
Source Link
HikariTW
  • 7.9k
  • 2
  • 20
  • 38

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    name = 'Cube'
    objs = [obj for obj in scene.objects.values() if name in obj.name]

    for i, obj in enumerate(objs):
        obj.hide_set(i != ((scene.frame_current-1) % len(objs))) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_lenlen(objs))) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Change the 'Cube' to the name you want to specified ('' means no limit), if the object name contain the name, it will count toward this script.

Also if you run a previous script before, restart your blender to the clear the handlers.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    name = 'Cube'
    objs = [obj for obj in scene.objects.values() if name in obj.name]

    for i, obj in enumerate(objs):
        obj.hide_set(i != ((scene.frame_current-1) % len(objs))) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Change the 'Cube' to the name you want to specified ('' means no limit), if the object name contain the name, it will count toward this script.

Also if you run a previous script before, restart your blender to the clear the handlers.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    name = 'Cube'
    objs = [obj for obj in scene.objects.values() if name in obj.name]

    for i, obj in enumerate(objs):
        obj.hide_set(i != ((scene.frame_current-1) % len(objs))) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % len(objs))) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Change the 'Cube' to the name you want to specified ('' means no limit), if the object name contain the name, it will count toward this script.

Also if you run a previous script before, restart your blender to the clear the handlers.

specified name
Source Link
HikariTW
  • 7.9k
  • 2
  • 20
  • 38

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    obj_lenname = len('Cube'
    objs = [obj for obj in scene.objects.values()) if name in obj.name]

    for i, obj in enumerate(scene.objects.values()objs):
        obj.hide_set(i != ((scene.frame_current-1) % obj_lenlen(objs))) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Change the 'Cube' to the name you want to specified ('' means no limit), if the object name contain the name, it will count toward this script.

Also if you run a previous script before, restart your blender to the clear the handlers.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    obj_len = len(scene.objects.values())
    for i, obj in enumerate(scene.objects.values()):
        obj.hide_set(i != ((scene.frame_current-1) % obj_len)) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    name = 'Cube'
    objs = [obj for obj in scene.objects.values() if name in obj.name]

    for i, obj in enumerate(objs):
        obj.hide_set(i != ((scene.frame_current-1) % len(objs))) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Change the 'Cube' to the name you want to specified ('' means no limit), if the object name contain the name, it will count toward this script.

Also if you run a previous script before, restart your blender to the clear the handlers.

change to pre handler
Source Link
HikariTW
  • 7.9k
  • 2
  • 20
  • 38

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    obj_len = len(scene.objects.values())
    for i, obj in enumerate(scene.objects.values()):
        obj.hide_set(i != ((scene.frame_current-1) % obj_len)) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_postframe_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    obj_len = len(scene.objects.values())
    for i, obj in enumerate(scene.objects.values()):
        obj.hide_set(i != (scene.frame_current % obj_len)) # Blender 2.80
        # obj.hide = (i != (scene.frame_current % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_post.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

You can use script for it, with scene.frame.current combine with bpy.app.handlers.frame_change_post.append()

Here is a simple script work in Blender 2.80, paste in text block and run it, it will loop the object hide value with the current frame:

import bpy

def ani_handler(scene):
    obj_len = len(scene.objects.values())
    for i, obj in enumerate(scene.objects.values()):
        obj.hide_set(i != ((scene.frame_current-1) % obj_len)) # Blender 2.80
        # obj.hide = (i != ((scene.frame_current-1) % obj_len)) #Blender 2.79b

bpy.app.handlers.frame_change_pre.append(ani_handler)

if you want to try in Blender 2.79b below, change the # in head from 2.79b to line 2.80.

Source Link
HikariTW
  • 7.9k
  • 2
  • 20
  • 38
Loading