With the help from Magso in this thread, was possible to achieved (at least partially) the goal.
extends Spatial
var frame = 0
var file_name = ""
var path
var path_start = "c:/Screenshots/screenshot_" #make sure the path exist before play
var path_end = ".png"
var go_ahead = 0.0
var fps = 24.0
var framerate = 0.0
func _ready(): #start the animation
var Animation_player = get_node('AnimationPlayer')
Animation_player.play("Animation") #don't know why, but I need to put the name of the animation here to start the animation.
Animation_player.stop(true) #stops and reset the animation to the begin.
func _process(_delta):
frame = frame + 1 #calculate the actual frame to render
file_name = str(frame) #convert to sting and store in file_name to compose the name of png file.
path = path_start + file_name + path_end #compose the path with the name.
var image = get_viewport().get_texture().get_data() #get the image
image.flip_y() # flips the image
image.save_png(path) #save the image
var Animation_player = get_node('AnimationPlayer')
Animation_player.seek(go_ahead, true) #go to the position in time
framerate = 1/fps #calcaultes how much increment the time position for the next time
go_ahead = go_ahead + framerate #update the next time position
It's not perfect yet cause the engine doesn't jump exactly to the "animation time position". So what's "rendered" in Godot it's not pixel prefectly/exactly what the 3D software would render (the objects often appears a little offset in time inside what's expected) and all the animation is offset by 2 frames. But for now it's gonna do the job. (update)
As far as I could test the time offset of objects animated looks like to have some consistency. So maybe the only problem is how I'm calculating the time position based on a division: 1/(frame per second from the animation). So problably it's not a bug, it's a feature. Would be nice to achieve that, so we could mix renders (like render smoke in other software and compose with what Godot render.
So if anybody know how to solve this would be great! (I added the code here so maybe it can help somebody and fix this last issue.
update: I found 2 problems in my workflow. The first I didn't know it was necessary to change the FPS of the scene imported inside Godot. So to things works better go to "Import" tab in godot, go down to find "Fps" value and change to the framrate you have in your 3D aplication. And the second (and was what was generating the offset time problem) and most important, in the "Import" tab in godot yet, go a little bit down and disable the "Optimizer". It was deleting and interpolating the frames the engine doesn't consider necessary. With this two things right, the code run perfectly without any visibly delay in the animation, thoug when I try to use the command line option (--fixex-fps), continue to produce some errors.