renderglitch
indigosm
guilhermecasagrandi
python settings) "$HFS\\houdini\\python3.9libs" on "python.analysis.extraPaths" list.
If you really need to use PyCharm, It'd probably have a similar way to add the path to the python environment.
thanks i finally got it working. and yeah i absolutely love pycharm for everything except for one or two things like this. hah.
hey, could you please provide all steps how did you make it work? much appreciated. I am trying to set it up on H20 py3.9
these are my personal notes with houdini/python/pycharm. hopefully they're legible. hah.
/*how to get houdini to use python3?*/
well, you need to download a python3 build. for example, on the daily builds page, theres a tab just for python 3 builds. if you dont grab one of those, youll still be in py27 (daily builds page is bookmarked in the 7pimps/houdini bookmarks)
/*how to get houdini python working with pycharm*/
1 : new project->existingInterpreter->systemInterpreter->C:\Program Files\Side Effects Software\Houdini 19.5.605\houdini\python3.7libs
2 : settings->project senBlah->python interpretor->click on path dropdown and at bottom is a SHOW ALL button
2a : in new popup click on folder icon
2b : click on + button and add this dir : C:\Program Files\Side Effects Software\Houdini 19.5.605\houdini\python3.7libs
3 : help->editcustomproperties->paste this : idea.max.intellisense.filesize=3000
4 : run File->InvalidateCaches->Restart
/*autocomplete not working properly?*/
you might have to force pycharm to know what a var is. heres two examples of it forcing the obj and geo vars to be known as nodes. thus their autocompletes work
obj: hou.Node = hou.node('/obj')
geo: hou.Node = obj.createNode('geo', 'my_geo')
geo.setName(name=test) <this auto complete now works and shows the vars of the function>
/*how to get a python external library to work*/
1 : houdini needs to know about the dir you put your library scripts in. that dir is defined in your preferences file : C:\Users\senec\Documents\houdini18.5\houdini.env. add this line : HOUDINI_PATH = Z:\7d\EnvArt\Blueprints\Houdini;& (the & is on purpose. it tells houdini to add this dir to the list of dirs it checks. not replace them all with this one dir)
2 : like how you have to create an OTL dir in there for HDAs, or a vex dir for vex functions, you need a python3.7libs dir for py functions. if the version of python changes, that dir would changes
2a : is houdini saying senFunctions doesnt exist? Its because theyve gone to a newer version of python and you must copy/paste your libs dir and give it a new name and close/restart houdini. i just had to create a new path called python3.10libs and close/restart and now my node grid snap script works again
3 : then if the file is called
senFunctions.py, add 'import senFunctions' to your code.
4 : you have to type 'senFunctions.blahFunc()' to run a func. if you do 'import senFunctions as sf', then its : 'sf.blahFunc()'
/*force a py file to reload (reload py reimport py) <it's the reload() command but you have to import it in order to get it to work in py3>*/0
import senFunctions as sf
from importlib import reload
reload(sf)
sf.nodes_snapToGrid()