Python Use SOP edit node... How can I set apply.?

   2003   2   0
User Avatar
Member
2 posts
Joined: 2月 2009
Offline
hello… TDs….

I am Working on 3D R&D for ANi in seoul…


It's make me cry…

python script is below…


First. make poly cube then

>>> box_ = hou.node('obj/box_object1/box1')
>>> edit_ = hou.node('obj/box_object1').createNode('edit')
>>> edit_.setFirstInput(box_)
>>> edit_.setDisplayFlag(True)
>>> edit_.parm('grouptype').set('points')
>>> edit_.parm('group').set('1')
>>> edit_.parm('tx').set(2)
>>> edit_.parm('apply').set('???' )

so.. I can't find right “apply” set value..

I want to same resolts of “Commit Transform/Peak Chnage” Button. in Edit

with Python script…

please tell me what is right value in set ?


thank you…
User Avatar
Member
1908 posts
Joined: 11月 2006
Offline
To execute buttons you need to use hou.Parm.pressButton().

edit_.parm('apply').pressButton()

If you are wanting to be modifying lots of points in a script, a better solution might be to use a Python sop instead of edit.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
2 posts
Joined: 2月 2009
Offline
It's working…

That's sounds great…

I will try python sop….

thank you…
  • Quick Links