[Sidefx-houdini-list] [python] hou.session persistence

Andrew D Lyons tstexture at gmail.com
Thu Dec 4 12:04:47 EST 2008


That might be a python reference artifact. Depending on where you are
creating your object you may just be getting a shallow copy to your
hou.session module. Take a look at the deepcopy module in python:
http://www.python.org/doc/2.5.2/lib/module-copy.html

Perrhaps you might monkey patch the hou module using 123.py . With
that done you can read/write to disk python objects.
http://en.wikipedia.org/wiki/Monkey_patch

Cheers




2008/12/4 Simon Kapeniak <szymon.kapeniak at gmail.com>:
> Yes, and I deal with a same *file but different sessions.  This is what I
> know from H9.0. But if so, why Python Source Editor refers to this module
> and successfully saves object across sessions of one hip file, while scripts
> commands can't do the same thing although those scripts see perfectly
> objects saved in hou.session via PSE... this is weird, isn't it?
>
> 2008/12/4 Alvaro Castaneda <varomix at gmail.com>
>
>> the session module is just for the current file and that how it supposed to
>> work
>> there a master class on python at sidefx.com they talk in-depth about all
>> this, check it out
>>
>>
>> On Fri, Dec 5, 2008 at 7:33 AM, Simon Kapeniak <szymon.kapeniak at gmail.com
>> >wrote:
>>
>> > Hello All,
>> > does anybody know why if I use Python Source Editor (PSE)  to save
>> objects
>> > in hou.session, it's saved in a hip file, while doing the same thing from
>> a
>> > script (like Shelf Tool) doesn't work. I can test in texport:
>> > dir(hou.session), and my objects exists, but if they are not saved by
>> hand
>> > in PSE, I'm loosing it in a next session. Is it expected behavior? Do we
>> > need this inconsistence?
>> > _______________________________________________
>> > Sidefx-houdini-list mailing list
>> > Sidefx-houdini-list at sidefx.com
>> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>> >
>>
>>
>>
>> --
>> varomix DaGreit
>>
>> intelia_animate
>> www.intelianimate.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