[Sidefx-houdini-list] Editng Python in a Digital Asset

Andrew D Lyons tstexture at gmail.com
Wed Jan 19 17:12:39 EST 2011


The only code in an otl should look like this:
--
import myModule as stuff
reload(stuff)
node = <the current hou.Node instance>
stuff.doStuff(node)

- or at most -

import myModule as stuff
reload(stuff)
node = <the current hou.Node instance>
parm1 = node.parm('foo').eval()
parm2 = node.parm('bar').eval()
val = stuff.doStuff(node)
node.parm('yum').set(val)
--

Then put myModule in your scripts/python dir and let the reload help
you iterate (comment reload out when dev finishes.) That way you can
use revision control on your py code, auto doc tools etc.

Cheers




On 19 January 2011 12:44, Sean Lewkiw <Sean.Lewkiw at cis-vancouver.com> wrote:
> How are you peeps dealing with editing python code inside a digital asset?
>
> When I edit the file live in the scripts tab, it makes me want to pull my hair out.  Hitting "commit" scrolls the file to the top of the page, and hitting a new line does not auto-indent.  At some point somewhere indents get messed up and it won't compile and I end up "alt+e" editing it to restore sanity.  However, editing it this way causes the usual scrolling to the top of the file, and makes life miserable.
>
> I thought I could use the "Save as file" button to save the script out, then edit, load it back in using the "Filename" section on the right side of the tab, and then "reload all files", but this does not seem to do anything.
>
> Am I missing something?  Is there an easier way?
>
> Sean
>
> This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email and any attachments is strictly prohibited. If you receive this email in error, please immediately notify the sender by return email and permanently delete the original, any copy and any printout thereof. The integrity and security of e-mail cannot be guaranteed.
> _______________________________________________
> 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