Git Product home page Git Product logo

primerpython's Introduction

This repo is archived. Helpsypoo/primerunity is what I'm using now. If you decide to move forward with trying to get this code running, know that it's extremely likely to waste your time, and nobody can help you.

primer

Code that makes videos for this: youtube.com/c/primerlearning

This is going to be a pretty minimal readme for now, and the code itself is likely very confusing. I intend to clean things up and improve documentation, though I don't know when that will be. If you'd like to receive an email when that update happens, you can submit your email here: https://forms.gle/GHTgKMUaMxqxGUu39

Overview

This is a library of tools that lets you write high-level functions to build and animate objects in Blender. It's not set up to run from the command line. Instead, it uses the Script Runner addon for Blender, which lets you run scripts by pushing buttons within Blender. This makes it easy to see the results of your scripts and use the Blender interface to experiment with parameters before iterating on your script.

The primary script run by Script Runner in my workflow is draw_scenes.py, whose main() function can be used to call test scripts or run a script from another file.

Much of the structure comes from manim, 3blue1brown's animation engine.

Using primer

The root object class used for defining and manipulating objects in Blender is called Bobject (blender object). It initializes an object in Blender and defines simple functions for changing the parameters and adding keyframes.

The best scene to try when getting started is probably tex_test(), defined in draw_scenes.py. It creates a TexBobject and morphs through a few strings.

There isn't a best practice for creating a series of scenes in a new file. As you'll see, the files from past primer videos are all structured fairly differently. I haven't landed on a steady-state workflow here. So if you're confused, that might be why.

Requirements

Blender 2.79 (Not 2.8+, the api has changed)

Script Runner addon for Blender

TeX

dvisvgm

OpenBabel if you want to do the molecule stuff http://openbabel.org/wiki/Main_Page

Gotchas

Blender comes packaged with its own version of python, so your local python installation and your favorite packages won't be there unless you install them to Blender's version.

Many of the scenes from my videos depend on specific blend files that are imported for use as common objects or components of them. For example, the blob creatures and components of the graphs. If at some point I try to turn this into a more broadly accessible tool, I'll have to include those files in the repo or procedurally generate them.

primerpython's People

Contributors

helpsypoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.