All Projects → njanakiev → cookie-factory

njanakiev / cookie-factory

Licence: GPL-3.0 License
Processing-style Scripting Add-on for Blender

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cookie-factory

blender-mqo
Blender Add-on: Metasequoia File Importer/Exporter
Stars: ✭ 27 (+28.57%)
Mutual labels:  blender-scripts, blender, blender-addon
BlendShell
A Blender plugin for making hollow models suitable for 3D printing.
Stars: ✭ 33 (+57.14%)
Mutual labels:  blender-scripts, blender, blender-addon
Jaks Blender Scripts
Various Python Scripts for Blender
Stars: ✭ 26 (+23.81%)
Mutual labels:  blender-scripts, blender, blender-addon
Blender-Add-on-Manager
Blender Add-on Manager to install/uninstall/update from GitHub
Stars: ✭ 130 (+519.05%)
Mutual labels:  blender-scripts, blender, blender-addon
blendmaxwell
Maxwell Render exporter for Blender
Stars: ✭ 23 (+9.52%)
Mutual labels:  blender-scripts, blender, blender-addon
MindMapper
Blender Python - Node-based multi-line text and image flowchart
Stars: ✭ 58 (+176.19%)
Mutual labels:  blender-scripts, blender, blender-addon
3dn-bip
A Python library for Blender addons. Blazingly fast preview loads in Blender. Images of arbitrary size. bpy.utils.previews drop-in replacement.
Stars: ✭ 41 (+95.24%)
Mutual labels:  blender-scripts, blender, blender-addon
Character-UI
Blender add-on for creating simple yet functional UIs for your characters.
Stars: ✭ 28 (+33.33%)
Mutual labels:  blender-scripts, blender, blender-addon
shotmanager
Shot Manager is a Blender add-on that introduces a true shot entity in Blender scenes, as well as a wide and powerful set of tools to build and edit sequences in real-time directly in the 3D context.
Stars: ✭ 109 (+419.05%)
Mutual labels:  blender, blender-addon
spacestation
A procedural spacestation generator
Stars: ✭ 22 (+4.76%)
Mutual labels:  blender, blender-addon
blender-cod
Blender Add-On for Call of Duty® modding
Stars: ✭ 53 (+152.38%)
Mutual labels:  blender, blender-addon
shapekeyimport
Blender add-on to import shapekeys
Stars: ✭ 31 (+47.62%)
Mutual labels:  blender, blender-addon
BlenderGameRig
Rigging framework for game development. Hard fork from Rigify.
Stars: ✭ 53 (+152.38%)
Mutual labels:  blender, blender-addon
Mio3ShapekeySync
キャラクターモデリングに特化したシェイプキー補助のBlenderアドオン
Stars: ✭ 24 (+14.29%)
Mutual labels:  blender, blender-addon
pulverize
A multi-process rendering script for Blender VSE.
Stars: ✭ 54 (+157.14%)
Mutual labels:  blender-scripts, blender
kaleidoscope
🍀 A small collection of creative nodes to generate color palette and store values for Blender
Stars: ✭ 99 (+371.43%)
Mutual labels:  blender-scripts, blender
push to talk
Add-on for recording audio in Blender's Sequencer
Stars: ✭ 24 (+14.29%)
Mutual labels:  blender, blender-addon
niche-loops
This add-on includes the following operators: Build End, Build Corner, Adjust Loops, Adjust Adjacent Loops
Stars: ✭ 20 (-4.76%)
Mutual labels:  blender, blender-addon
gmic-blender
Official G'MIC plugin for Blender3D - pre-pre-alpha
Stars: ✭ 34 (+61.9%)
Mutual labels:  blender, blender-addon
PAINTicle
A paint addon for Blender using particles.
Stars: ✭ 27 (+28.57%)
Mutual labels:  blender, blender-addon

Cookie Factory

This is a processing-style scripting add-on for Blender, which offers configurable Python scripting with Blender. You can run scripts in the background or within Blender and it offers various helper functions and classes to make quick and more involved sketches and animations. It is particularly useful for generative animations that are fully scripted with the Blender API. This add-on evolved from the various modules and functions used to create most of the pieces in the Parametric Cookie Collection.

Parametric Cookie

Installation

Download the Cookie Factory Add-on from Github as an archive. Next, open Blender and go to File > User Preferences > Addons > Install from File and then choose the zip-archive and activate the flag besides the Cookie Factory Add-on.

Getting Started

There are a few examples to illustrate the functionality in the examples folder. You can run them by extracting the examples folder from the archive, selecting the config.json file in the file picker in the toolbar and pressing the Import / Reload button below. This loads the scene defined in the configuration file. Below the button you can choose which scripted scene to choose from (which are again located in the examples folder).

Screenshot

Usage

To start write your own script copy the simple_config.json to the folder your want your project to be in and change there the name in "scene": "minimal_cube" from minimal_cube to your python file in the folder without the extension. To run properly, import the core module and extend class Composition from core.scene.Scene as in the following example.

import core
from math import pi
PI, TAU = pi, 2*pi

class Composition(core.scene.Scene):
    def setup(self):
        # Create a simple scene with target, camera and sun
        core.simple_scene((0, 0, 0), (-5, -13, 5), (-10, -10, 4))

        # Create a cube object of size 5
        self.obj = core.geometry.cube(size=5)

You need to implement a setup(self) function which is called once. You can optionally implement a draw(self) function which is called for each frame change. This function can have the following form.

    def draw(self):
        # Set t to be in the range between 0 and 1
        t = self.frame / self.frames

        # Rotate the cube for one full rotation on two rotation axis
        self.obj.rotation_euler = (0, t*TAU, t*TAU)

There you can access the current frame with self.frame and the number of frames with self.frames. There are many more functions to choose from within the core module and you can also access the bpy and bmesh modules, besides all the available Python modules you would have within Blender.

You can run the code by loading the config file in Blender with the Cookie Factory Toolbox as previously shown or you can run it in the background by using the command

blender -b -a -- config.json

to render animations. In order to render single frames use the command

blender -b -f 1 -- config.json

When rendering animation or a single frame, the frames are rendered in the specified output_folder folder from the config.json and there the frames are rendered to a folder or an image with the name of the scene for animation and single frame render respectively. If you want the frames or the animation folder to be overwritten you can use the override option in the config.json.

License

This project uses the LGPL v3 for the code within the core folder and the code within the examples folder is licensed under the MIT license. The rest of the project is licensed under the GPL v3.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].