[Sidefx-houdini-list] Callback for python scripts

Joe Barrow joe at primalpictures.com
Mon Feb 16 13:23:10 EST 2009


Thanks very much,

That's exactly what I was after.

How do I go about feeding an argument into my script ?

I have a group in another argument that I want to apply it to (defined
as chs("./MyGroup") in old speak) and my callback line says 

hou.pwd().hdaModule().loadMats.loadMats('MyGroup')

- I need to specify what MyGroup is, is there a simple way of doing this
or do I have to define a path back to it and then squeeze it into my
callback line ?

My brain hurts

Jb

 

-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com
[mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of guillaume
laforge
Sent: 16 February 2009 17:31
To: sidefx-houdini-list at sidefx.com
Subject: Re: [Sidefx-houdini-list] Callback for python scripts

Hi,

You can use the hdaModule() to get your function. For example, if your
node is inside a digital asset, you can use "MyPyFunction" like this :
pwd().parent().hdaModule().MyPyFunction()

Hope this help

Cheers

--

Guillaume Laforge
3d Technical Director
http://www.alamaison.fr

On Mon, Feb 16, 2009 at 6:19 PM, Joe Barrow <joe at primalpictures.com>
wrote:
>
> How do I access an embedded python script in an HDA?
>
> In hscript I would use opdef:.?myScript.cmd in the callback parameter,

> what is the python equivalent?
>
> Thanks
>
> Joe Barrow
>
> ______________________________________________________________________
> This communication is from Primal Pictures Ltd., a company registered
in England and Wales with registration No. 02622298 and registered
office: 4th Floor, Tennyson House, 159-165 Great Portland Street,
London, W1W 5PA, UK. VAT registration No. 648874577.
>
> This e-mail is confidential and may be privileged. It may be read,
copied and used only by the intended recipient. If you have received it
in error, please contact the sender immediately by return e-mail or by
telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not
disclose its contents to any person.
> This email has been scanned for Primal Pictures by the MessageLabs
Email Security System.
> ______________________________________________________________________
> _______________________________________________
> 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

______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email Security System.
______________________________________________________________________



More information about the Sidefx-houdini-list mailing list