GithubHelp home page GithubHelp logo

joss13aws / maya-quality-assurance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from robertjoosten/maya-quality-assurance

0.0 0.0 0.0 358 KB

Quality assurance framework for Maya.

Home Page: https://robertjoosten.github.io/maya-quality-assurance/

License: GNU General Public License v3.0

AMPL 0.24% Python 99.76%

maya-quality-assurance's Introduction

maya-quality-assurance

Quality assurance framework for Maya. Focused on many parts of a production pipeline, collections are created for animators, modelers, riggers and look-dev.

Installation

  • Extract the content of the .rar file anywhere on disk.
  • Drag the qualityAssurance.mel file in Maya to permanently install the script.

Usage

A button on the MiscTools shelf will be created that will allow easy access to the ui, this way the user doesn't need to worry about any of the code. If user wishes to not use the shelf button the following commands can be used.

Display UI:

import qualityAssurance.ui
qualityAssurance.ui.show("rigging")

The show function takes in a collection argument, if you work within one of the specialties you can simply call the show function with the collection you want to see by default. To see all available collections run the following code.

import qualityAssurance.collections
print qualityAssurance.collections.getCollectionsCategories()

Adding Quality Assurance Checks

The quality assurance framework is setup so new quality assurance checks can easily be added.

Location

All quality assurance checks are located in the checks folder. New checks can be written in one of the sub modules of the checks folder. Writing new checks in existing modules will automatically be picked up by the script. When adding a new sub module it is important to import the contents of the sub module into the init.py file in the checks folder.

from .animation import *

All checks are sorted in order of occurrence in the source code. This can be used to make sure certain checks are after others.

Collections

New collections can be added in the COLLECTIONS variable. Since this COLLECTIONS variable is an OrderedDict, it will keep the order. A collection can be defined by who will be using it. Currently it is divided by different specialties. Each specialty contains a list of categories that will be displayed. The category names link to the categories defined in the quality assurance checks themselves.

Sub Classing

New quality assurance checks can be created by sub classing the QualityAssurance base class. It is important to extend the class with a _find and _fix function and update the meta data in the init function.

from ..utils import QualityAssurance, reference

class TestCheck(QualityAssurance):
    def __init__(self):
        QualityAssurance.__init__(self)

        self._name = "Unused Animation"
        self._message = "{0} animation curve(s) are unused"
        self._categories = ["Animation"]
        self._selectable = True

    # ------------------------------------------------------------------------

    def _find(self):
        animCurves = self.ls(type="animCurve")
        animCurves = reference.removeReferenced(animCurves)

        for animCurve in animCurves:
            # check if the output plug is connected
            if cmds.listConnections("{0}.output".format(animCurve)):
                continue

            # yield error
            yield animCurve

    def _fix(self, animCurve):
        cmds.delete(animCurve)

Meta Data

  • self._name: Name of the quality assurance check
  • self._urgency: Urgency level, 1=orange, 2=red.
  • self._message: Format-able message when errors are found.
  • self._categories: List of categories the quality assurance check should part of.
  • self._selectable: Boolean value if the error list is selectable.

Find and Fix Function

  • The _find function is a generator that yields errors as they get found.
  • The _fix function fixes one of these errors at a time. In the example above we could find multiple animation curves, but the fix only deletes one animation curve at a time.

Note

Inspired by Martin Orlowski's Quality GuAard, I've decided to write my own quality assurance framework and make it freely available. The project is available on Git. Free for anybody that wishes to contribute to this tool and add additional quality assurance checks.

maya-quality-assurance's People

Contributors

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