Browse 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 3 years ago
parent
commit
5a0c6eac2a
4 changed files with 31 additions and 11 deletions
  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 View File

10
 set NUKE_INSTALL_PATH=C:\Program Files\Nuke%NUKE_VER%
10
 set NUKE_INSTALL_PATH=C:\Program Files\Nuke%NUKE_VER%
11
 
11
 
12
 :USER
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
 set RV=c:\mrtn\tools\RV\_versions\_current\bin\
15
 set RV=c:\mrtn\tools\RV\_versions\_current\bin\
16
 :/USER
16
 :/USER
17
 
17
 
31
 set PROJECT=%JOB%
31
 set PROJECT=%JOB%
32
 set PROJECT_ROOT_3D=\\hades\p\_projekte\%JOB%
32
 set PROJECT_ROOT_3D=\\hades\p\_projekte\%JOB%
33
 set PROJECT_ROOT_2D=\\calculon\o\_projekte\%JOB%
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
 :LICENSE
35
 :LICENSE
37
 set foundry_LICENSE=4101@192.168.10.25;49172@192.168.10.205;5053@192.168.0.223
36
 set foundry_LICENSE=4101@192.168.10.25;49172@192.168.10.205;5053@192.168.0.223

+ 14
- 0
README.md View File

54
 
54
 
55
 
55
 
56
 ##### Changelog:
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
 `2021-07-22 02`
71
 `2021-07-22 02`
58
 
72
 
59
 `nukeffmpeg: added create vcurrent. Saves a copy of the output file one dir higher and replaces v#### with vcurrent`
73
 `nukeffmpeg: added create vcurrent. Saves a copy of the output file one dir higher and replaces v#### with vcurrent`

+ 7
- 2
init.py View File

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

+ 8
- 6
pythonpluginsUI/sceneControl/sceneControl.py View File

347
     # User Short
347
     # User Short
348
     k = nuke.String_Knob('user', 'User')
348
     k = nuke.String_Knob('user', 'User')
349
     n.addKnob(k)
349
     n.addKnob(k)
350
-    k.setTooltip('User Short. Reading Env Variable: USER')
350
+    k.setTooltip('User Short. Reading Env Variable: USER_SHORT')
351
     n.knob('user').setValue(user)
351
     n.knob('user').setValue(user)
352
     n.knob('user').clearFlag(nuke.STARTLINE)
352
     n.knob('user').clearFlag(nuke.STARTLINE)
353
 
353
 
508
         k['project'].setValue(proj)
508
         k['project'].setValue(proj)
509
 
509
 
510
         try:
510
         try:
511
-            k['user'].setValue(checkEnvEntry('USER'))
511
+            k['user'].setValue(checkEnvEntry('USER_SHORT'))
512
         except:
512
         except:
513
             print('SceneControl: Warning. Please enter your shortname.')
513
             print('SceneControl: Warning. Please enter your shortname.')
514
 
514
 
705
             print('MINOR_VERSION: ' + str(int(minor_version)))
705
             print('MINOR_VERSION: ' + str(int(minor_version)))
706
         print('ELEMENT: ' + elementstr)
706
         print('ELEMENT: ' + elementstr)
707
         print('INFO: ' + infostr)
707
         print('INFO: ' + infostr)
708
-        print('USER: ' + user)
708
+        print('USER_SHORT: ' + user)
709
         print('EXT: ' + ext)
709
         print('EXT: ' + ext)
710
         print('APP_ID: ' + app_id)
710
         print('APP_ID: ' + app_id)
711
     # KEnv
711
     # KEnv
712
     if minor_version is None:
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
     else:
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
     if debug:
716
     if debug:
717
         print('SceneControl: Debug kenv query: ' + result)
717
         print('SceneControl: Debug kenv query: ' + result)
718
     return result
718
     return result
1146
     # ignore
1146
     # ignore
1147
     k = nuke.Boolean_Knob('ignore', 'ignore in sceneControl')
1147
     k = nuke.Boolean_Knob('ignore', 'ignore in sceneControl')
1148
     n.addKnob(k)
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
     n.knob('ignore').setValue(0)
1150
     n.knob('ignore').setValue(0)
1150
 
1151
 
1151
     # _______________________________________________________________
1152
     # _______________________________________________________________
1972
     print('MINOR_VERSION: ' + str(int(k['minor_version'].value())))
1973
     print('MINOR_VERSION: ' + str(int(k['minor_version'].value())))
1973
     print('ELEMENT: ' + element)
1974
     print('ELEMENT: ' + element)
1974
     print('INFO: ' + info)
1975
     print('INFO: ' + info)
1975
-    print('USER: ' + k['user'].value())
1976
+    print('USER_SHORT: ' + k['user'].value())
1976
     print('EXT: exr')
1977
     print('EXT: exr')
1977
     print('APP_ID: nuke')
1978
     print('APP_ID: nuke')
1978
     return
1979
     return
1979
 
1980
 
1980
 
1981
 
1982
+
1981
 # deprecated
1983
 # deprecated
1982
 def load_precomp():
1984
 def load_precomp():
1983
     major = nuke.thisNode().knob("major_version").getValue()
1985
     major = nuke.thisNode().knob("major_version").getValue()

Loading…
Cancel
Save