linking material animation data to objects


does anyone know if it is possible to link a material’s (and all of its textures) animation data to an object rather than to the material.

IE. i have a mushroom object (which has an animated material on it). I make 500 duplicates of the mushroom, each of which has different animation data (generated by a script). I want to adjust the animation of the material on each object separately… do I have to duplicate the material and all of its textures?


If the animation data is linked to the material it is part of the object as well. Does this make sense?

@ptbbastos: yes, but i needed to make the animation data for the material different on each object the material appears. I emailed Aligorith and got an answer. It seems there’s no easy way to migrate an animation_data block from material level to object, but it is possible:

Both of these have been possible from the start, though the default
setups don’t do this by default.

Basically, you’re going to need to:

  1. Get those F-Curves attached to those datablocks
  2. Add some extra parts to the ‘data_path’ for these F-Curves (*)
  3. Move (or probably copy) these over to the Object level

The extra parts you’ll need are as follows:

  • Materials: add to the start of the path
    where MaterialName is whatever your material is called

  • Textures: add to the start of the path the stuff for Materials, followed by
    where TexSlotName is the name of the relevant texture slot

  • ShapeKeys: add to the start of the path

To find out these sorts of paths:

  1. go to the Outliner -> Datablocks view.
  2. find the Object name (expand Objects)
  3. from there, search down until you find whatever property you were after
  4. click on empty space beside the name to highlight the row, then
    KKEY to add that property to a KeyingSet.
  5. in Properties Editor, Scene Panels, find the “Keying Set Paths”
    panel, and study the paths included there. You could also use these
    paths to directly insert keyframes too if you like :slight_smile:

I didn’t have much luck with this an noted in
…although that bug may just apply to shape key data

for the pythoners i could not get insert_keyframes(data_path) to work with deep data_paths, eg. data_path=material_slot[0].material.ambient etc.