Parcourir la source

2021-07-26

sceneControl: changed USER env to USER_SHORT env
sceneControl: added tooltip for ignore in sceneControl knob
Nuke12.2.v5_GEN.bat: changed USER env to USER_SHORT env
init.py: added FTRACK_API_PYTHONPATH variable that is derived from the project_config.py of kenv.
Martin Sächsinger il y a 3 ans
Parent
révision
5a0c6eac2a
4 fichiers modifiés avec 31 ajouts et 11 suppressions
  1. 2
    3
      Nuke12.2v5_GEN.bat
  2. 14
    0
      README.md
  3. 7
    2
      init.py
  4. 8
    6
      pythonpluginsUI/sceneControl/sceneControl.py

+ 2
- 3
Nuke12.2v5_GEN.bat Voir le fichier

@@ -10,8 +10,8 @@ set NUKE_MINOR=2
10 10
 set NUKE_INSTALL_PATH=C:\Program Files\Nuke%NUKE_VER%
11 11
 
12 12
 :USER
13
-set USER=ms
14
-set NUKE_TEMP_DIR=E:\_CACHE\NUKE
13
+set USER_SHORT=ms
14
+set NUKE_TEMP_DIR=F:\_CACHE\NUKE
15 15
 set RV=c:\mrtn\tools\RV\_versions\_current\bin\
16 16
 :/USER
17 17
 
@@ -31,7 +31,6 @@ set JOB=GEN
31 31
 set PROJECT=%JOB%
32 32
 set PROJECT_ROOT_3D=\\hades\p\_projekte\%JOB%
33 33
 set PROJECT_ROOT_2D=\\calculon\o\_projekte\%JOB%
34
-set FTRACK_API_PYTHONPATH=%PROJECT_ROOT_3D%\000_env\python\keller-ftrack-connect
35 34
 
36 35
 :LICENSE
37 36
 set foundry_LICENSE=4101@192.168.10.25;49172@192.168.10.205;5053@192.168.0.223

+ 14
- 0
README.md Voir le fichier

@@ -54,6 +54,20 @@
54 54
 
55 55
 
56 56
 ##### Changelog:
57
+`2021-07-26`
58
+
59
+`sceneControl: changed USER env to USER_SHORT env`
60
+
61
+`sceneControl: added tooltip for ignore in sceneControl knob`
62
+
63
+`Nuke12.2.v5_GEN.bat: changed USER env to USER_SHORT env`
64
+
65
+`init.py: added FTRACK_API_PYTHONPATH variable that is derived from the project_config.py of kenv.`
66
+
67
+
68
+`__________`
69
+
70
+
57 71
 `2021-07-22 02`
58 72
 
59 73
 `nukeffmpeg: added create vcurrent. Saves a copy of the output file one dir higher and replaces v#### with vcurrent`

+ 7
- 2
init.py Voir le fichier

@@ -19,12 +19,17 @@ except:
19 19
 
20 20
 env = KEnv.create(PROJECT=project, APP_ID='nuke')
21 21
 PYTHON_LIBS_NUKE = env.get('PYTHON_LIBS_NUKE')
22
-
22
+FTRACK_API_PYTHONPATH = env.get('FTRACK_API_PYTHONPATH')
23 23
 # project path
24
+try:
25
+    sys.path.insert(1, FTRACK_API_PYTHONPATH)
26
+except:
27
+    "init.py: cannot find FTRACK_API_PYTHONPATH"
28
+
24 29
 try:
25 30
     sys.path.insert(1, PYTHON_LIBS_NUKE)
26 31
 except:
27
-    "init.py: cannot find project libs path specified"
32
+    "init.py: cannot find PYTHON_LIBS_NUKE"
28 33
 
29 34
 # Paths
30 35
 nuke_path = os.getenv('NUKE_PATH')

+ 8
- 6
pythonpluginsUI/sceneControl/sceneControl.py Voir le fichier

@@ -347,7 +347,7 @@ def createSceneControlUI():
347 347
     # User Short
348 348
     k = nuke.String_Knob('user', 'User')
349 349
     n.addKnob(k)
