Skip to content

pxf-lab/uab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

417 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal Asset Browser

The Universal Asset Browser (UAB) is a Python application that allows you to browse your assets regardless of which 3D application you're using. It is designed to be integrated in any digital content creator (DCC) that has a Python API, to work with any render engine, and to access any external asset library.

Demo - UAB Running in Maya, Houdini, and Standalone

uab_demo_feb2025.mp4

Current Integrations

Houdini Status
Karma Environment Light Support Stable
Karma MTLX Shader Creation Stable
Redshift Environment Light Support Experimental
Redshift Shader Creation Experimental
Arnold Environment Light Support Experimental
Arnold Shader Creation Experimental
Geometry Creation Planned
Geometry Creation with Automatic Shader Assignment Planned
Maya Status
Arnold Environment Light Support Stable
Arnold Shader Creation Experimental
Geometry Creation Planned
Geometry Creation with Automatic Shader Assignment Planned

Note

Support for Unreal Engine and Blender is also planned. They're not QT-based, so are more complicated.

Asset Library Status
Local Stable
PolyHaven Stable
TurboSquid Planned: depends on TOS
Fab/Megascans Planned: depends on TOS
CGTrader Planned: depends on TOS

If there's a DCC, renderer, or library you think should be integrated but cannot integrate yourself, or you have a feature request or want to get in touch for another reason, please reach out to me@bencres.dev.

Installation

Important

These are temporary development instructions. An installer is planned.

Warning

This application is only tested on MacOS. It may work on Windows and Linux (I've done my best to consider OS-specific decisions), but no guarantees.

Check out the examples directory for working host configs (Houdini, Maya).

Note

This application is built for Python 3.11, as that is the current VFX standard at the time of development.

Desktop:

  1. Clone the repo and navigate to its root.
  2. Install uv.
  3. Execute:
    cd src/uab
    uv run main.py

Houdini 21+:

  1. Clone the repo and navigate to its root.

  2. Export the dependencies.

    cd src/uab
    pip download -r requirements.txt --dest deps

    This is necessary because Houdini's Python interpreter needs access to the dependencies of this package.

  3. Create a directory named uab and a uab.json file in $HOUDINI_USER_PREF_DIR/packages.

  4. Copy the following to uab.json and replace the PYTHONPATH with the path to the src directory of the repo:

    {
    "env": [
        {
        "PYTHONPATH": "path to src directory of UAB"
        }
    ],
    "hpath": "$HOUDINI_USER_PREF_DIR/packages/uab_v1"
    }
  5. In the uab directory, create a directory named python_panels and a directory named python3.11libs. Note that these names must match exactly for Houdini to import their contents.

  6. In python_panels, create a new file named uab_interface.pypanel.

  7. Copy the following to uab_interface.pypanel:

    <?xml version="1.0" encoding="UTF-8" ?>
    <pythonPanelDocument>
    <!-- This file contains definitions of Python interfaces and the
    interfaces menu.  It should not be hand-edited when it is being
    used by the application.  Note, that two definitions of the
    same interface or of the interfaces menu are not allowed
    in a single file. -->
    <interface
            name="uab_interface"
            label="Universal Asset Browser"
            icon="MISC_python"
            showNetworkNavigationBar="false"
            help_url=""
        >
        <script
            ><![CDATA[
    def onCreateInterface():
        from uab.main import create_panel_widget
        from uab.integrations.houdini import HoudiniIntegration
    
        return create_panel_widget(host_integration=HoudiniIntegration())
    
    ]]></script>
        <includeInPaneTabMenu menu_position="0" create_separator="true" />
        <includeInToolbarMenu menu_position="212" create_separator="false" />
        <help><![CDATA[]]></help>
    </interface>
    </pythonPanelDocument>
  8. Move the contents of the earlier deps directory to the new python_panels directory.

  9. Create a new pane in Houdini and select "Universal Asset Browser".

Maya 2025+:

  1. Clone the repo and navigate to its root.

  2. Add this repo to Maya's Python path.

    • Recommended: use the Maya module file example in examples/maya/README.md.
    • To install a module, the module file must be in a directory checked by Maya. I recommend the preferences of your current Maya installation, where you can make a new modules directory if one does not already exist, and place the file. Be sure that you swap out the paths in the example module file for actual paths on your system.
  3. Install dependencies into mayapy:

    "<path/to/mayapy>" -m pip install -r "/path/to/uab-refactor/src/uab/requirements.txt"
  4. Start Maya, open the Script Editor (Python tab), and run:

    import uab_maya
    uab_maya.show()

Key Architectural Concepts

MainPresenter

Application shell. Acts as a router between TabPresenters.

TabPresenter

Handles business logic between a browser, an asset library, and a host.

Hosts

Injected into TabPresenter. Handles renderer-agnostic functionality for a DCC (e.g., creating a geometry node in Houdini).

Strategies

Injected into the Host. Handles renderer-specific functionality (e.g., creating an HDRI specifically for Karma in Houdini).

Extension

The application is designed to be easily extensible, allowing anyone to add support for a DCC, a renderer within a DCC, or an external asset library.

  • interfaces.AssetLibraryPlugin: Add a new asset source.
  • interfaces.HostIntegration: Add a new DCC support.
  • interfaces.RenderStrategy: Add a new renderer to a DCC.

Important

Your implementation must conform to its interface, but note that plugins and strategies both have a base.py file that contains a SharedUtils class. For those two, your implementation should inherit this class, not the interface directly. The SharedUtils class contains quite a lot of logic to run everything in the background, minimizing the amount of work your implementation takes. It should hopefully be as simple as implementing a few key methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages