node = hou.selectedNodes()[0]
geo = node.geometry()
--------------------------
code = '''@N = @N;
@v = @N;
@Cd=0;
@Cd = set( @P.y,0,0 );'''
-sample2).
codelist = []
codelist.append('s@name = "%s";' % (geo.name()))
-sample3).
g = "test"
g = "test"
r = "test2"
codelist = []
codelist.append('%s,%s' % (g,r))
code = '\n'.join(codelist)
--------------------------
wrangle = geo.createNode('attribwrangle')
wrangle.parm('snippet').set(code)
Reference:
- Fill in the code in wangle by python
https://www.sidefx.com/forum/topic/73330/?page=1#post-309997
- String handling in python
No comments:
Post a Comment