So I took a stab at it. I realize that TrumanBlending’s addon is still being developed, but I took his version 0.4 code and popped it into the frame change event architecture and sure enough, we have an animatable parametric tree.
I am attaching a BLEND file. The AddOn, itself is contained in the text window and is called addon_parm_tree.py. Simply press Play or scrub the timeline to see the effect of the animated tree.
This is the second release of the parametric tree add on. If you pulled down the first version, you may want to try this one again.
The Changes Are:
I integrated TrumanBlending’s v04 code instead of the v03 code. This makes less “Glitchy” trees when parameters are animated.
Awesome ideas Atom. It works well too! Just looking at how to minimise memory usage (I noticed there’s another thread for this too) have you tried something like;
bpy.data.curves.remove()
Or for meshes, here’s a complete example assuming you have the default cube in your scene.
I seem to crash blender with this sometimes, I might need to report it as a bug. I would be more than happy to work with you once the TreeGen script is finalised to make this animation as good as it can be!
Cheers,
Truman
Hi Atom, just been testing this script with a recent SVN, the counter / framechange seems to be happening, but none of the parametric controls seem to make any change to the tree… I don’t suppose you’ve used this script recently?
The problem is that the mesh is still linked to an object which is why .remove() fails (won’t delete a mesh with user_count > 0) so you end up with blender trying to dereference a null pointer which is never good.
You should never use .user_clear() unless your intention is to crash blender.