Ids
Here is how I got the PyCharm integration working, including autocomplete:
- Go to your Python Interpreter settings (in the bottom right, or File>Settings>Project>Python Interpreter).
- Click the gear icon in the upper right corner to show all your interpreters.
- In the top left corner of the new window, click the "+" button to add a new interpreter.
- Pick the System Interpreter and then browse to the path of your Houdini installation that has the Python executable that you want to use (2.7 vs 3.7 for example). The path probably looks something like this: C:\Program Files\Side Effects Software\Houdini 18.x.xxx\python27\python2.7.exe.
- After you've pressed OK in the window, you will go back to the window with the list of interpreters. Select your new interpreter and click the 5th button from the top left to "Show paths for the selected interpreter".
- By default it should have some paths to libraries already. However, the specific hython libs are probably not in the list, so you need to add that by pressing the "+" in the top left corner. The path should look something like this: C:\Program Files\Side Effects Software\Houdini 18.x.xxx\houdini\python2.7libs (or 3.7libs if you want to use 3.7). These libs will give you the autocomplete functionality for the HOM classes.
- Last but not least, for each Houdini Python project you need to set the interpreter to this new interpreter. And in order to get the autocomplete working properly, you need to import the hou module at the start of each file where you want to use it. It is as simple as import hou, and PyCharm should recognize the module from the interpreter.
From there on, you can use the hou module the same way you would inside Houdini, for example:orimport hou hou.node("../..")hou.pwd().geometry()
I hope this helps! I couldn't attach pictures because that would be quite a few pictures, so I hope that my instructions are clear enough to follow. If you need any further help, feel free to reach out to me.
I keep getting this error