Hi,
I written custom submitter for 3ds Max a while back that basically automated fetching SG data without user needing to manually choose task etc. But with newest deadline what I did doesn’t work anymore.
I basically setup all those SMTDSettings as I did before, but with Deadline 9 it’s not doing the trick. I see in SMTDFunctions that bug chunks of code that dealt with those are gone. They are no longer present as ExtraInfo0 to ExtraInfo5.
Example of my code, as you can see I also added some custom variables like “FinalNoise” or “Final_MPP” there for post jobs, those are not coming through as well:
if add_to_shotgun == true do(
--shotgun settings section
SMTDSettings.SGProject = SG_project_name
SMTDSettings.SGTask = SG_task_name
SMTDSettings.SGCreateMovie = True
SMTDSettings.SGCreateFilmStrip = True
SMTDSettings.SGVersion = SG_Version
SMTDSettings.SGEntity = SG_entity_name
SMTDSettings.SGUpdate = true
SMTDSettings.SGUser = SG_username
SMTDSettings.SGDisplayInfo = #("User Name: "+SG_username, "Task Name: "+SG_task_name, "Project Name: "+SG_project_name, "Entity Name: "+SG_entity_name, "DraftTemplate: ")
SMTDSettings.SGJobSettings = #("VersionName="+SG_Version, "Description=", "UserName="+SG_username, "TaskName="+SG_task_name, "ProjectName="+SG_project_name, "EntityName="+SG_entity_name, "TaskId="+(SG_task_id as string), "ProjectId="+(SG_project_id as string), "EntityId="+SG_entity_id, "EntityType="+SG_entity_type, "DraftTemplate=", "FinalNoise="+(old_noise_value as string),"Final_MPP="+(old_max_PP as string))
)
There are no draft jobs after completion and nothing is pushed to Shotgun.
Is that a bug or there different practice now? Should I submit job differently now?
Best,
So I basically rewrote a bit of my submitter and it now adds those parameters to the submit info file right after it’s generated by the SMTDFunctions.
It works well now.
Hi,
In Deadline 9.0 onwards, all Draft & “Pipeline Tools” (NIM, Shotgun, FTrack) have been consolidated to one set of Python scripts via DeadlineCommand. If you are using the latest SMTD version, you should see a new button at the bottom of SMTD called: “Pipeline Tools”, which is the new entry point for all things Project Mgmt based. Thee settings are all remembered between sessions. As a result, all the previous Shotgun (Proj Mgmt) code has been removed from SMTD. If you have a custom submitter, you could still ‘hang off’ off our new revamped code via the “Pipeline Tools” button. The great thing here, is if you or us need to update or enhance anything Draft/Proj Mgmt related in the future, you modify in one place and it will work across all plugins/scripts/events in Deadline.
This is actually very good change. I really like it. I did figure out how it’s done after going through the submitter code and it was quite easy to adapt. On my end I fetch Shotgun data automatically without user input
There were some issues with pipeline button inside 3ds Max submitter though.
At first it was showing error messages about Shotgun API not present, which wasn’t true as ‘integration test tool’ inside Monitor worked well. Next when I tried running it again, no window showed up, no error either. So I look through the code, checked what command was being run from MaxScript and tried running it manually inside cmd.exe. I got message that the target file is in use / locked by other process, so I changed a little bit of code in the submitter in a way that it outputs data to different file every time to test if it helps ( dabarti.com/screens/s7d8d4ac … f383ev.png )… This worked.
My guess is that the first crash, when happened there was filestream in MaxScript that wasn’t closed correctly.
Anyway, this may be useless bit of information but I thought I will share it anyway … Maybe it’s some kind of bug.
Best,
Tomasz
Thanks for the feedback. Have logged for further investigation.
Ditto, this seems like a good change.
I’m still having some minor issues with shotgun. All the extra info for the job is created correctly. In shotgun I see newly created versions etc, but while uploading filmstrips and movies to shotgun works well with the After Effects for example, it doesn’t work with 3ds Max jobs.
Draft post jobs are running fine, outputs are created, but it doesn’t upload them.
In the log (OnJobSubmitted) I se some kind of error:
2017-03-06 10:40:04: INFO: Importing Shotgun API from 'C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z'...
2017-03-06 10:40:05: INFO: An error occurred while trying to connect to Shotgun:
2017-03-06 10:40:05: INFO: Traceback (most recent call last):
2017-03-06 10:40:05: File "none", line 67, in ConfigureShotgun
2017-03-06 10:40:05: File "C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z\shotgun_api3\__init__.py", line 1, in <module>
2017-03-06 10:40:05: from shotgun import (Shotgun, ShotgunError, ShotgunFileDownloadError, Fault,
2017-03-06 10:40:05: File "C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z\shotgun_api3\shotgun.py", line 53, in <module>
2017-03-06 10:40:05: from sg_26 import *
2017-03-06 10:40:05: File "C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z\shotgun_api3\sg_26.py", line 5, in <module>
2017-03-06 10:40:05: from .lib.httplib2 import Http, ProxyInfo, socks, SSLHandshakeError
2017-03-06 10:40:05: File "C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z\shotgun_api3\lib\httplib2\__init__.py", line 59, in <module>
2017-03-06 10:40:05: from httplib2 import socks
2017-03-06 10:40:05: File "C:\Users\DAB-I7-03-2\AppData\Local\Thinkbox\Deadline9\pythonAPIs\2017-03-02T170358.0000000Z\httplib2\__init__.py", line 930, in <module>
2017-03-06 10:40:05: class HTTPSConnectionWithTimeout(httplib.HTTPSConnection):
2017-03-06 10:40:05: AttributeError: 'module' object has no attribute 'HTTPSConnection'
I’m looking at what I’m doing wrong, but maybe in the meantime there is known solution?
When I use pipeline tools and deadline 3ds max submitter, there is no error like this but it doesn’t work correctly either. It creates the version but doesn’t create and upload Draft movies / filmstrips.
For some reason this job doesn’t have values Draft_CreateSGFilmstrip=True and Draft_CreateSGMovie=True
dabarti.com/screens/s0940131 … 5f707c.png
Which is strange as 3dsmaxIntegrationSettings file contains all the info:
ExtraInfo0=Comp
ExtraInfo1=STOCK
ExtraInfo2=SH_0030_Drums_v2
ExtraInfo3=${jobname}
ExtraInfo4=
ExtraInfo5=tomasz
ExtraInfoKeyValue0=UserName=tomasz
ExtraInfoKeyValue1=Description=
ExtraInfoKeyValue2=ProjectName=STOCK
ExtraInfoKeyValue3=EntityName=SH_0030_Drums_v2
ExtraInfoKeyValue4=EntityType=Shot
ExtraInfoKeyValue5=VersionName=${jobname}
ExtraInfoKeyValue6=ProjectId=74
ExtraInfoKeyValue7=TaskId=2298
ExtraInfoKeyValue8=TaskName=Comp
ExtraInfoKeyValue9=EntityId=1223
ExtraInfoKeyValue10=Draft_CreateSGMovie=True
ExtraInfoKeyValue11=Draft_CreateSGFilmstrip=True
When I resubmit the job from Monitor, it works well, only when the job is submitted from SMTD it causes issues.
Shotgun api from deadline somehow colliding with shotgun api from shotgun 3ds Max integration ?
I’m trying to fix that on my end with no luck so far.
I’m really lost here. Should I do something special with custom submitter in order to make it work.
Strangely when the job is first added it generates those OnJobSubmitted errors, but if I resubmit it with monitor, it works flawlessly.
For the first error, re: http/SSL, can you confirm the exact version of Deadline 9.0 you are using and exact version of Shotgun Python API you have running locally in 3dsMax. To eliminate a number of things, if you can update all these things to the latest that would help expedite this issue.
For the 2nd issue, we are not sure why this is not working for you. This is possibly related to the https/SSL library failure, so it fails to upload the movie to Shotgun.
I suspect 3ds Max might be holding in memory the Shotgun py libraries and your current versions in use are older than what we are using; or something like that.
Thanks Owen for the pointers ! I managed to fix it, though updating shotgun etc didn’t help. I started digging deeper, and added some additional debugging code to events\shotgun\shotgun.py and it turned out that when it didn’t work, sys.path contained 2 additional paths:
'G:\\SG\\STOCK_config\\install\\app_store\\tk-3dsmaxplus\\v0.3.0\\resources\\ssl_fix', 'G:\\SG\\STOCK_config\\install\\core\\python'
The second one contains API for Shotgun apps etc. This caused “import shotgun_api3.shotgun” to fail. Not sure why exactly… if it finds modules named shotgun_api3 in multiple locations, python fails to import any of them ?
Anyway… I did dirty fix and added this code to events\shotgun\shotgun.py :
[code] try:
sys.path.remove(‘G:\SG\STOCK_config\install\core\python’)
except:
self.LogInfo(“No path”)
try:
sys.path.remove('G:\\SG\\STOCK_config\\install\\app_store\\tk-3dsmaxplus\\v0.3.0\\resources\\ssl_fix')
except:
self.LogInfo("No path")[/code]
That helped. It now works correctly, but is there more elegant way of solving it ?
Best,
Tomasz