I keep meaning to dig into Maya's internal metadata implementation as I
think there's definitely some scope there to extend the systems we use
internally.

String attrs on nodes are great if you have robust code to search and
filter them, or if you just want to marker a certain type of node as a
controller for example.

If on the other hand you're trying to marker up a rigging system or
anything of that nature then the best way we found is to build up an
abstract layer over it using message wires and walking those connections.
We have a full OpenSource api for this in the Red9 StudioPack that's being
used in a lot of studios as their base api for dealing with rig nodes. In
fact Brian Venisky from Avalanche went through it in his GDC talk this
year. The best thing is that as part of the API there's a ton of custom
handlers for dealing with the factory side of the system, that basically
means that when the code hits a connected node it looks at a descriptor on
that node and returns an instantiated python object of that class, so
effectively you can walk a rig as class structures.

There's a series of demos on there from a talk I did at Develop a few years
ago which might shed some light on the idea. It's nothing new I hasten to
add, but it is now a very robust and mature implementation.

https://www.youtube.com/channel/UC0VXa1NA72C7zNwZ2E5pILA/videos

cheers

Mark


On 3 April 2018 at 15:48, Kenneth Ibrahim <kenibra...@gmail.com> wrote:

> I've done a bit of that in the past but definitely worth a revisit. Thx
> for the suggestion.
>
> For now I've chosen to use a simple enum attribute on nodes with a suite
> of functions utilizing that.
>
> On Tue, Apr 3, 2018 at 7:25 AM, Neil Roche <n...@milk-vfx.com> wrote:
>
>> You could look into creating virtual nodes,  it's a nice way to create
>> your own nodes by sub-classing existing nodes in PyMel.
>>
>> http://www.jason-parks.com/artoftech/?p=225
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/python_inside_maya/14363738-2a4f-4646-b797-024c3c68ea10%
>> 40googlegroups.com
>> <https://groups.google.com/d/msgid/python_inside_maya/14363738-2a4f-4646-b797-024c3c68ea10%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> "God is a metaphor for a mystery that absolutely transcends all human
> categories of thought. It's as simple as that!" - Joseph Campbell
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/python_inside_maya/CAP_aC5Zk7uAHUyyDVuBYPUNO56eKVEq68
> adcM73JX%3DhUNrFtzg%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAP_aC5Zk7uAHUyyDVuBYPUNO56eKVEq68adcM73JX%3DhUNrFtzg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-------------------------------------
Mark Jackson
CEO / Technical Director
red9consultancy.com

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAGQH2FF_%3D4NE4HS1goLT-ZL8Q1g9LBXGsfaGDw3AOK_WpmL0-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to