Godot version:
3.1 alpha 4 (downloaded from here)
OS/device including version:
Windows 8, Toshiba Satellite
Issue description:
Clicking the keyframe icon next to a shader parameter in the inspector does not keyframe the current value into the animation. It doesn't do anything.
It appears you cannot keyframe the shader itself or the render_priority either.
Steps to reproduce:
Sprite with an AnimationPlayer child.Sprite with some uniform.Minimal reproduction project:
TestProject.zip
Actually, I think you can't keyframe stuff that isn't a node, i.e you cannot keyframe resources, and shader uniforms (aka ShaderMaterial) are one of them.
Resource properties have a keyframe icon shown next to them, but clicking it does nothing and prints an error.
If I try to keyframe a ShaderMaterial property:
ERROR: emit_signal: Error calling method from signal 'property_keyed': 'InspectorDock::_property_keyed': Method expected 3 arguments, but called with 1.
At: core/object.cpp:1241
If I try to keyframe a CubeMesh size:
ERROR: emit_signal: Error calling method from signal 'property_keyed_with_value': 'EditorInspector::_property_keyed_with_value': Method expected 3 arguments, but called with 2.
At: core/object.cpp:1241
I wonder if keyframing resources was initially intented though. One thing to be aware of when you do this is to be aware of which nodes have this resource in common, because resources can be shared.
Interesting. You definitely could keyframe shader parameters in Godot 3.0.6, and it's very handy to be able to do so.
My guess is the intended behavior is for you to be able to keyframe these. If not, it should be.
I just tried for ShaderMaterial in 3.0.6, and there is a twist:
if you just setup the shader, the default value in ShaderMaterial is null, and can't be keyframed either. But, if you manually click that property, and enter any value, it gets set to a non-null value, and only then, it CAN be keyframed.
This also happens in 3.1 alpha4, even though the inspector appears to show a default value. If you have a vec3 parameter, just set it to (1, 0, 0) for example, and then you'll see Godot will allow you to keyframe it when you click on the key icon.
It's very strange, could be related to https://github.com/godotengine/godot/issues/24488
Yeah, I noticed that in 3.0.6 as well. In 3.1, I have a float uniform that I just can't seem to get keyframed, even if I manually change the value from the default in the inspector.
I'm using hint_range(0, 1). I wonder if that has something to do with it. I'll keep experimenting.
I am also facing that issue when trying to keyframe some settings in a ProceduralSky inside a WorldEnvironment node. A current workaround is to change the track name to what you need, in my case "WorldEnvironment:environment:background_sky:sky_top_color", it should work as intended after that.
I believe it might be related to how the new UI is set up, it might not be providing the correct values for the keyframe button, so anything that is not a direct property of the node or has more than one level (e.g. resource properties) won't work.
Most helpful comment
I just tried for
ShaderMaterialin 3.0.6, and there is a twist:if you just setup the shader, the default value in
ShaderMaterialisnull, and can't be keyframed either. But, if you manually click that property, and enter any value, it gets set to a non-null value, and only then, it CAN be keyframed.This also happens in 3.1 alpha4, even though the inspector appears to show a default value. If you have a
vec3parameter, just set it to(1, 0, 0)for example, and then you'll see Godot will allow you to keyframe it when you click on the key icon.It's very strange, could be related to https://github.com/godotengine/godot/issues/24488