Coder Social home page Coder Social logo

tomashubelbauer / blender-script Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 3.31 MB

A demo on running Blender with a Python script for generating and rendering a scene.

License: MIT License

Python 100.00%
blender blender-python blender-python-api blender-python-scripts

blender-script's Introduction

Blender Script

  1. Add Blender to %PATH% and run pip install bpy
  2. Open the repository in VS Code
  3. Open script.py and render.png in split view side by side
  4. Open the VS Code terminal
  5. Run npx nodemon --exec blender --background --python script.py
  6. Observe the render.png preview refresh after each save
  7. Debug by either:
  • Removing --background
  • Splitting terminal and running blender --python script.py
  • Pressing F12 in Blender to preview render

Stalking Blender Operations' Corresponding Python

As per https://www.youtube.com/watch?v=45WZWqmpRQE, open up the Scripting workspace and do your work, observe the console to see the Python code for each operation that you carry out.

To-Do

Figure out how to get autocompletion for bpy

https://github.com/TomasHubelbauer/blender-python-intellisense

Set up a GitHub Actions workflow which installs Blender and runs the script

blender --python script.py on every push and push render.png to the repository.

blender-script's People

Contributors

tomashubelbauer avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.