Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- def turn_on(view_layer: bpy.types.ViewLayer, collection_include: bpy.types.Collection):
- for layer_collection in view_layer.layer_collection.children['ScriptAnimated'].children:
- if layer_collection.collection == collection_include:
- layer_collection.exclude = False
- def turn_off(view_layer: bpy.types.ViewLayer, collection_include: bpy.types.Collection):
- for layer_collection in view_layer.layer_collection.children['ScriptAnimated'].children:
- if layer_collection.collection == collection_include:
- layer_collection.exclude = True
- def every_frame(scene):
- print("Frame Change", scene.frame_current)
- view_layer = bpy.context.scene.view_layers['View Layer']
- #collection exclude animation
- if scene.frame_current == 700:
- turn_off(view_layer, bpy.data.collections["Отметки"])
- elif scene.frame_current == 1001:
- turn_on(view_layer, bpy.data.collections["Отметки"])
- #motion blur animation
- if scene.frame_current == 2100:
- bpy.context.scene.eevee.use_motion_blur = False
- elif scene.frame_current == 2101:
- bpy.context.scene.eevee.use_motion_blur = True
- bpy.app.handlers.frame_change_pre.append(every_frame)
Advertisement
Add Comment
Please, Sign In to add comment