Does anyone know configure snippet of PythonSOP?

   1623   3   0
User Avatar
Member
4 posts
Joined: Feb. 2014
Offline
In wrangle case,We can configure with setting the file VEXpression.txt in houdini17.0.
Python case,what should we do?
User Avatar
Member
2564 posts
Joined: June 2008
Offline
I have done it like this, from a shelf tool that generated a new python node. I found placing the code I wanted to install inside the doc string section of a def worked great.

The python text resides inside a string parameter named ‘python’.
def code ():
    """
import os,re,random

node = hou.pwd()
geo = node.geometry()
lst_materials = []
is_material_missing = False   
    """
node_python.parm("python").set(code.__doc__)
Edited by Enivob - Dec. 30, 2018 10:00:20
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
4 posts
Joined: Feb. 2014
Offline
Thank you for reply,Enivob.

Your method looks like Maya.
So I don't want to use it.

https://www.sidefx.com/forum/topic/60332/ [www.sidefx.com]
I want python vesion of this method.
User Avatar
Member
4 posts
Joined: Feb. 2014
Offline
From 17.5
It is implemented which I wished.

Linux
/opt/hfs17.5/houdini/PythonScripts.txt

Windows
Install Folder/houdini/PythonScripts.txt

Thank you,sideFX.
  • Quick Links