コード例 #1
0
def afwebgui():
	cgruutils.webbrowse(
		'%s:%s' % (
			cgruconfig.VARS['af_servername'],
			cgruconfig.VARS['af_serverport']
		)
	)
コード例 #2
0
def show(i_path=None):
	docs_host = 'docs_host'

	location = ''
	if docs_host in cgruconfig.VARS:
		docs_host = cgruconfig.VARS[docs_host]
		if docs_host is not None and docs_host != '':
			location = 'http://%s' % docs_host
			if i_path is not None:
				if i_path[0] == '/' or i_path[0] == '\\':
					location += i_path
				else:
					location = '%s/%s' % (location, i_path)
	else:
		cgrulocation = os.getenv('CGRU_LOCATION')
		if cgrulocation is None or cgrulocation == '':
			print('No "%s" variable and "CGRU_LOCATION" is set.' % docs_host)
			return
		location = cgrulocation
		if i_path is None or i_path == '':
			i_path = 'index.html'
		if i_path[0] == '/' or i_path[0] == '\\':
			location += i_path
		else:
			location = os.path.join(location, i_path)

	cgruutils.webbrowse(location)
コード例 #3
0
def openShot( i_path, i_verbose = False):
	"""
		Open Rules Shot URL from given path to any file/folder in the shot
	"""
	url = getShotURL( i_path, i_verbose)
	if url:
		if i_verbose:
			print('URL = %s' % url)
		cgruutils.webbrowse( url)
コード例 #4
0
def openPath( i_path, i_verbose = False):
	"""
		Open path in Rules
	"""
	url = getPathURL( i_path, i_verbose)
	if url:
		if i_verbose:
			print('URL = %s' % url)
		cgruutils.webbrowse( url)
コード例 #5
0
def show(i_path=None):

    url = cgruconfig.VARS['docs_url']

    if i_path is not None:
        i_path.rstrip('/')
        url = '%s/%s' % (url, i_path)

    cgruutils.webbrowse(url)
コード例 #6
0
ファイル: cgrudocs.py プロジェクト: CGRU/cgru
def show(i_path=None):

    url = cgruconfig.VARS['docs_url']

    if i_path is not None:
        i_path.rstrip('/')
        url = '%s/%s' % (url, i_path)

    cgruutils.webbrowse( url)
コード例 #7
0
def showForum(i_forum=None):

    forums = dict()
    forums['nuke'] = 20
    forums['watch'] = 16

    url = cgruconfig.VARS['forum_url']

    if i_forum is not None and i_forum in forums:
        url += '/viewforum.php?f=%d' % forums[i_forum]

    cgruutils.webbrowse(url)
コード例 #8
0
ファイル: cgrudocs.py プロジェクト: CGRU/cgru
def showForum( i_forum = None):

    forums = dict()
    forums['nuke']  = 20
    forums['watch'] = 16

    url = cgruconfig.VARS['forum_url']

    if i_forum is not None and i_forum in forums:
        url += '/viewforum.php?f=%d' % forums[i_forum]

    cgruutils.webbrowse( url)
コード例 #9
0
def rulesOpenShot():
	path = nuke.root().name()
	print('Scene = ' + path)

	print('Scenes:')
	print(cgruconfig.VARS['rules_scenes'])
	for scn in cgruconfig.VARS['rules_scenes']:
		path = path.split(scn)[0]
	print('Shot = %s' % path)

	print('Projects:')
	print(cgruconfig.VARS['rules_projects'])
	for prj in cgruconfig.VARS['rules_projects']:
		path = path.replace(prj, '')
	print('Path = %s' % path)

	path = cgruconfig.VARS['rules_url'] + path
	print('URL = %s' % path)

	cgruutils.webbrowse(path)
コード例 #10
0
ファイル: rules.py プロジェクト: imapolaris/CGRUChinesization
                  help='Verbose mode')
Parser.add_option('-D',
                  '--debug',
                  dest='debug',
                  action='store_true',
                  default=False,
                  help='Debug mode')
Options, Args = Parser.parse_args()

if Options.debug:
    Options.verbose = True

if not 'rules_url' in cgruconfig.VARS:
    print('Rules URL is not defined.')
    sys.exit(1)

Location = None
if len(Args):
    Location = Args[-1]
else:
    cgruutils.webbrowse(cgruconfig.VARS['rules_url'])
    sys.exit(0)

if Options.verbose:
    print('Opening "%s"' % Location)

if Options.shot:
    cgrules.openShot(Location, Options.verbose)
else:
    cgrules.openPath(Location, Options.verbose)
コード例 #11
0
ファイル: cmd.py プロジェクト: laurence-trippen/cgru
def afwebgui():
    cgruutils.webbrowse(
        '%s:%s' %
        (cgruconfig.VARS['af_servername'], cgruconfig.VARS['af_serverport']))
コード例 #12
0
ファイル: cgrules.py プロジェクト: lucienfostier/cgru
def openShot(i_path, i_verbose=False):
    cgruutils.webbrowse(getShotURL(i_path, i_verbose))
コード例 #13
0
ファイル: rules.py プロジェクト: CGRU/cgru
from optparse import OptionParser
Parser = OptionParser(usage="%prog [Options] output\nType \"%prog -h\" for help", version="%prog 1.0")
Parser.add_option('-s', '--shot',    dest='shot',    action='store_true', default=False, help='Open shot')
Parser.add_option('-V', '--verbose', dest='verbose', action='store_true', default=False, help='Verbose mode')
Parser.add_option('-D', '--debug',   dest='debug',   action='store_true', default=False, help='Debug mode')
Options, Args = Parser.parse_args()

if Options.debug:
	Options.verbose = True

if not 'rules_url' in cgruconfig.VARS:
	print('Rules URL is not defined.')
	sys.exit(1)

Location = None
if len(Args):
	Location = Args[-1]
else:
	cgruutils.webbrowse( cgruconfig.VARS['rules_url'])
	sys.exit(0)

if Options.verbose:
	print('Opening "%s"' % Location)

if Options.shot:
	cgrules.openShot( Location, Options.verbose)
else:
	cgrules.openPath( Location, Options.verbose)

コード例 #14
0
def openShot(i_path, i_verbose=False):
    cgruutils.webbrowse(getShotURL(i_path, i_verbose))
コード例 #15
0
 def httpsServer(self):
     cgruutils.webbrowse('https://localhost:' +
                         str(cgruconfig.VARS['keeper_port_https']) + '/')
コード例 #16
0
def afwebgui(): cgruutils.webbrowse( cgruconfig.VARS['af_servername']+':'+str(cgruconfig.VARS['af_serverport']))

def exitRender(  text = '(keeper)'): af.Cmd().renderExit( text)
コード例 #17
0
ファイル: tray.py プロジェクト: CGRU/cgru
 def httpsServer(self):
     cgruutils.webbrowse('https://localhost:' + str(cgruconfig.VARS['keeper_port_https']) + '/')