armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.07k stars 315 forks source link

[Nodes] Simulation stops with "Cannot read property 'length' of undefined" error when call the "Play Action" node #1524

Closed BTCallahan closed 4 years ago

BTCallahan commented 4 years ago

Description What I have is a simple node set-up. A deformable mesh is parented to an armature, which is parented to a rigid body object.

The rigid body object has a node tree that lets the player control it movements with the WASD keys and space bar.

The armature has another node tree that lets the player control it's animations with the keys 1 and 2. Specifically, they work by calling the "Play Action" node for the animations "Action", and "Shrink top".

When I play the file, the movement keys work fine, until I press 1 or 2. When it do, I get the error message: Trace: TypeError: Cannot read property 'length' of undefined at iron_object_BoneAnimation.setMats (<anonymous>:11618:51) at iron_object_BoneAnimation.setActionBlend (<anonymous>:11681:8) at iron_object_BoneAnimation.play (<anonymous>:11699:10) at armory_logicnode_PlayActionNode.run (<anonymous>:1089:13) at armory_logicnode_PrintNode.runOutput (<anonymous>:650:8) at armory_logicnode_PrintNode.run (<anonymous>:1106:8) at armory_logicnode_OnKeyboardNode.runOutput (<anonymous>:650:8) at armory_logicnode_OnKeyboardNode.update (<anonymous>:1065:9) at iron_App.update (<anonymous>:5516:27) at kha_TimeTask.task (<anonymous>:23617:3)

Also, the simulation completely stops and becomes unresponsive to further keyboard input. If the object is in the air, ceases to be affected by gravity and simply hangs there.

To Reproduce Unzip the file and open it in Blender and click "Play". Press the space bar to jump, and while the cube is in the air, press 1 or 2.

Expected behavior The the animations would play without any problems.

System Blender: 2.81a Armory: 2019.11.0 OS: Fedora 30 Graphics card: GeForce GTX 1650/PCIe/SSE2 node animation.zip

Test File (drag & drop the zipped .blend file here)

Sandy10000 commented 4 years ago

You need to create a strip with the actions "Action" and "Shlink top" in the Nonlinar Animation (NLA) editor.

"Action" will solve the problem if you do this. "Shrink top" no longer gives an error when you do this. But it doesn't work.

"Shrink top" is a bone animation that changes size, but I don't know why it doesn't work.