Skip to content

Instantly share code, notes, and snippets.

View hander.py
import bpy
import json
import os
class DataCombiner(object):
def __init__(self, path_to_renders, path_to_groundtruth):
self.path_to_groundtruth = path_to_groundtruth
bpy.data.scenes['Scene'].render.filepath = path_to_renders
@ugai
ugai / .swlg_scripts.md
Last active Oct 6, 2018
Blenderで動画作った際の副産物置き場
View .swlg_scripts.md

Blenderで動画作った際の副産物置き場。

  • EC2向けのネットワークレンダ用サービススクリプト
  • Blenderマクロ(Python)
  • OpenEXR連番から動画作成
@Pentan
Pentan / keyconf_html.py
Last active Nov 24, 2018
Dump Blender key config as HTML.
View keyconf_html.py
import bpy
from bpy_extras import keyconfig_utils
import sys
# Dump Blender keyconfig as HTML.
# How to use
# 1. Open this file in Blender's Text Editor.
# 2. Do "Run Script".
# 3. New Text "keyconfigs.html" will be added.
# save it somewhere and open in web browser (recommends Safari, Chrome or Firefox).
@zeffii
zeffii / has_selection.py
Created Sep 23, 2012
checking if text has selection
View has_selection.py
import bpy
text = bpy.context.edit_text
def has_selection(text):
return not (text.select_end_line == text.current_line and \
text.current_character == text.select_end_character)
print(has_selection(text))
@lennart
lennart / README.md
Last active Jun 24, 2019
Splended, a simple Sampler Builder based on Blender… It is, though, just a script.
View README.md

splended

Build musical samplers with blender, splended helps you!

Installation

OS X

put splended.py into ~/Application Support/Blender/2.xx/scripts/

@pcote
pcote / keyframe_point_swapper.py
Created Sep 2, 2012
Blender test script that swaps pairs of selected keyframe points.
View keyframe_point_swapper.py
import bpy
from pdb import set_trace
# quick handy little lambdas
first = lambda l : l[0]
last = lambda l : l[-1]
def chunks(lst, n):
for i in range(0, len(lst), n):
yield lst[i:i+n]
View ListFreeShortcuts_Script.py
import bpy
#########################################
# Configuration #
#########################################
# If True, key modifiers will be skipped (always set to NONE).
IGNORE_KEY_MODIFIER = False
@batFINGER
batFINGER / __init__.py
Last active Jul 6, 2019
"addon submodules"
View __init__.py
bl_info = {
"name": "Example Addon Preferences",
"author": "Your Name Here",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "SpaceBar Search -> Addon Preferences Example",
"description": "Example Addon",
"warning": "",
"wiki_url": "",
"tracker_url": "",
@caiwan
caiwan / bake.py
Created Sep 1, 2017
Blender bake
View bake.py
import bpy
def do_bake(scene):
""" This thing tries to bake all the object animations
and camera movement into a single track
Drawback: it eleminates scenegraph hierarchy and flattens everzthing
This suposed to be it, but fingers crossed:
https://wiki.blender.org/index.php/Dev:2.4/Source/Animation/AnimationBaking
@hedgehog90
hedgehog90 / get_anim_datas
Created Mar 31, 2019
a helpful function for finding most of the animation datas used in a context or scene
View get_anim_datas
def get_anim_datas(context=None):
if context is None: context = bpy.context
found = set()
materials = set()
textures = set()
def found_add(o):
if o is None: raise Exception()
found.add(o)
found_add(context.scene)