can't create Shader Param keyframes - error message

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By atom

I have a shader with some parameters that can be edited from the Inspector (using uniforms).
When I click on key icon, to make a keyframe of those parameters in my AnimationPlayer, nothing happens. I get this error message in Output :

   core/object.cpp:1241 - Error calling method from signal 'property_keyed_with_value' :  'EditorInspector::_property_keyed_with_value': Method expected 3 arguments, but called with 2.

I understand it is missing an argument but can’t figure out what’s about.
One of my parameter is a scalar value and the other one a vector but it doesn’t seem related directly to those custom parameters as other parameter from the shader like modes/blend or flags/light_only for example, won’t fire keyframe either.

:bust_in_silhouette: Reply From: atom

Ok, found out. I was trying to make shader param keyframes directly from the inspector on selected node. But first you need to edit ShaderMetrial in the inspector to be abble to set keyframes on shader param.

Would you mind elaborating or providing a screenshot of the setting you’re talking about? I’m having the same issue and am having difficulties finding it.

GammaGames | 2018-12-17 04:08

Sorry for my late reply :

  • Open Animation window from your scene.
  • Then Select the node using your shader.
  • In the Inspector window of that node go to Material, expand, and click the small arrow next to “ShaderMaterial”.
  • In the sub menu click “Edit”.
  • Inspector now shows up your shader parameters and you can keyframe them with the small key next to it.
    (using Godot v3.1-alpha3)

atom | 2018-12-29 20:34

Raising this from the dead in case I can help someone with more info.

I got here because I was having the same problem, and the solution presented didn’t work for me until I edited my shader code to have an initial value.

So uniform vec3 uv1_offset; would not allow me to set a keyframe (the icon was there, but clicking it did nothing).

uniform vec3 uv1_offset = vec3(0, 0, 0); on the other hand allowed me to set a keyframe and animate my UVs.

idletalent | 2020-08-12 16:26

Dude, this one was tricky but you nailed it, keep it up!.

lofi | 2021-02-03 21:32