Page 1 of 1

keyboard macros ?

Posted: Thu Mar 01, 2007 5:09 am
by aplesch
I have imported a file with about 150 objects and would like to go through all of those to "remove doubles" (W,6) in edit mode.

I looked into python scripting but the remDoubles() function left the meshes in an unusable, corrupt state. A posting on blenderartists was about the same issue (, so I concluded that this approach just does not work.

My next idea was to remote control blender by feeding it key stroke events. I use blender on linux, and I found the xvkbd -text "blenderkeys" works pretty well when the command is assigned to keyboard shortcut controlled by the window manager.

However, it appears that the key stroke are delivered too fast in some cases by xvkbd, eg.

xvkbd -text "\taw6\r\t"

does not work as expected (TAB AKEY WKEY 6KEY enter TAB).

It works better if a pause is introduced at the right places as in

xvkbd -text "\taw"; sleep 0.5; xvkbd -text "6"; sleep 0.5; xvkbd -text "\r\t"

Still, in rare, unforeseeable cases blender gets confused after applying the shortcut key which triggers the above command: all objects disappear and AKEY does not select anything or TAB does not change into edit mode.

Are there other ways to "remote controle" blender ? Did anybody use a similar approach in cases where scripting did not seem to be helpful ?