350
-    k.setTooltip('User Short. Reading Env Variable: USER')
350
+    k.setTooltip('User Short. Reading Env Variable: USER_SHORT')
351 351
     n.knob('user').setValue(user)
352 352
     n.knob('user').clearFlag(nuke.STARTLINE)
353 353
 
@@ -508,7 +508,7 @@ def initSceneControlValues(sceneControl):
508 508
         k['project'].setValue(proj)
509 509
 
510 510
         try:
511
-            k['user'].setValue(checkEnvEntry('USER'))
511
+            k['user'].setValue(checkEnvEntry('USER_SHORT'))
512 512
         except:
513 513
             print('SceneControl: Warning. Please enter your shortname.')
514 514
 
@@ -705,14 +705,14 @@ def kenvQuery(query , **kwargs):
705 705
             print('MINOR_VERSION: ' + str(int(minor_version)))
706 706
         print('ELEMENT: ' + elementstr)
707 707
         print('INFO: ' + infostr)
708
-        print('USER: ' + user)
708
+        print('USER_SHORT: ' + user)
709 709
         print('EXT: ' + ext)
710 710
         print('APP_ID: ' + app_id)
711 711
     # KEnv
712 712
     if minor_version is None:
713
-        result = nuke.kenv.get(query, PROJECT=project, DEPT=dept, SEQUENCE=sequence, SHOT=shot, ELEMENT=element, TASK=task, MAJOR_VERSION=int(major_version), INFO=info, EXT=ext, USER=user, APP_ID=app_id, USE_ENV_PROJECTROOT=useEnv)
713
+        result = nuke.kenv.get(query, PROJECT=project, DEPT=dept, SEQUENCE=sequence, SHOT=shot, ELEMENT=element, TASK=task, MAJOR_VERSION=int(major_version), INFO=info, EXT=ext, USER_SHORT=user, APP_ID=app_id, USE_ENV_PROJECTROOT=useEnv)
714 714
     else:
715
-        result = nuke.kenv.get(query, PROJECT=project, DEPT=dept, SEQUENCE=sequence, SHOT=shot, ELEMENT=element, TASK=task, MAJOR_VERSION=int(major_version), MINOR_VERSION=int(minor_version), INFO=info, EXT=ext, USER=user, APP_ID=app_id, USE_ENV_PROJECTROOT=useEnv)
715
+        result = nuke.kenv.get(query, PROJECT=project, DEPT=dept, SEQUENCE=sequence, SHOT=shot, ELEMENT=element, TASK=task, MAJOR_VERSION=int(major_version), MINOR_VERSION=int(minor_version), INFO=info, EXT=ext, USER_SHORT=user, APP_ID=app_id, USE_ENV_PROJECTROOT=useEnv)
716 716
     if debug:
717 717
         print('SceneControl: Debug kenv query: ' + result)
718 718
     return result
@@ -1146,6 +1146,7 @@ def createCustomWrite(n):
1146 1146
     # ignore
1147 1147
     k = nuke.Boolean_Knob('ignore', 'ignore in sceneControl')
1148 1148
     n.addKnob(k)
1149
+    n.knob('ignore').setTooltip('If enabled sceneControl will NOT change any configuration of this write node such as Filepath, Version etc.')
1149 1150
     n.knob('ignore').setValue(0)
1150 1151
 
1151 1152
     # _______________________________________________________________
@@ -1972,12 +1973,13 @@ def debugQuery():
1972 1973
     print('MINOR_VERSION: ' + str(int(k['minor_version'].value())))
1973 1974
     print('ELEMENT: ' + element)
1974 1975
     print('INFO: ' + info)
1975
-    print('USER: ' + k['user'].value())
1976
+    print('USER_SHORT: ' + k['user'].value())
1976 1977
     print('EXT: exr')
1977 1978
     print('APP_ID: nuke')
1978 1979
     return
1979 1980
 
1980 1981
 
1982
+
1981 1983
 # deprecated
1982 1984
 def load_precomp():
1983 1985
     major = nuke.thisNode().knob("major_version").getValue()

Loading…
Annuler
Enregistrer