+1 vote

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.

asked Dec 14, 2018 in Engine by atom (35 points)

1 Answer

0 votes
Best answer

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.

answered Dec 14, 2018 by atom (35 points)

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.

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)

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.