Skip to content

Commit

Permalink
$JOB now printed in top right network editor
Browse files Browse the repository at this point in the history
thanks to sidefx support
  • Loading branch information
simonreeves committed Jan 16, 2023
1 parent 43fc0b4 commit 4fcdd09
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions python3.9libs/nodegraphtitle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from __future__ import print_function
import hou
import nodegraphprefs as prefs

def networkEditorTitleLeft(editor):
try:
title = ''
pwd = editor.pwd()
playerparm = pwd.parm('isplayer')
if playerparm is not None and playerparm.evalAsInt() != 0:
title += 'Network in Playback Mode\n'
if prefs.showPerfStats(editor):
profile = hou.perfMon.activeProfile()
if profile is not None:
profiletitle = profile.title()
if not profiletitle:
profiletitle = 'Profile ' + str(profile.id())
title += profiletitle + ': ' + prefs.perfStatName(editor)

except:
title = ''

# Bee edit, append $JOB
# Add a newline if title is in use
if title:
title += '\n'

title += hou.getenv('JOB').split('/')[-1]

return title

def networkEditorTitleRight(editor):
try:
title = ''
pwd = editor.pwd()
title += pwd.childTypeCategory().label()

except:
title = ''

return title

0 comments on commit 4fcdd09

Please sign in to comment.