Hello,
is there a easy way to add new "Kind" types to Solaris?
Or is it only possible with HDK or replacing Houdinis USD Library?
Cheers Martin
Adding custom "Kind"
1785 6 2- louisx
- Member
- 45 posts
- Joined: July 2009
- Offline
- goldleaf
- Staff
- 4177 posts
- Joined: Sept. 2007
- Offline
It's done using USD's plugin mechanism, but doesn't require any compiling. You register additional kinds via the
Here are some links for more details/examples:
plugInfo.json
and add it's directory to $PXR_PLUGINPATH_NAME
. As long as that env var has the directory to your plugin folder, Solaris will include your custom kinds in the kind-based menus/parameters (i.e. Kind-based selections, Here are some links for more details/examples:
- Extending the Kind Registry [graphics.pixar.com] - USD Docs
- USD Cookbook - Subclass Your Own Kind [github.com] - Colin Kennedy
I'm o.d.d.
- louisx
- Member
- 45 posts
- Joined: July 2009
- Offline
goldleaf
It's done using USD's plugin mechanism, but doesn't require any compiling. You register additional kinds via theplugInfo.json
and add it's directory to$PXR_PLUGINPATH_NAME
. As long as that env var has the directory to your plugin folder, Solaris will include your custom kinds in the kind-based menus/parameters (i.e. Kind-based selections,
Here are some links for more details/examples:
- Extending the Kind Registry [graphics.pixar.com] - USD Docs
- USD Cookbook - Subclass Your Own Kind [github.com] - Colin Kennedy
Thanks for the explanation.
I followed the descriped procedure, but couldt get it to work.
I added this line to my houdini.env
PXR_PLUGINPATH_NAME=/home/user/houdini19.0/usd_plugin
The plugInfo.json ( /home/user/houdini19.0/usd_plugin/plugInfo.json ) contains following lines.
{ "Plugins": [ { "Type": "python", "Name": "TestKindModule", "Info": { "Kinds": { # Add "test_model_kind" as a kind of model. "test_model_kind": { "baseKind": "model" }, # Add "test_root_kind" as a root kind. "test_root_kind": { } } } } ] }
I tested the Result via the Kind Menu on the configPrimitive Node and with the Pxr Kind.Registry ( Kind.Registry.GetAllKinds() ).
Any hints what I'm missing?
Thanks in advance,
Martin
Edited by louisx - May 13, 2022 17:12:29
- mtucker
- Staff
- 4447 posts
- Joined: July 2005
- Offline
The json looks fine to me, but it's possible that setting PXR_PLUGINPATH_NAME in houdini.env isn't working? If you just put your plugInfo.json in `/home/user/houdini19.0/dso/usd_plugins` you actually wouldn't have to explicitly set anything in your environment. That path will get picked up automatically. If it still doesn't work, try setting the env var `TF_DEBUG=PLUG_*` before starting Houdini (again, it's probably safest to not rely on houdini.env while you're trying to get these issues worked out). Setting this env var will make USD spit our all kinds of information about all the plugInfo.json files it is loading.
- louisx
- Member
- 45 posts
- Joined: July 2009
- Offline
mtucker
The json looks fine to me, but it's possible that setting PXR_PLUGINPATH_NAME in houdini.env isn't working? If you just put your plugInfo.json in `/home/user/houdini19.0/dso/usd_plugins` you actually wouldn't have to explicitly set anything in your environment. That path will get picked up automatically. If it still doesn't work, try setting the env var `TF_DEBUG=PLUG_*` before starting Houdini (again, it's probably safest to not rely on houdini.env while you're trying to get these issues worked out). Setting this env var will make USD spit our all kinds of information about all the plugInfo.json files it is loading.
Thanks that was helpful. I had to set the env var before starting Houdini, didtn work via houdini.env and packages.
Is there a way to set an Icon for my new Kind types? Like the one appearing in the ScneGraph when selecting the buildin Kinds.
Couldnt find any information about it.
Edited by louisx - May 16, 2022 05:49:16
- mtucker
- Staff
- 4447 posts
- Joined: July 2005
- Offline
Houdini is already looking for a custom icon for your custom kind... If you create a "config/Icons/SCENEGRAPH/kind_mykind.svg" file in your $HOUDINI_PATH, it should get picked up and used as the icon for "mykind". You can alternatively re-implement the usdprimicons.py module, and add it to the pythonX.Ylibs subdirectory of your HOUDINI_PATH, which lets you rewrite the code the tells Houdini what icon to use for each primitive kind.
- louisx
- Member
- 45 posts
- Joined: July 2009
- Offline
mtucker
Houdini is already looking for a custom icon for your custom kind... If you create a "config/Icons/SCENEGRAPH/kind_mykind.svg" file in your $HOUDINI_PATH, it should get picked up and used as the icon for "mykind". You can alternatively re-implement the usdprimicons.py module, and add it to the pythonX.Ylibs subdirectory of your HOUDINI_PATH, which lets you rewrite the code the tells Houdini what icon to use for each primitive kind.
Thanks it worked perfectly.
Just had to name the file SCENEGRAPH_kind_mykind.svg not put it in a subfolder.
Appreciate the amazing help.
Cheers Martin
Edited by louisx - May 17, 2022 10:06:00
-
- Quick Links