Strange things happening with Pycharm and Houdini

   870   0   0
User Avatar
Member
2 posts
Joined: Dec. 2019
Offline
I'm trying to set up PyCharm to work with Houdini- when assigning the interpreter the only one that seems to work is "hython3.7.exe" located here "C:\Program Files\Side Effects Software\Houdini 19.5.569\bin\hython3.7.exe"- both of the python executables inside the "python37" directory do not recognize the hou module, regardless of whether the "libs" directory that sits alongside the python3.7.exe is added to the interpreter paths. So using hython3.7.exe the hou module now being recognized, but I'm seeing two things that are a problem. The first problem is that when running this simple script from PyCharm:

import hou

def test_load():
	try:
		print('TestLoad firing')
		current_file = hou.hipFile.name()
		print(current_file)
	except hou.LoadWarning as e:
		print(f'Load not working: {e}')

test_load()

PyCharm just sort of freezes for a few seconds, and then I get a bunch of log statements happening for Octane and for Redshift. It does this every time I run a script. Here is the full output I see to the console:

 "C:\Program Files\Side Effects Software\Houdini 19.5.569\bin\hython3.7.exe" E:\PROJECTS\CODE\PYTHON\Houdini\main.py 
[Redshift] Redshift for Houdini plugin version 3.5.15 (May 10 2023 08:24:00)
[Redshift] Plugin compile time HDK version: 19.5.569
[Redshift] Houdini host version: 19.5.569
[Redshift] Plugin dso/dll and config path: C:/ProgramData/Redshift/Plugins/Houdini/19.5.569/dso
[Redshift] Core data path: C:\ProgramData\Redshift
[Redshift] Local data path: C:\ProgramData\Redshift
[Redshift] Procedurals path: C:\ProgramData\Redshift\Procedurals
[Redshift] Preferences file path: C:\ProgramData\Redshift\preferences.xml
[Redshift] License path: C:\ProgramData\Redshift
[Octane] Octane Render for Houdini. Build 2022.1.1.0 (Build date: Apr 10 2023 23:22:17)
[Octane] Octane API: 2022.1.1
[Octane] HDK API: 19.5.569
[Octane] Houdini host version: 19.5.569
[Octane] Initializing Octane API
[Octane] Octane API ready. Initialization time: 1.606 seconds
[Octane] OCIO configuration ready. Initialization time: 0.003 seconds
[Octane] Octane network rendering enabled. Initialization time: 0.001 seconds
[Octane] Loading preferences from: C:/Users/benbl/Documents/houdini19.5/octane.pref
20:55:20 INFOR: [nodes] -------------  Registering Octane VOP nodes
[Octane] 20:55:20 INFOR: [nodes] -------------  Registering Octane VOP nodes
20:55:20 INFOR: [nodes] -------------  Octane VOP nodes registered
[Octane] 20:55:20 INFOR: [nodes] -------------  Octane VOP nodes registered
20:55:20 INFOR: [nodes] -------------  Registering the plugin custom VOP nodes
[Octane] 20:55:20 INFOR: [nodes] -------------  Registering the plugin custom VOP nodes
20:55:20 INFOR: [nodes] -------------  Plugin custom VOP nodes registered
[Octane] 20:55:20 INFOR: [nodes] -------------  Plugin custom VOP nodes registered
TestLoad firing
untitled.hip
20:55:22 INFOR: [api] ---------------  Closing the Octane API
[Octane] 20:55:22 INFOR: [api] ---------------  Closing the Octane API
[Redshift] Closing the RS instance. End of the plugin log system.

Process finished with exit code 0

The name of the file I have open is "...\test_scene.hiplc" but the file name it is printing that is being called from the script's one function is coming out "untitled.hip". So two questions- first, is there any way to suppress the redshift and octane logs printing out (and is this actually running a standalone Houdini instead of interacting with the open Houdini session?) Second question- if this is a standalone session which is what I suspect that it is, can anyone point me to a better workflow so that PyCharm is controlling and evaluating what is happening in the open Houdini session and not creating a headless one? Thank you for any help/insight you can provide. I have followed a lot of solutions online for getting Houdini running from PyCharm and nothing seems to work.
  • Quick Links