Blender 2.8 came out and the egg format is outdated and there is no alternative yet. I decided to check out other suitable animation formats. First of all, I checked the X format. However, the code that works in 1.7.2 and 1.8.0 refuses to work 1.10.3
import direct.directbase.DirectStart
from direct.actor.Actor import Actor
DemoAnim = Actor()
DemoAnim.loadModel('model.X')
DemoAnim.loadAnims({'Anim':'model.X'})
DemoAnim.loop('Anim', 'Anim-2')
DemoAnim.reparentTo(render)
run()
Animation just doesn’t play. Actually, what will this code look like on 1.10.3?
Using deprecated DirectStart interface.
Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
Traceback (most recent call last):
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 444, in __playTask
again = self.stepPlay()
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 329, in stepPlay
self.privInstant()
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 233, in privInstant
self.privStep(self.getDuration())
File "C:\Panda3D-1.10.3-x64\direct\interval\ActorInterval.py", line 144, in privStep
intFrame = int(math.floor(absFrame + 0.0001))
ValueError: cannot convert float NaN to integer
:task(error): Exception occurred in PythonTask Actor-Anim-1-play
Traceback (most recent call last):
File "Demo.py", line 19, in <module>
base.run()
File "C:\Panda3D-1.10.3-x64\direct\showbase\ShowBase.py", line 3121, in run
self.taskMgr.run()
File "C:\Panda3D-1.10.3-x64\direct\task\Task.py", line 531, in run
self.step()
File "C:\Panda3D-1.10.3-x64\direct\task\Task.py", line 485, in step
self.mgr.poll()
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 444, in __playTask
again = self.stepPlay()
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 329, in stepPlay
self.privInstant()
File "C:\Panda3D-1.10.3-x64\direct\interval\Interval.py", line 233, in privInstant
self.privStep(self.getDuration())
File "C:\Panda3D-1.10.3-x64\direct\interval\ActorInterval.py", line 144, in privStep
intFrame = int(math.floor(absFrame + 0.0001))
ValueError: cannot convert float NaN to integer
I suspect that the difference is that 1.10 might prefer using the Assimp-based X importer as opposed to the old x2egg process. What if you explicitly invoke x2egg and load the resulting egg?