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

Andrew Lyons tstexture at gmail.com
Sun Apr 22 21:23:52 EDT 2012


Use on_updated callback:

http://www.sidefx.com/docs/houdini10.0/ref/windows/optype

when hda changes - test parm existence and throw error if needed.

Cheers


2012/4/22 Никита Мусатов <not.a.whale at gmail.com>

> How to make if I want to check in parameter, after his change, exist link
> on object. If it don`t exist raise error. Thanks You!
> 20.04.2012, в 16:48, Andrew Lyons написал(а):
>
> > 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
> > =======================================
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
> _______________________________________________
> 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