Giter Club home page Giter Club logo

nodetopython's Introduction

Node to Python

Node To Python

GitHub release (latest by date) GitHub

About

A Blender add-on to create add-ons! This script will take your Geometry Node group and convert it into a legible Python script.

It automatically handles node layout, default values, sub-node groups, naming, and more!

I think Geometry Nodes is a powerful tool that's fairly accessible to people, and I wanted to create a lightweight, faster way of distributing them than just passing around blend files. It also makes scripting Geometry Nodes easier for add-on creators in cases when Python is needed, as you don't need to recreate the whole node tree from scratch to do things like

  • for loops
  • different node trees for different versions or settings
  • interfacing with other parts of the software.

NodeToPython is compatible with Blender 3.0-3.4

Supported Versions

Blender 3.0 - 3.4

  • Once the 3.5 beta drops, I'll start adding nodes from that release

Installation and Usage

Download node_to_python.py, and install it to Blender like other add-ons. Then, go to Object > Node to Python, and type in the name of your node group. It will then save an add-on to where your blend file is stored.

Future

  • Expansion to Shader and Compositing nodes
  • Copy over referenced assets in the scene (Collections, Objects, Materials, Textures, etc.)
  • Automatically format code to be PEP8 compliant

Potential Issues

  • This should work on Unix-like systems (macOS, Linux), but I haven't tested it on Windows yet. If you use Windows, please let me know if it does!

  • As of version 1.0.0, the add-on will not set default values for

    • Collections
    • Images
    • Materials
    • Objects
    • Textures

    as they won't exist in every blend file. In the future, I may have the script automatically recreate these assets, espcially with materials.

Bug Reports and Suggestions

When submitting an issue, please include

  • Your version of Blender
  • Your operating system
  • A short description of what you were trying to accomplish, or steps to reproduce the issue

Suggestions for how to improve the add-on are more than welcome!

nodetopython's People

Contributors

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