Hello
is there a python script that makes a 3d text object counts up every second or let’s say every 25 frames
I want to make a cartoon wall bomb, and want to make a counter
Hello
is there a python script that makes a 3d text object counts up every second or let’s say every 25 frames
I want to make a cartoon wall bomb, and want to make a counter
Sure, you can use the frameChanged event in 2.49 for this.
Add this code to a text window:
import Blender as B
if (B.bylink):
actualFrame = B.Get("curframe")
objText = B.link
tempOBJ = objText.getData()
result = "Default"
if (actualFrame == 1): result = "Rewind"
if (actualFrame > 1):result = "Playing..."
if (actualFrame > 30):result = "One Second"
if (actualFrame > 60):result = "Two Seconds"
if (actualFrame > 90):result = "Three Seconds"
if (actualFrame > 120):result = "Four Seconds"
tempOBJ.setText(result)
objText.makeDisplayList()
B.Window.RedrawAll()
With the font object is selected, activate the script link icon and enable script links. You have two options at this point, you can add a script to the scene, or the selected object. The above script works on the selected object. So click new for “Selected Script link” and choose the name of your text window from the list.
Now, when you advance the frame, the text will change. Alter the code to make your counter or display as you like.
nice!, now how to make the text get’s typed…
each frame a letter, i’m no python expert :o