I needed a very simple and quick profiler - this is what I came up with. Youll notice its very like a C define, oh well :)
from time import time
PROFILE_STACK = []
def BEGIN_PROFILE(thing):
ind = " " * len(PROFILE_STACK)
PROFILE_STACK.append((thing, time()))
print "%sBEGIN_PROF %s" % (ind, thing)
def END_PROFILE():
thing, start = PROFILE_STACK.pop()
ind = " " * len(PROFILE_STACK)
print "%sEND_PROF %s = %.3f" % (ind, thing, time()-start)
You simply wrap blocks of code in BEGIN_PROFILE('some string ident') and END_PROFILE() and it will print the execution time.
Im still fighting with pywracer physics unfortunatly and now Im vaguely tempted to try my hand at a golf game. There arent any free golf games! ( unless we count neverputt )








The instances are linked from other .blend files via blenders library stuff. With my export script you can "bake" the instances ( which copies all the linked meshes to real meshes ) and with these you can bake the lighting as they are in the scene. Blimey...
That screenshot was also baked with Ambient Occlusion ( which is nice ) - a nice advantage of using blender :)


