Skip to content

Instantly share code, notes, and snippets.

@sambler
sambler / DataVisualise.py
Last active August 29, 2015 14:16
Generate Data visualisation in blender
# created in response to
# http://blender.stackexchange.com/q/26495/935
import bpy
from operator import itemgetter
# mainpoints is an array of data to use
# to fill it in - place an empty at the location you want a red sphere
# STRICT - name the empty in the format data-frame-parts
# eg data-1-8 will show a sphere on frame 1 and emit 8 particles
@sambler
sambler / file_prefix.py
Created October 24, 2015 10:59
Blender addon to add a prefix to the blend file when saving.
# script made in response to
# http://blender.stackexchange.com/q/40436/935
bl_info = {
"name": "Save File Prefix",
"author": "sambler",
"version": (1,0),
"blender": (2, 71, 0),
"location": "File->Save Prefixed Blendfile",
molecule = {
"camera": {
"position": [0.0000, 0.0000, 32.4760],
"rotation": [0.0000, 0.0000, 0.0000]
},
"atoms": [
{ "element": "C", "location": [ -0.7150, -1.2384, 0.0000 ] },
{ "element": "C", "location": [ 0.7150, -1.2384, 0.0000 ] },
{ "element": "C", "location": [ -1.4300, 0.0000, 0.0000 ] },
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# made in response to
# http://blender.stackexchange.com/q/44052/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"name": "Multi panels",
"description": """create multiple panels that share code""" ,
"category": "test",
# made in response to
# http://blender.stackexchange.com/q/44022/935
import bpy
from bl_ui.properties_data_modifier import DATA_PT_modifiers
class myModifiersPanel(bpy.types.Panel):
bl_label = "Object Modifiers"
bl_idname = "OBJECT_PT_mymodifiers"
@sambler
sambler / MacbookOptions.py
Created January 4, 2016 03:57
blender addon to add some macbook specific options
# from
# http://blender.stackexchange.com/q/44014/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"name": "Macbook Options",
"description": """Some user settings to assist macbook users.""" ,
# made in response to
# http://blender.stackexchange.com/q/44427/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"author": "sambler",
"name": "testing split view",
"description": """testing split view""" ,
# made in response to
# http://blender.stackexchange.com/q/44721/935
# render frame ranges for each nla strip with only the one strip active
output_dir = '//renders/'
scene = bpy.context.scene
# make a list of strips used in the NLA
# strips are found in -
# made in response to
# http://blender.stackexchange.com/q/44983/935
bl_info = {
"version": (1, 0),
"blender": (2, 75, 0),
"name": "testing play pause",
"description": """testing addon""" ,
"category": "test",