How to store data during a blender session
After some more discussion we now arrived at the following solution to my original problem: use a new class and put you data in a static variable.
For the coloring of meshes during an animation, this solution (in its simplest form) looks like this:
import bpy
from radthcolormesh.colormesh import ColorMesh
class CMStorage :
colorMesh = ColorMesh()
def applyColor(scene) :
CMStorage.colorMesh.colorMesh('Suzanne')
bpy.app.handlers.frame_change_pre.append(applyColor)
Which looks nice and simple and can be easily expanded.
No comments:
Post a Comment