This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def scan(): | |
| for obj in bpy.data.objects: | |
| for ctrl in obj.game.controllers: | |
| print("# bpy.data.objects['%s'].game.controllers['%s']"%\ | |
| (obj.name, ctrl.name)) | |
| if ctrl.type == 'PYTHON' and ctrl.mode == 'MODULE' and \ | |
| ctrl.module.startswith('calling.'): | |
| # TODO remove it | |
| print("### module: %s"%ctrl.module) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # http://robotpkg.openrobots.org/install.html | |
| # http://robotpkg.openrobots.org/robotpkg-wip.html | |
| # | |
| # I use ${HOME} as root of both `robotpkg` and `openrobots` | |
| # I already installed ROS Fuerte from .deb's in `/opt/ros/fuerte` | |
| # and `source /opt/ros/fuerte/setup.bash` in my ~/.bashrc | |
| # | |
| # stuff robotpkg told me to install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # my bashrc | |
| # | |
| # ROS setup | |
| #source ~/work/ros-addons/setup.bash | |
| #source /opt/ros/groovy/setup.bash | |
| source /opt/ros/fuerte/setup.bash | |
| # Python CLI completion and history |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -g default-terminal "screen-256color" | |
| set -g status-utf8 on | |
| bind M source-file ~/.tmux/mac.session | |
| bind L source-file ~/.tmux/linux.session | |
| # set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
| # THEME | |
| set -g status-bg black |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import bpy | |
| def process(filepath): | |
| print("import %s"%filepath) | |
| bpy.ops.import_mesh.stl(filepath=filepath) | |
| for obj in bpy.context.selected_objects: | |
| obj.scale = (.01, .01, .01) | |
| print("done") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| blender --background ~/catmouse.blend --render-output ~/render/render --frame-start 481 --frame-end 3000 --render-anim& | |
| avconv -i ~/render/render%04d.png -b 20M -r 30 out20.avi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from morse.builder import * | |
| bpymorse.deselect_all() | |
| bpymorse.add_object(type="EMPTY") | |
| bpymorse.add_sensor(type="NEAR") | |
| obj = bpymorse.get_context_object() | |
| sensor = obj.game.sensors[-1] | |
| sensor.name = "Near" | |
| sensor.property = "Graspable" | |
| sensor.distance = 0.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Blender 2.66 mesh bug | |
| EDIT: bug fixed on rev. r55483. by Dalai Felinto: | |
| http://projects.blender.org/tracker/?func=detail&atid=306&aid=34550&group_id=9 | |
| This scipt gives: | |
| mat 0 vert 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| [ -z "$1" ] && echo "usage: $0 URL [TIME]" && exit 1 | |
| [ -z "$2" ] && tempo=$2 || tempo=10 | |
| url=$1 | |
| fileA=`mktemp` | |
| fileB=`mktemp` | |
| wget $url -qO $fileA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| # for i in `find . -name "*.blend"`; do blender -P blend_save_compress.py -b $i; done | |
| suffix = '.z.blend' | |
| filepath = bpy.data.filepath + suffix | |
| bpy.ops.wm.save_mainfile(filepath=filepath, check_existing=False, compress=True) | |
| bpy.ops.wm.quit_blender() |