setDeleteScript method does not work?

   1079   1   1
User Avatar
Member
15 posts
Joined: Feb. 2016
Offline
(Posted over at od|force too)

Hey guys,

I was wondering if anybody is familiar with using the method
hou.node.setDeleteScript()
In the docs, the language arg is set to Python:

setDeleteScript(script_text, language=hou.scriptLanguage.Python)

But when running the following code, I get an error

n = hou.node('/obj/geo1')
cmd = 'x = 5; print x'
n.setDeleteScript(cmd)
OperationFailed: The attempted operation failed.
Python is not yet supported in deletion scripts.
Just passing an empty string gives the same error.

When trying to set the language flag to Hscript with

n.setDeleteScript('setenv x = "hello"', language=hou.scriptLanguage.Hscript)
It raises another error

TypeError: setDeleteScript() got an unexpected keyword argument 'language'


Is there something I'm missing? I would normally create an HDA and use the built in ‘On Deleted’ call and run my code there, but for this particular case I'm unable to use an HDA. I was able to find this function all the way back in the Houdini 12 docs. Is it still not usable?

I'm on 16.5.323

Thanks!
Edited by jamesr - April 25, 2018 15:09:03
User Avatar
Member
7 posts
Joined: Jan. 2018
Offline
Hi, I am interested on this too !
Thanks!
  • Quick Links