Blenderで動画作った際の副産物置き場。
- EC2向けのネットワークレンダ用サービススクリプト
- Blenderマクロ(Python)
- OpenEXR連番から動画作成
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 |
Blenderで動画作った際の副産物置き場。
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). |
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)) |
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] |
import bpy | |
######################################### | |
# Configuration # | |
######################################### | |
# If True, key modifiers will be skipped (always set to NONE). | |
IGNORE_KEY_MODIFIER = False |
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": "", |
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 |
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) |