Take the 2-minute tour ×
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

I'm trying to use animation markers for events in a game engine. I added several actions to a test file and a few markers.

The markers seem to be the same in all actions, and editing a marker with one action active changes the marker in the other actions.

So the question is, are animation markers stored similar to keyframes inside an action, or are they stored outside the animation? Are they purely meant as an editing tool? Is there a separate mechanism to mark animation events or do I need to script something myself?

share|improve this question
    
Perhaps you could better define "animation" event. I suspect that you're not being granular enough in your actions. That is, if you're defining multiple "animations" within a single action, then that should probably be further broken up into smaller actions. –  Fweeb Feb 19 at 14:36
    
Animation events are used for example to trigger sound effects or particle systems. Or for example to mark the point in an attack animation where damage should be applied. CoDEmanX's answer is exactly what I was looking for. –  user1387 Feb 19 at 15:59
add comment

1 Answer

up vote 6 down vote accepted

It depends, there are Timeline Markers and Pose Markers.

Timeline markers are stored at scene level, whereas Pose markers are stored in an action:

# Timeline markers of current scene
bpy.context.scene.timeline_markers

# Pose markers for 'CubeAction'
bpy.data.actions['CubeAction'].pose_markers

In the Dope Sheet editor, switch to Action Editor.

Click the menu Marker > Show Pose Markers to see pose markers.

With this enabled, creating markers will add pose markers!
(Pose markers show a diamond-shaped icon)

With Show Pose Markers disabled, you may select Timeline markers (they show a triangular icon) and click Marker > Make Markers Local to convert them to Pose markers. Note that the original Timeline marker will be gone. If you want to keep it, make a duplicate before you convert (ShiftD, Esc).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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