get the assigned task id from a shot

Discussions related to dailies and edit review tools and notes.
Post Reply
tib31
Posts: 7
Joined: June 7th, 2018, 12:03 pm

get the assigned task id from a shot

Post by tib31 » June 27th, 2018, 2:48 pm

hello everyone ,

i'm trying to automatically upload a dailies to NIM using Royal Render .

Well i think i'm almost there ,using the example available at the begining of the NIM API, in a post script nuke .

But i can't find the right TaskID , i mean when i read the task id in my nuke file it's always the same id .
i think this is because it's the ID of the main COMP task and not the ID of the task i'm assigning later on the shot .

So , my question is , is there any callback from the nim_api.py which will give me the different ID of the assigned tasks of a shot ?

thanks .

quang.tran
Posts: 62
Joined: October 4th, 2017, 3:12 pm

Re: get the assigned task id from a shot

Post by quang.tran » June 28th, 2018, 9:24 am

Nice! We're also using Royal Render as render manager. Perhaps you wanna share it?

tib31
Posts: 7
Joined: June 7th, 2018, 12:03 pm

Re: get the assigned task id from a shot

Post by tib31 » June 29th, 2018, 11:54 am

sure , if i figure out how to find the right task ID .

User avatar
andrew
Site Admin
Posts: 267
Joined: June 24th, 2014, 8:10 am

Re: get the assigned task id from a shot

Post by andrew » July 2nd, 2018, 5:25 pm

Hi,

Files are linked to shots and assets, not the users assigned task so you'll need to retrieve that value. To select an assigned task for the user you'll need to query the API for all tasks on the given shot or asset ID using get_taskInfo(). For example:

get_taskInfo(itemClass="shot", itemID=myShotID)

The user will need to select their task, or auto select based on userID and taskType. Then use the resulting taskID to upload the daily.

Hopefully that points you in the right direction.

Cheers,
Andrew

tib31
Posts: 7
Joined: June 7th, 2018, 12:03 pm

Re: get the assigned task id from a shot

Post by tib31 » July 5th, 2018, 2:11 pm

thanks Andrew ,

working perfectly , i finally manage to make this RRender postscript upload a dailies automatically .

but is there a way to change the way the dailies are compressed ?

@ quang.tran

here 's my process to upload the dailies automatically

- i've create a nuke RRender postcript ( http://www.royalrender.de/help8/ search for nuke post-script )
- add and tweak the example available in the nim_api.py to my nuke postscript in the scene python tab , onScriptClose input .

# EXAMPLE:
# Adding a render to a task
# uploading an icon to the render
# uploading dialies to a render
# adding elements to a render
#
# import nim_core.nim_api as nimAPI
# result = nimAPI.add_render(taskID=14941, renderName='myRender')
# if result['success'] == 'true':
# nimAPI.upload_renderIcon(renderID=result['ID'],img='/path/to/icon.jpeg')
# nimAPI.upload_dailies(renderID=result['ID'],path='/path/to/movie/myImages.mov')
# nimAPI.add_element( parent='render', parentID=result['ID'], path='/path/to/frames', name='myImage.####.exr', \
# startFrame=1, endFrame=128, handles=12, isPublished=False )
# nimAPI.add_element( parent='render', parentID=result['ID'], path='/path/to/frames', name='myImage_matte.####.exr', \
# startFrame=1, endFrame=128, handles=12, isPublished=False )

when i say tweak i mean add the correct path to the movie and add the correct TaskID.
the only problem i had to make it work was to assign the dailies to the right task ( thx again Andrew ) .

User avatar
andrew
Site Admin
Posts: 267
Joined: June 24th, 2014, 8:10 am

Re: get the assigned task id from a shot

Post by andrew » July 5th, 2018, 5:04 pm

Hi,

The uploaded dailies will always be transcoded to h264/x264 to be HTML5 compatible if they aren't already in that format. You can set the max resolution allowed by NIM in Admin menu. If a movie being uploaded is below the max resolution and already in the proper format then no conversion will take place. You can also enable the webm and ogv transcodes if needed.

We do not have a setting to adjust the compression level for the created h264 that is exposed to the UI, however if you pre-encode the movie being uploaded as an h264 then NIM will not perform further conversion. For comparison when using Deadline, we opt to have Draft create the movies with the desired encoding so that the NIM VM is not handling the conversion. This takes a processing load off the VM and you can specifically dictate how your movies are made.

Thanks,
Andrew

quang.tran
Posts: 62
Joined: October 4th, 2017, 3:12 pm

Re: get the assigned task id from a shot

Post by quang.tran » October 19th, 2018, 9:12 am

Thanks, tib31!

Post Reply