I have two quick questions (which bothers me that I couldn´t find out myself).
1. How do I transfer my selection from the viewport to primitive numbers to be inserted in a parameter field?
The way I usually do that is by doing my selection in the viewport, then pressing backspace/delete to get a blast node where my selection is printed out as primitive numbers, then copy those and delete the blast node. Not very convenient.
2. For some weird reason I can´t do any “ALT GR-characters” in Houdini for example: ©@£$∞§|≈ (with swedish keyboard). I have probably tried every combination of shift/ctrl/alt/command there is without luck. Anyone got any idea? Worth noting is that I as mentioned runs on macintosh and with swedish keyboard layout.
$-sign on non-english Macintosh
9787 14 0- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
1. Transfer selection…
You can write a quick shelf tool that returns the primitive numbers to a floating console. You can then copy/paste the numbers in to your field.
Just RMB in an empty spot on your shelf of choice and choose “New Tool”.
Rename the tool in the Options folder:
Note: I attached the tool grab_selection.shelf. To install it, download then move it in to your $HOME/houdini9.5/toolbar dierctory. Then in the shelf you want to add the tool to, RMB > Edit Shelf then in the Tools directory find the tool Grab Viewport Selection and include it by simply selecting it.
You can write a quick shelf tool that returns the primitive numbers to a floating console. You can then copy/paste the numbers in to your field.
Just RMB in an empty spot on your shelf of choice and choose “New Tool”.
Rename the tool in the Options folder:
- Save To: c… …/toolbar/grab_selection.shelf where the c… …/ is the full path to your home houdini directory
Name: grab_selection
Label: Grab Selection
Copy and Paste the python code below in to the Script section of the tool:
import toolutils
import soptoolutils
activepane = toolutils.activePane(kwargs)
# Get selected geometry from the scene
selection = activepane.selectGeometry(
prompt=toolutils.selectionPrompt(hou.sopNodeTypeCategory()) )
print selection
Press Accept and you're done.
Just go to geometry mode, select some faces, press the tool or tab-type the tool from the viewport to get a floating console with your selection. Just copy/paste in to your field.
This tool will return primitive selections in to your console.
Note: You can run this code from a button with some minor changes so you can have a “grab viewport selection” button for any field that takes a list of geometry.
Note: I attached the tool grab_selection.shelf. To install it, download then move it in to your $HOME/houdini9.5/toolbar dierctory. Then in the shelf you want to add the tool to, RMB > Edit Shelf then in the Tools directory find the tool Grab Viewport Selection and include it by simply selecting it.
There's at least one school like the old school!
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
jeff
1. Transfer selection…
You can write a quick shelf tool that returns the primitive numbers to a floating console. You can then copy/paste the numbers in to your field.
Just RMB in an empty spot on your shelf of choice and choose “New Tool”.
Rename the tool in the Options folder:
- Save To: c… …/toolbar/grab_selection.shelf where the c… …/ is the full path to your home houdini directory
Name: grab_selection
Label: Grab Selection
Copy and Paste the python code below in to the Script section of the tool:
import toolutils
import soptoolutils
activepane = toolutils.activePane(kwargs)
# Get selected geometry from the scene
selection = activepane.selectGeometry(
prompt=toolutils.selectionPrompt(hou.sopNodeTypeCategory()) )
print selection
Press Accept and you're done.
Just go to geometry mode, select some faces, press the tool or tab-type the tool from the viewport to get a floating console with your selection. Just copy/paste in to your field.
This tool will return primitive selections in to your console.
Note: You can run this code from a button with some minor changes so you can have a “grab viewport selection” button for any field that takes a list of geometry.
Note: I attached the tool grab_selection.shelf. To install it, download then move it in to your $HOME/houdini9.5/toolbar directory. Then in the shelf you want to add the tool to, RMB > Edit Shelf then in the Tools directory find the tool Grab Viewport Selection and include it by simply selecting it.
Thank you, I will try that one. Even though it's not perfect it way better than my current method. But really weird that you can't just, for example right click in the text box and choose “Import selected” or similar.
Help with the keyboard bug/setting would also be appreciated.
- stevenong
- Member
- 1631 posts
- Joined: July 2005
- Offline
Hi,
Alternatively, you can group the primitives and use the following function to return the primitive numbers:
/ > exhelp primlist
string primlist (string surface_node, string group_name)
The return string is a space separated list of primitive numbers.
RELATED
* haspoint
* pointlist
* pointgrouplist
* hasprim
* primgrouplist
REPLACED BY
- hou.Geometry
- hou.PrimGroup
- hou.Prim
Cheers!
steven
xtimmyxWhat are you trying to do exactly? Shouldn't you be able to select the primitives and apply the operation to them?
1. How do I transfer my selection from the viewport to primitive numbers to be inserted in a parameter field?
The way I usually do that is by doing my selection in the viewport, then pressing backspace/delete to get a blast node where my selection is printed out as primitive numbers, then copy those and delete the blast node. Not very convenient.
Alternatively, you can group the primitives and use the following function to return the primitive numbers:
/ > exhelp primlist
string primlist (string surface_node, string group_name)
The return string is a space separated list of primitive numbers.
RELATED
* haspoint
* pointlist
* pointgrouplist
* hasprim
* primgrouplist
REPLACED BY
- hou.Geometry
- hou.PrimGroup
- hou.Prim
Cheers!
steven
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
Some operators may have a geometry list buried in the parameters and not use the group field coming in to the operator where the backquote ` “reselect” operation would normally work.
Group SOP is one of them. We fixed a bug on the “Transfer Selection to Pattern” button for the pattern field in the Group SOP's Number folder parm. It was broken until recently in H9.5.
You can do the same for your custom HDA. Build your own “Transfer Selection to Pattern” button by modifying the python script provided above.
Group SOP is one of them. We fixed a bug on the “Transfer Selection to Pattern” button for the pattern field in the Group SOP's Number folder parm. It was broken until recently in H9.5.
You can do the same for your custom HDA. Build your own “Transfer Selection to Pattern” button by modifying the python script provided above.
There's at least one school like the old school!
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
stevenong
Hi,
What are you trying to do exactly? Shouldn't you be able to select the primitives and apply the operation to them?
Alternatively, you can group the primitives and use the following function to return the primitive numbers:
/ > exhelp primlist
string primlist (string surface_node, string group_name)
The return string is a space separated list of primitive numbers.
RELATED
* haspoint
* pointlist
* pointgrouplist
* hasprim
* primgrouplist
REPLACED BY
- hou.Geometry
- hou.PrimGroup
- hou.Prim
Cheers!
steven
All sort of things, the last time I needed it was when selecting a group of points in an add SOP. I guess I could just make a group but when it's just a few points it seams a little unnecessary. And my workflow is often to create the nodes first, then input values instead of creating them with a selection.
- stevenong
- Member
- 1631 posts
- Joined: July 2005
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
stevenong
Hi,
You can still put down a node then hit Enter in the viewport and type the “ ` ” (backtick key, to the left of the 1 key) to do a re-selection. After you select the points or primitives you need, hit Enter again to confirm the selection.
Cheers!
steven
I can't quite get that to work either. First I thought it was because of my Swedish keyboard layout but it didn't work after switching to american either.
And about the $ problem, I can't type any of the “ALT-characters” ($ is ALT-4 och CTRL-ALT-4 on Swedish keyboards). And none of these works on the Macintosh version.
- jatero
- Member
- 26 posts
- Joined: Feb. 2007
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
- edward
- Member
- 7694 posts
- Joined: July 2005
- Online
- AndreyKush
- Member
- 8 posts
- Joined: Oct. 2008
- Offline
- UnoW
- Member
- 1 posts
- Joined: Feb. 2009
- Offline
Same problem here… swe keyboard.
Maybe you can try a keyboard layout editor like “Ukelele” or a similar utility to map the $ to another key in a custom *.keylayout file. Or just copy the keylayout in use and change the the xml code… have not tried that myself though. Can it be related to the firmware of the keyboard?
Maybe you can try a keyboard layout editor like “Ukelele” or a similar utility to map the $ to another key in a custom *.keylayout file. Or just copy the keylayout in use and change the the xml code… have not tried that myself though. Can it be related to the firmware of the keyboard?
- simonj
- Member
- 8 posts
- Joined: March 2009
- Offline
Another swedish guy here having problem with the $ sign. Thing is, I can't use any of the following: { } etc.
The thing I found mose useful is going into
System Preferences > International > Input Menu
Enable U.S aswell, and toggle “Show input menu in menu bar”. Then when working with Houdini, just toggle on “U.S keyboard layout”.
$ is now Shift + 4 on a Swedish keyboard, {} are located on “å” and “¨”- keys.
The thing I found mose useful is going into
System Preferences > International > Input Menu
Enable U.S aswell, and toggle “Show input menu in menu bar”. Then when working with Houdini, just toggle on “U.S keyboard layout”.
$ is now Shift + 4 on a Swedish keyboard, {} are located on “å” and “¨”- keys.
- FakePilot
- Member
- 24 posts
- Joined: Aug. 2012
- Offline
-
- Quick Links