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

Georg Duemlein rdg at preset.de
Wed Jan 19 19:20:31 EST 2011


>> 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.

Sorry, I missed that comment.
Yes, if you have a nice system in place that versions python modules
across otls it's a good idea to follow his approach.


On Wed, 19 Jan 2011 14:13:53 -0800, Andrew D Lyons <tstexture at gmail.com>
wrote:
> Errata: second block should have been:
> 
> 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(parm, parm2)
> node.parm('yum').set(val)
> 
> Cheers
> 
> 
> On 19 January 2011 14:12, Andrew D Lyons <tstexture at gmail.com> wrote:
>> 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
>> =======================================
>>

-- 
Georg Duemlein
+1 604 726 4230
701-1833 Frances Street
Vancouver, BC
V5L 1Z8



More information about the Sidefx-houdini-list mailing list