Hiya,
I've been working on a python script, which allows the user to isolate an object ( hiding all other objects ).
The difference between this script and the tool from “download shelf” one, is that this one keeps in memory ( by a simple .tmp file in $TMP folder), which objects were displayed or hidden before the isolate process.
Like that, when you exit isolate mode, not every objects will be displayed again but the only the nodes displayed before.
The script is still WIP, any bugs or errors, let me know ( only tested on windows 7 for the moment).
How to use:
- Copy the .py file in “C:\Program Files\Side Effects Software\Houdini XX.X.xxx\python26\lib” or whatever python folder used by Houdini
- Create a new tool in a shelf: Right-clic -> new tool
- In tab “Script” write these two lines:
import IsolateSelection
reload(IsolateSelection)
Select an object to isolate that object by a clic on the tool just created, clic again the tool to display back all other nodes.
Thanks,
Guillaume
WIP python script: Isolate Tool
6636 7 1- cgtoolbox GJ
- Member
- 12 posts
- Joined: 7月 2013
- Offline
- jparker
- Member
- 317 posts
- Joined:
- Offline
Instead of using /tmp for your object information you could also store it on the Python hou.session module. Just assign like thus:
hou.session.isolateNodePaths =
This information isn't saved with the scene, but if you wanted it to persist you could use hou.appendSessionModuleSource:
http://www.sidefx.com/docs/houdini12.5/hom/independent [sidefx.com]
http://www.sidefx.com/docs/houdini12.5/hom/hou/appendSessionModuleSource [sidefx.com]
hou.session.isolateNodePaths =
This information isn't saved with the scene, but if you wanted it to persist you could use hou.appendSessionModuleSource:
http://www.sidefx.com/docs/houdini12.5/hom/independent [sidefx.com]
http://www.sidefx.com/docs/houdini12.5/hom/hou/appendSessionModuleSource [sidefx.com]
- cgtoolbox GJ
- Member
- 12 posts
- Joined: 7月 2013
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: 11月 2008
- Offline
That should be much easier Take a look at my solution:
http://pastebin.com/YiCC0kSB [pastebin.com]
Put it on shelf or hou.session, select a couple of objects and call isolate().
If selection is empty - all objects became visible.
8)
http://pastebin.com/YiCC0kSB [pastebin.com]
Put it on shelf or hou.session, select a couple of objects and call isolate().
If selection is empty - all objects became visible.
8)
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
Sr. Graphics Tools Engineer @ Nvidia
- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
Aren't you assuming all the objects were visible? does seem a bit optimist assumption.
I rather prefer a foolproof version that takes no assumptions if possible.
am I missing something?
I rather prefer a foolproof version that takes no assumptions if possible.
am I missing something?
Stalkerx777
That should be much easier Take a look at my solution:
http://pastebin.com/YiCC0kSB [pastebin.com]
Put it on shelf or hou.session, select a couple of objects and call isolate().
If selection is empty - all objects became visible.
8)
- pezetko
- Member
- 392 posts
- Joined: 11月 2008
- Offline
- cgtoolbox GJ
- Member
- 12 posts
- Joined: 7月 2013
- Offline
- jordibares
- Member
- 655 posts
- Joined: 2月 2006
- Offline
-
- Quick Links