HDK : Shelf Tool

   2238   2   0
User Avatar
Member
301 posts
Joined: July 2005
Offline
Hi,

It is my understanding that the Houdini shelf is written using Python.

I am writing a couple of tools using HDK and would prefer to have the UI/Shelf code as part of the C++ compiled code just so that the UI is in sync with the C++ plugin I am writing.

Is it possible to modify/add/register to the shelf via the HDK ?

Or maybe inject the Python UI code via the HOM object ?

Regards
Nicholas Yue
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
Your best bet is to use HOM.

Either directly HOM_Module::shelves() and then HOM_shelves::newTool() to add and HOM_Tool::destroy() to remove it.

Or probably easier, through Python, with hou.shelves().newTool() just like in toolutils.py and defaulttools.py. For that, you can PYrunPythonStatements() from PY_Python.h (or PY_CompiledCode::evaluateInContext() directly) etc.
User Avatar
Member
301 posts
Joined: July 2005
Offline
rafal
Your best bet is to use HOM.

Either directly HOM_Module::shelves() and then HOM_shelves::newTool() to add and HOM_Tool::destroy() to remove it.

Or probably easier, through Python, with hou.shelves().newTool() just like in toolutils.py and defaulttools.py. For that, you can PYrunPythonStatements() from PY_Python.h (or PY_CompiledCode::evaluateInContext() directly) etc.

Hi Rafal,

I was designing along similar lines, thanks for validating.

Regards
Nicholas Yue
  • Quick Links