Trouble getting 123.py and 345.py running on macOS

   1246   1   3
User Avatar
Member
517 posts
Joined: Dec. 2013
Offline
Hi all,
I'm having a bit of trouble running a 123.py or 456.py in Houdini. I've looked through the manual here - Python script locations [www.sidefx.com] but can't seem to get it working. Here's what I have -

I created the files in pycharm with this one line -
print ("123 hello")

I've put the files in ".../Library/Preferences/houdini/19.5/scripts/", which I think is the $HOUDINI_PATH?

I'm not seeing anything in the python shell on starting Houdini or loading a new scene.
Any ideas?
Thanks,
Pete
Edited by peteski - Oct. 26, 2022 19:20:12
User Avatar
Member
8 posts
Joined: May 2020
Offline
As this bugged me as well, here a solution that might help other frustrated mac users.

1 - create a 'scripts' folder inside your preferences folder.
/Users/username/Library/Preferences/houdini/19.5/scripts/

2 - copy the attached 123.py file in the 'scripts' folder

3 - copy your default scene hip file in the preferences folder, mine looks like this:
/Users/username/Library/Preferences/houdini/19.5/default_scene.hiplc


This is the content of 123.py:

houdini_preference_directory = hou.getenv('HOUDINI_USER_PREF_DIR') 
hou.hipFile.merge( houdini_preference_directory + "/default_scene.hiplc")
Edited by GSO - June 25, 2023 12:31:26

Attachments:
123.py (142 bytes)

  • Quick Links