VTK use smart pointer to handle objects in c++. It is garbage collection in python. All the objects will be unavailable out of scope unless you keep ref count on them.
I return those objects in functions. So far, it works for me.
All the regular objects in vtk module work. But I also use vtk.util.numpy_support for the conversion between numpy data and vtk data. I have to use deep = True to make a deep copy. Otherwise, numpy arrays are garbage collected out of the scope.
Monday, June 23, 2014
Saturday, June 21, 2014
Add f-curve to video editing in blender
Adding f-curve in video editing it anti-intuitive. There is no direct solution when I google. Finally I found a clue.
You must point at the properties, such as scale and rotation,first. Then use your short cut "I" to insert the current key frame. Everything works the same as it does in 3D the editor.
You must point at the properties, such as scale and rotation,first. Then use your short cut "I" to insert the current key frame. Everything works the same as it does in 3D the editor.
Wednesday, June 11, 2014
auto suspend with xautolock
xautolock -time 20 -corners -000 -detectsleep -locker "systemctl suspend"&
This cmd will put the computer suspended after 20 min or move you mouse to left-up corner for a while.
You can put this cmd in some setup script.
This cmd will put the computer suspended after 20 min or move you mouse to left-up corner for a while.
You can put this cmd in some setup script.
Subscribe to:
Posts (Atom)