Add subscript with the <sub></sub> tags.
ni
kni
Add superscript with the <sup></sup> tags.
x2
| # Access panes in the current Houdini desktop using the | |
| # the hou.ui class with/out the hou.Desktop class. | |
| panes = hou.ui.currentPaneTabs() | |
| panes = hou.ui.curDesktop().currentPaneTabs() | |
| (<hou.NetworkEditor panetab1>, <hou.PythonShell panetab2>) | |
| # View current setting for each available preference for | |
| # the selected Network Editor pane. | |
| pane = panes[0] | |
| pane.getPrefs() |
| //Convert integer to string | |
| s@string_attribute = itoa(i@int_attribute); | |
| //Convert string to integer | |
| i@int_attribute = atoi(s@string_attribute); | |
| //Convert string to float | |
| f@float_attribute = atof(s@string_attribute); |
| # Extract consecutive trailing numerical digits from a node's name. | |
| import hou | |
| return pwd().digitsInName() | |
| # For example, a node named 'NEW_GEO_101' will return the int 101 | |
| # into the field. Returns 0 if name does not include any trailing | |
| # numerical digits. |
Add subscript with the <sub></sub> tags.
ni
kni
Add superscript with the <sup></sup> tags.
x2
| // Replace <value> with value intended to be rounded. | |
| round(<value> * 1000) / 1000 |
| // Static Values | |
| variable = {0,1,2}; | |
| // Dynamic Values | |
| variable = set(x,y,z); |
| // Fractured pieces are generated with @name such as 'piece0', 'piece1', etc. | |
| // The following prim wrangle renames each piece with a padded number. | |
| // String var to hold padded piece number. | |
| string new_name = sprintf("piece_%04d", opdigits(@name)); | |
| // Update piece name. | |
| s@name = new_name; |