Skip to content

Instantly share code, notes, and snippets.

View fsiddi's full-sized avatar

Francesco Siddi fsiddi

View GitHub Profile
@fsiddi
fsiddi / blender-deps.sh
Last active January 20, 2020 11:06
Blender CLI dependencies on fresh Debian install
sudo apt install libgl1-mesa-glx libxrender1 libxi6
@fsiddi
fsiddi / setup.sh
Last active August 19, 2016 08:33
Blender Cloud Node setup
#!/usr/bin/env bash
mkdir -p /data/git
mkdir -p /data/storage
mkdir -p /data/config
mkdir -p /data/certs
sudo apt-get update
sudo apt-get -y install python-pip
pip install docker-compose
@fsiddi
fsiddi / docker-compose.yml
Last active October 9, 2015 09:54
Pillar Docker Configuration
mongo_pillar:
image: mongo
container_name: mongo_pillar
ports:
- "27017:27017"
volumes:
- /data/storage/db:/data/db
pillar:
#build: /data/git/pillar/docker/pro
image: pillar-apache
@fsiddi
fsiddi / dispatch.py
Created January 21, 2015 15:58
Brender dispatch function
def dispatch_tasks(job_id=None):
"""
We want to assign a task according to its priority and its assignability
to the less requested available compatible limited manager. If it does not exist,
we assign it to the unlimited compatible manager. Otherwise, keep the task and wait
to the next call to dispatch_tasks
The task dispaching algorithm works as follows:
import socket
from flask import Flask, render_template, jsonify, redirect, url_for
from uuid import getnode as get_mac
MAC_ADDR = get_mac() # the MAC address of the worker
HOSTNAME = socket.gethostname() # the hostname of the worker
# we initialize the app
app = Flask(__name__)
@fsiddi
fsiddi / sync_views.py
Last active December 17, 2015 16:49
Simple script that makes a button to sync multiview setting across scenes in Blender
import bpy
def SyncViews():
for view in bpy.context.scene.render.views:
if (view.name == 'left'):
use_left = view.use
camera_left = view.camera
if (view.name == 'right'):
use_right = view.use
camera_right = view.camera