Way to block creation of a (custom) node?

11 views
Skip to first unread message

Paul Molodowitch

unread,
Aug 9, 2017, 8:23:07 PM8/9/17
to python_inside_maya
I'm making my own node class, and I'm looking for a way to block the creation of the node in certain circumstances. Does anyone know of a way to accomplish this, either through one of the MPxNode methods, or via some more generic maya callback?  (Well, other than by crashing the program - I'd like to make maya print an error or something similar.)

Paul Molodowitch

unread,
Aug 9, 2017, 8:54:23 PM8/9/17
to python_inside_maya
Ah, answered my own question - if you have the creator you register with MFnPlugin::registerNode return a nullptr, then it will block creation of the node. 

It will print a message saying no such dependency node exists, which is less than optimal, but it's the best solution I've found...
Reply all
Reply to author
Forward
0 new messages