[HDK] How to display message?

   4715   5   0
User Avatar
Member
5 posts
Joined: 11月 2013
オフライン
There is a routine for python - http://www.sidefx.com/docs/hdk11.0/hdk_soho_examples.html#HDK_SOHO_Examples_Hello2 [sidefx.com]
hou.ui.displayMessage()
however this:
HOM_Module &hou = HOM();
hou.ui().displayMessage(“test”);
doesn't work in C++.
Is it possible to print something in the way like python ones in HDK 11?
User Avatar
Member
5 posts
Joined: 11月 2013
オフライン
up
User Avatar
スタッフ
2676 posts
Joined: 7月 2005
オフライン
iDev
up

I've modified the HOM example [sidefx.com] from the toolkit source to display a message.

You need to include <HOM/HOM_ui.h>

Then, just call:
hou.ui().displayMessage(“Hello world”);


Little known fact, there's a C++ interface for HOM too.

Attachments:
SOP_HOMWave.C (3.9 KB)

User Avatar
Member
5 posts
Joined: 11月 2013
オフライン
Hello, mark. In my first message i wrote:
iDev
however this:
HOM_Module &hou = HOM();
hou.ui().displayMessage(“test”);
doesn't work in C++.
It just crashes. Maybe it works in HDK 13, but not in HDK 11.1
User Avatar
スタッフ
2676 posts
Joined: 7月 2005
オフライン
iDev
Hello, mark. In my first message i wrote:
iDev
however this:
HOM_Module &hou = HOM();
hou.ui().displayMessage(“test”);
doesn't work in C++.
It just crashes. Maybe it works in HDK 13, but not in HDK 11.1

Works for me in H11.1.388

Does the HOM SOP work without the modifications? It might be something else in your environment.
User Avatar
Member
7 posts
Joined: 1月 2024
オフライン
I've found that the use of `hou.ui().displayMessage()` can crash when called from a `DM_SceneRenderHook` render function.
  • Quick Links