[Sidefx-houdini-list] Digital Asset raise Error with Python

Andrew Lyons tstexture at gmail.com
Fri Apr 20 08:48:58 EDT 2012


HOM in general returns None for non-existant objects. Something like
this can convert None into an exception:

>>> node = hou.node('/obj/geo1')
>>> node.parm("non_existant")
>>> parm = node.parm("non_existant")
>>> if not parm:
...     raise hou.Error("Parm missing")

You could put that into a digital asset event handler or python module.

Cheers


2012/4/20 Никита Мусатов <not.a.whale at gmail.com>:
> Hello! How in Digital Asset, if I have not a parameter raise error with
> Python. I think need write some command in Callback Script, but cann`t find
> raise error example in documentation for Digital Asset. Some body know how
> make it? Thank you.
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



-- 
=======================================
Andrew D Lyons | Digital Artist | http://www.tstex.com
=======================================



More information about the Sidefx-houdini-list mailing list