the correct way add .obj to shelf
there only simple 3d geometry
what i want set set a shelf up with few models
lot like Modo Qbics
what drag and drop and Ctrl + click on model in shelf (so center)
been playing a round but i get errors . can not seem get it right
the correct way add .obj to shelf
1675 4 0- gfxfx
- Member
- 91 posts
- Joined: Oct. 2015
- Offline
- mandrake0
- Member
- 636 posts
- Joined: June 2006
- Offline
there is no correct way to do it :-)
there are a lot of ways :-)
just made a simple video:
https://vimeo.com/152146251 [vimeo.com]
whats also possible is to make a small python script that checks a folder where you have got your preset meshes. for the interface you could use a selectFromList Function to show your meshes. so you will have just one icon on the shelf for all your presets. :-)
Python Functions:
http://www.sidefx.com/docs/houdini15.0/hom/hou/ui [sidefx.com]
there are a lot of ways :-)
just made a simple video:
https://vimeo.com/152146251 [vimeo.com]
whats also possible is to make a small python script that checks a folder where you have got your preset meshes. for the interface you could use a selectFromList Function to show your meshes. so you will have just one icon on the shelf for all your presets. :-)
Python Functions:
http://www.sidefx.com/docs/houdini15.0/hom/hou/ui [sidefx.com]
- mandrake0
- Member
- 636 posts
- Joined: June 2006
- Offline
just had some time to make a example:
Make a New Tool in the Shelf and add the Code.
Script Language must be Python.
Use bgeo Files for faster loading :-)
import hou
import os
# Set your path to your files
path = ‘C:\\PATH\\TO\\YOUR\\FILES’
files = os.listdir(path)
selected = hou.ui.selectFromList(files,exclusive=True, title='myGeo')
if len(selected) != 0:
obj = hou.node('/obj')
node = obj.createNode('geo', ‘myPreset’)
p = hou.parm('/obj/' + node.name() + ‘/file1/file’)
p.set(path + “/” + files[selected])
Make a New Tool in the Shelf and add the Code.
Script Language must be Python.
Use bgeo Files for faster loading :-)
import hou
import os
# Set your path to your files
path = ‘C:\\PATH\\TO\\YOUR\\FILES’
files = os.listdir(path)
selected = hou.ui.selectFromList(files,exclusive=True, title='myGeo')
if len(selected) != 0:
obj = hou.node('/obj')
node = obj.createNode('geo', ‘myPreset’)
p = hou.parm('/obj/' + node.name() + ‘/file1/file’)
p.set(path + “/” + files[selected])
- gfxfx
- Member
- 91 posts
- Joined: Oct. 2015
- Offline
- mandrake0
- Member
- 636 posts
- Joined: June 2006
- Offline
-
- Quick Links