# text from updating file

I'm learning to use blender in order to get this result: when I push a button on pygame I'll have a solid, like a stone, appearing from the ground. on this "stone" I would have written a text from a file that changes every time I use this function. I would only ask if it's possible with blender to have this result, or it's better to give up and think something more easy to do? thanks for the help.

• Do you want the text to be a texture on the stone or can it be a separate text object? – maddin45 Jun 11 '14 at 6:33
• Is this an animation? Or are you using the BGE? – gandalf3 Jun 11 '14 at 6:34
• @maddin45 - I would have a texture on the stone. – user3072083 Jun 11 '14 at 10:50
• @gandalf3 - I don't know what is BGE but I would have the stone (or a box) come out the floor and some text printed on it (if possible!!) – user3072083 Jun 11 '14 at 10:53

It's not clear to me how this is related to pygame so I focus on this part of your question:

I would only ask if it's possible with blender to have this result

Yes, you could create an action with two keyframes (start and end position of z coordinate of your cube).

At the right side you see the action "CubeAction" in the Dope Sheet (set to Action Editor) At the bottom a Keyboard Sensor which is active when Space is pressed and an Action Controller which plays the animation stored in the action.

To dynamically create the text object one idea would be to copy it in the text-editor and use:

bpy.ops.text.to_3d_object(split_lines=True)


This function is probably not available while the game engine is running For how to load a text into the editor see: How to programmatically load a python script in Text Editor and launch it

How to port this to pygame isn't on topic here.

• the suggestion for blender is just what I need, thanks. relating to pygame, I still have to verify but I think to use a button to launch my blender animation. – user3072083 Jun 11 '14 at 10:47