Git Product home page Git Product logo

blender-asset-validator's Introduction

rpm-blender-validator

image

This repo contains the Python Blender validator tool, whichs helps you with creating your RPM content in Blender.
See the docs for the Blender validation
see the doc for the blender validation checks

  • rpm_pyblish_plugins: Pyblish validation plugins & fix actions
  • rpm_validator: custom Pyblish UI
  • rpm_validator_addon: blender addon code
  • init.py : blender addon hookup code, containing bl_info

Install

This repo can be installed either as a Blender add-on, or through PIP.

Blender add-on (recommended)

Installing as a Blender add-on

  • gives the option to disable this tool
  • adds a menu button to launch the window

Instructions:

  • download latest
  • install as a blender add-on, by extracting the whole folder in your addons folder
  • enable the add-on in blender
  • PIP install the dependencies from requirements.txt

PIP (advanced)

Installing through PIP

  • installs the tool as a Python module
  • no option to disable, which means it won't accidentally be disabled
  • auto installs the dependencies
  • no menu button, but can be launched from the python console with
import rpm_validator
rpm_validator.show()

Instructions:

  • PIP install the module from github
python -m pip install git+https://github.com/readyplayerme/rpm-blender-validator

validation in a custom pipeline

Some of our partners require more advanced control of the validations. Here's a sample going through the basics.

import pyblish.api
import pyblish.util

# register rpm plugins
# this is done automatically if you use the RPM addon or script file path
import rpm_pyblish_plugins
rpm_pyblish_plugins.register()

# discover the validation plugins
plugins = pyblish.api.discover()

# collect meshes materials etc
context = pyblish.util.collect(plugins=plugins)

# run the validations
context = pyblish.util.validate(context=context, plugins=plugins)

# run autofix on all failed instances
for plugin in plugins:
    try:
        if hasattr(plugin, "fix"):
            pyblish_action = plugin.fix
            pyblish_action.process(self=pyblish_action, context=context, plugin=plugin)
    except Exception as e:
        print(traceback.print_tb(e.__traceback__))
        print("failed to fix:", e)

Issues & bugs

Please report them here here

blender-asset-validator's People

Contributors

hanwolf3d avatar techydaniel avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

techydaniel top-5

blender-asset-validator's Issues

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.