Skip to content

Instantly share code, notes, and snippets.

@morphingdesign
Last active December 7, 2021 22:42
Show Gist options
  • Save morphingdesign/60e7d1eb7441a40dfd006941c43e0ddd to your computer and use it in GitHub Desktop.
Save morphingdesign/60e7d1eb7441a40dfd006941c43e0ddd to your computer and use it in GitHub Desktop.
Access all available UI preferences for a Network Editor pane in a Houdini desktop/session via Python.
# 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()
{
'maxnameheight': '0.000000',
'showcancelledworkitems': '1',
'maxflyoutscale': '0.000000',
'showtasksmenu': '1',
'showvopinoutlabels': '0',
'showmenu': '1',
'badgevexcache': 'normal',
'badgelopdebug': 'normal',
'palettemode': '1',
'TopInOutColorTag_19': '',
'autoscroll': '1',
'showchilddep': '1',
'badgeerror': 'large',
'transientinfo': '0',
'backgroundimagebrightness': '1.0',
'textbadgelayercount': 'truncated',
'textbadgecontextoptiondeps': 'truncated',
'connectorsnapradius': '0.700000',
'taskgraphsortcriteria': 'Automatic',
'showtypesidebar': '0',
'obj:listmode': '0',
'shownodeshapes': '1',
'dosnapping': '1',
'badgeneedscook': 'hide',
'showtree': '0',
'badgedynamictop': 'normal',
'showdirtyworkitems': '1',
'showparmdialogmax': '1',
'showpreviews': '1',
'showcookingworkitems': '1',
'showstaticworkitems': '1',
'badgewarning': 'normal',
'shownodetypes': '1',
'showtaskgraph': '1',
'wirefadefactor': '1.000000',
'textbadgecomment': 'selected_full_else_truncated',
'palettecolors': '',
'textbadgedescriptiveparm': 'truncated',
'flagsallowpreselect': '1',
'badgehdaunlocked': 'normal',
'palettesize': '150 150',
'perfstatname': 'Time',
'typesidebarsplit': '0.176033',
'badgenodeunload': 'normal',
'showtaskgraphperf': '0',
'treesplit': '0.25',
'showsimpleshape': '1',
'overviewbounds': '0.000000 0.000000 83.400000 365.400000',
'distancefordrag': '0.050000',
'TopInOutColorTag_12': '',
'TopInOutColorTag_13': '',
'TopInOutColorTag_10': '',
'TopInOutColorTag_11': '',
'TopInOutColorTag_16': '',
'TopInOutColorTag_17': '',
'TopInOutColor_19': '',
'TopInOutColor_18': '',
'TopInOutColor_17': '',
'TopInOutColor_16': '',
'gridystep': '1.0',
'TopInOutColor_14': '',
'maxtaskgraphrows': '20',
'TopInOutColor_12': '',
'TopInOutColor_11': '',
'TopInOutColor_10': '',
'showstackedlook': '1',
'showanimations': '1',
'shakesensitivity': '1.000000',
'gridsnapping': '1',
'showcookedworkitems': '1',
'maxnamewidth': '1000.000000',
'grouplistsplit': '0.75',
'TopInOutColor_9': '',
'TopInOutColor_8': '',
'showgrouplist': '0',
'TopInOutColor_3': '',
'TopInOutColor_2': '',
'TopInOutColor_1': '',
'TopInOutColor_0': '',
'TopInOutColor_7': '',
'TopInOutColor_6': '',
'TopInOutColor_5': '',
'TopInOutColor_4': '',
'TopInOutColorTag_8': '',
'TopInOutColorTag_9': '',
'badgehdalocked': 'normal',
'TopInOutColorTag_0': '',
'gridmode': '0',
'TopInOutColorTag_2': '',
'TopInOutColorTag_3': '',
'TopInOutColorTag_4': '',
'TopInOutColorTag_5': '',
'TopInOutColorTag_6': '',
'TopInOutColorTag_7': '',
'badgekinematics': 'hide',
'showparmdialog': '0',
'taskgraphperfstatname': 'Cook Time',
'badgenodelocked': 'normal',
'showpartitionworkitems': '1',
'showprompttext': '1',
'taskgraphlimitrows': '1',
'badge64bit': 'normal',
'textbadgeoutputforview': 'truncated',
'showfailedworkitems': '1',
'badgenodehasdata': 'hide',
'badgenotcompilable': 'normal',
'allowdiveintohdas': '1',
'minnameheight': '0.000000',
'badgechilderror': 'large',
'overviewmode': '2',
'showdep': '1',
'gridxstep': '2.0',
'badgetimedep': 'normal',
'maxworkitemsperrow': '10',
'solohighlightedworkitems': '0',
'backgroundimageediting': '0',
'taskgraphcollapsemode': 'Off',
'snapradius': '0.100000',
'badgehastakedata': 'hide',
'TopInOutColorTag_1': '',
'badgecomment': 'normal',
'sop:listmode': '0',
'allowdroponwire': '1',
'TopInOutColorTag_14': '',
'TopInOutColorTag_15': '',
'listmode': '0',
'TopInOutColorTag_18': '',
'badgeconstraints': 'normal',
'TopInOutColor_15': '',
'textbadgedetailid': 'hide',
'copypathstoclipboard': '1',
'doautomovenodes': '1',
'TopInOutColor_13': '',
'dimunusednodes': '0',
'showperfstats': '1',
'textbadgeloplastmodifiedprim': 'truncated',
'showloplayercolor': '1'
}
# Reference: https://www.sidefx.com/docs/houdini/hom/hou/Desktop.html
# Reference: https://www.sidefx.com/docs/houdini/hom/hou/ui.html
# Reference: https://www.sidefx.com/docs/houdini/hom/hou/NetworkEditor.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment