Installing Python scripts in Houdini 16

   4421   4   0
User Avatar
Member
26 posts
Joined: Nov. 2015
Offline
Hi,

Trying to go through the 3dBuzz character rigging tutorials.

On the IK section there is a compiled Python script you have to install and then call via the import command

Location is C:\Program Files\Side Effects Software\Houdini 16.0.671\houdini\scripts and they have a folder for python. In my install of Houdini 16 there is no Python folder. If I put the script in that location and try to run the code I am given the warning

no module named techrigvolume1

Not sure if things have changed since they created these as it was a while back.

Where am I supposed to install the script?

Kind regards,

Duncan
User Avatar
Member
20 posts
Joined: Oct. 2013
Offline
Hi
(on Windows)You can put the script either in
C:\Users\%USERNAME%\Documents\houdini16.0\Scripts\python
or
C:\Users\%USERNAME%\Documents\houdini16.0\python2.7libs
if these folders do not exist, simply create them
Well the script on my Computer is found, unfortunately i am getting an error
“ImportError: Bad magic number”
User Avatar
Member
26 posts
Joined: Nov. 2015
Offline
I also get “ImportError: Bad magic number”

Can anybody shed some light on this issue?

Cheers,

Duncan
User Avatar
Member
26 posts
Joined: Nov. 2015
Offline
I downloaded PYCharm and wrote the python script there. Make sure to use 2.7 not python version 3+

Houdini runs python 2.7 and the old code was made with an older version so that was why I got the Bad magic number remark.

Make sure to add

import hou

Each time a hou node is called in the code. Following the tutorial was ok once this was sorted

Script added. Hope it helps
Edited by captainbuckfish - Oct. 20, 2017 00:18:20

Attachments:
techrig1.py (3.9 KB)

User Avatar
Member
26 posts
Joined: Nov. 2015
Offline
Seems endless the pitfalls of doing this…

going through the 3DBuzz stretchy IK tutorial and having issues with the end section

stretchRatioParm = hou.FloatParmTemplate('stretchRatio', ‘Stretch Ratio’, 1)
startBone.addSpareParmTuple(stretchRatioParm, (“Stretchy IK”, ))

Issue seems to be with these lines.

Error is
Traceback (most recent call last):
File “stretchyIK”, line 85, in <module>
File “stretchyIK”, line 14, in techrig_stretchyIK_Tool
File “stretchyIK”, line 54, in techrig_stretchyIK
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.671/houdini/python2.7libs\houpythonportion.py”, line 44, in addSpareParmTuple
_addParmTuple(self, parm_template, in_folder, create_missing_folders)
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.671/houdini/python2.7libs\houpythonportion.py”, line 71, in _addParmTuple
parm_template_group, in_folder, create_missing_folders)
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.671/houdini/python2.7libs\houpythonportion.py”, line 93, in _ensureFolderExists
“Invalid containing folder name(s)”)
OperationFailed: The attempted operation failed.
Invalid containing folder name(s)

Would love if somebody could explain this?
  • Quick Links