Merge pull request #2412 from mlampert/feature/misc-improvements
Path: Feature/misc improvements
This commit is contained in:
@@ -85,6 +85,7 @@ def createResourceClone(obj, orig, name, icon):
|
||||
if clone.ViewObject:
|
||||
PathIconViewProvider.Attach(clone.ViewObject, icon)
|
||||
clone.ViewObject.Visibility = False
|
||||
clone.ViewObject.Transparency = 80
|
||||
obj.Document.recompute() # necessary to create the clone shape
|
||||
return clone
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import PathScripts.PathPreferences as PathPreferences
|
||||
import PathScripts.PathStock as PathStock
|
||||
import PathScripts.PathUtil as PathUtil
|
||||
import json
|
||||
import os
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
|
||||
@@ -133,14 +134,11 @@ class CommandJobTemplateExport:
|
||||
"Path - Job Template",
|
||||
PathPreferences.filePath(),
|
||||
"job_*.json")[0]
|
||||
if foo:
|
||||
s = '/'
|
||||
splitList = foo.split(s)
|
||||
li = len(splitList) - 1
|
||||
if splitList[li][-5:] == '.json':
|
||||
if splitList[li][:4] != 'job_' and splitList[li][:4] != 'Job_':
|
||||
splitList[li] = 'Job_' + splitList[li]
|
||||
foo = s.join(splitList)
|
||||
if foo:
|
||||
if not os.path.basename(foo).startswith('job_'):
|
||||
foo = os.path.join(os.path.dirname(foo), 'job_' + os.path.basename(foo))
|
||||
if not foo.endswith('.json'):
|
||||
foo = foo + '.json'
|
||||
cls.Execute(job, foo, dialog)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user