3
$\begingroup$

I have an OSL shader that I added to a material. I keyframed one of the float properties on the shader. How can I view this on the graph editor?

Right now the only way I know how to change the keyframe value is go to the NLA view (graph editor and timeline are both empty), right click the Material->Shader and select "Start editing stashed action". This will at least show me where the keyframes are so I can delete them, but I would like to adjust the interpolation between keyframes.

This answer doesn't work to set the interpolation because the graph editor is empty, so it just says in red "Disabled: there is no animation data to operate on".

(Perhaps there is a python answer?)

img

$\endgroup$

2 Answers 2

3
$\begingroup$

By default, animation editors only show the keys of selected elements. So, for anything that happens in a shader, not only you need to select an object wearing that shader, but you also need to select the node wearing the keyframes.

Alternatively, you can disable the Only Show Selected filter.

Demo pic

$\endgroup$
0
$\begingroup$

Hopefully there is a better answer than this, but I managed to work something out in python.

I got the name of the "action" from the NLA editor. It's the value in the workspace area, not anything in the tree on the left. In my case, this is the string Shader NodetreeAction.010.

import bpy

action = bpy.data.actions['Shader NodetreeAction.010']
change_count = 0
for fc in action.fcurves:
    for kfp in fc.keyframe_points:
        kfp.interpolation = 'LINEAR'
        change_count += 1

print("updated " + str(change_count))
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .