VEX printf() in Mac OS - where are the results?

   3539   4   0
User Avatar
Member
5 posts
Joined: Nov. 2013
Offline
hello all, I'm trying to get a simple printf() function to work in VEX… I'm on a mac, running houdini indie 16.5.
I ran the command “hindie” in the houdini terminal, Houdini opens up fine.

Then I created an attribute wrangle and typed printf(“hello world”); but nothing happens. What am I doing wrong?
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
On windows here…but it may be just the same.

By default wrangle nodes are set to run over points.

If you put down that wrangle node with no geometry input, it won't get activated so that function won't run.

Try switching to detail (once only) mode or just put down a sphere, box or something to the node if you want to stay in run over mode.

You should see a printout then.

Your syntax for the print function is good.
User Avatar
Member
5 posts
Joined: Nov. 2013
Offline
Thank you BabaJ, I did have a sphere-> scatter-> pointwrangle and it somehow works now as I assume it is supposed to work.

Is there a “run” or “re-cook” button or option anywhere?
User Avatar
Member
2036 posts
Joined: Sept. 2015
Offline
When I am working with wrangles that I know I will need to re-cook because I am working through code for my goal…

I put in a couple forward slashes on their own line…and after doing so..a ctrl + s (save)..this forces a cook on that node.

Then when I need to do another cook..remove the slashes…and save again.

Any change and save to the code will force a cook.

Could be better ways…just the habit I've gotten into.
Edited by BabaJ - Jan. 1, 2018 15:48:35
User Avatar
Member
38 posts
Joined: Sept. 2014
Offline
My setup is a bit different, i don't have this "hindie" environment variable but managed to get it working. Here are the steps.

Open a houdini Session
Windows -> Shell
type "hindie" into the terminal, this will open a new houdini enviroment

printf() should output into this terminal from the new Houdini session.

Rather convoluted but if you're able to open the shell application outside of Houdini and launch Houdini from there you can bypass steps 1 and 2. It looks like you need to have Houdini attached to a terminal/shell session to see the output.
When i launch Houdini by clicking on the application icon, i don't have a terminal or the traditional white console window that pops up when Houdini launches.
Edited by jm - March 15, 2023 11:44:19
  • Quick Links