-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
$JOB now printed in top right network editor
thanks to sidefx support
- Loading branch information
1 parent
43fc0b4
commit 4fcdd09
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|