c++ - Extract/Identify NodeType by Name (or string - identifier) -


hi!

i'm writing "simple" maya command in c++, in witch need select scene (like ls command in mel).

but don't know how identify mfn::type data based on string name "gpucache".

actually (very stupid) parser simple if identify mfn::type based on 2 options: if node name "gpucache" sets filter using mfn::type::kpluginshape, otherwise use kdagnode (or kshape, or whatever fits needs broad identification many nodes possible, later use of typename() of mfndagnode class).

this "filterbytype" function, want use convert type defined string in type defined mfn::type.

mfn::type switch::filterbytype( mstring type ) {     mfn::type object_type;      object_type = mfn::type::kdagnode;      mnodeclass node_class( type );     mglobal::displayinfo( mstring("type name: " + node_class.typename()) );      return object_type; } 

can me, or need call mel/python command c++ (a thing don't want do) thing done?

thanks!


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -