Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.

MaterialX: ShaderGenerator::registerImplementation with function objects #3

@ppenenko

Description

@ppenenko

Currently, this method accepts a function pointer, which is used to register a factory method for a specific C++ node type.

For a dynamic integration of Metashade though (#1 ), we need to be able to register different Metashade node implementations which would have different Python code but the same C++ class representing all of them. This way, nodedefs and implementations can be added and modified by editing the Python code but without having to recompile the MaterialX C++ code.

To enable the above, we need to register function objects instead of function pointers. std::function should be enough, and all existing MaterialX node implementation registrations should still work with minimal or no changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions