Skip to content

Commit be35efc

Browse files
authored
Merge pull request #23 from weijer/nuke14
兼容Nuke14
2 parents 45a2523 + 2fba496 commit be35efc

File tree

97 files changed

+38883
-14318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+38883
-14318
lines changed

command.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,25 @@
1212
from python.Channel import autoComper, PreCompForArnold, RenderLayer
1313
from python.ToolSet import ReadAfterRender
1414
from python.cryptomatte import cryptomatte_utilities
15-
from python.mamoworld.mochaImportPlus import loadMochaImport
16-
from python.mamoworld.workflow import relativeFilePath
17-
from python.packproject import nuke2pack
15+
1816

1917
base_dir = os.path.dirname(__file__)
20-
loadMochaImport.load()
21-
loadMochaImport.addIconPath(base_dir)
18+
if nuke.NUKE_VERSION_MAJOR < 13:
19+
from python.mamoworld.mochaImportPlus import loadMochaImport
20+
from python.mamoworld.workflow import relativeFilePath
21+
22+
loadMochaImport.load()
23+
loadMochaImport.addIconPath(base_dir)
24+
import mochaimport
25+
else:
26+
# nuke13以上版本适用,兼容python3
27+
from python.mamoworld2.mochaImportPlus import loadMochaImport
28+
from python.mamoworld2.workflow import relativeFilePath
2229

23-
import mochaimport
30+
loadMochaImport.addIconPath(base_dir)
31+
from python.mamoworld2.mochaImportPlus.mochaimport import mochaimport
32+
33+
from python.packproject import nuke2pack
2434

2535

2636
def run_pack():

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@
835835
"ScriptEditor": {
836836
"name": "Multi Script Editor",
837837
"command": "command.run_ScriptEditor()",
838-
"max_version": "12"
838+
"max_version": ""
839839
}
840840
}
841841
}

python/mamoworld2/__init__.py

Whitespace-only changes.

python/mamoworld2/mochaImportPlus/__init__.py

Whitespace-only changes.
1.67 KB
Loading
1.41 KB
Loading
1.63 KB
Loading
1.98 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import re
2+
3+
4+
def getFolder():
5+
""" return the folder where this module is located"""
6+
7+
folderWithFileName = __file__
8+
if(folderWithFileName[-1]=='c'):
9+
fileName = __name__+".pyc"
10+
else :
11+
fileName = __name__+".py"
12+
folderLength = len(folderWithFileName) - len(fileName)
13+
folderWithoutFileName = folderWithFileName[:folderLength]
14+
#print (folderWithFileName)
15+
#print (__name__)
16+
#print (fileName)
17+
#print(str(len(folderWithFileName)))
18+
#print (str(len(fileName)))
19+
#print (str(folderLength))
20+
#print (folderWithoutFileName)
21+
22+
return folderWithoutFileName
1.56 KB
Loading

0 commit comments

Comments
 (0)