a guest Jun 26th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import bpy
- from random import randint #We need something to generate random numbers with
- def random_numbers(scene):
- #card number reset to empty string
- if (scene.frame_current%5==0):
- #every 5th frame could be every frame number that has no reminder after dividing by 5
- for group_of_4 in range(0,4):
- #we need to do it 4 times so let's use a loop instead of typing
- card_number += str(randint(0,9999)).zfill(4) + ' '
- #zfill is for leading zeros
- bpy.data.objects['Text'].data.body = card_number
- #let's write the text to the text object
RAW Paste Data