Jump to content

Lorenzo Angeli

Administrators
  • Posts

    331
  • Joined

  • Last visited

  • Days Won

    32

Posts posted by Lorenzo Angeli

  1. Hi @TeJa TJ

    to see when  a custom attribute has been last changed you can query the Event entities as such:
     

    custom_attribute_events = session.query(select insert, parent_id from Event where insert is "update.custom_attribute" and parent_id is "<your-task-id>").all()

    this will return an Event object which will hold the timestamp on the created_at field and the previous and current value under the data field

    hope it helps.
    L.

  2. Hi @Brad Falk following up here from the internal ticket as the solution might be interesting to others.

    If you want to customise the nuke studio output folder, the best option is to provide a custom template which include the entity you are missing (the folder in this case).
    An example template could be (please note the first {_:(FD|fd)}{Folder:\w+} which resolves the folders)

            {
                'name': 'Custom with folders',
                'description': (
                    'Match and output desired structures with folders'
                    'Example: FDSOME_SQ001_SH010 will be matched as Folder with Name SOME , Sequence with name '
                    '001 and a Shot named 010.'
                ),
                'expression': '{_:(FD|fd)}{Folder:\w+}{_:.+(SQ|sq)}{Sequence:\w+}{_:.+(SH|sh)}{Shot:\w+}'
            }      


    The best way to test if the template is correct is to simply check with the underlying template engine with the following code: 
     

    import lucidity
     
    string = 'FDNAME_SQ001_SH411'
    template = '{_:(FD|fd)}{Folder:\w+}{_:.+(SQ|sq)}{Sequence:\w+}{_:.+(SH|sh)}{Shot:\w+}'
    luc_tmpl = lucidity.template.Template('Custom with folders', template, anchor=None)
    print(luc_tmpl.parse(string))

    Once the template is added to the nuke studio context_template_hook.py 
    (note, in the installed plugin will be available under : C:\Users\<user>\AppData\Local\ftrack\ftrack-connect-plugins\ftrack-connect-nuke-studio-2.5.1\application_hook)

    Just restart Nuke Studio, and at export time, select the new custom template and continue the export as usual.

    The result structure should be similar to the image attached.


    Hope it helps.
    L.



     

     

    FolderStructureNukeStudio.PNG

  3. Hi @Evan Hale if the location is found in connect, but not in the integration, is likely you are just registering just to the configure-location.
    Please try to add these lines too and see if does work:

       api_object.event_hub.subscribe(
            'topic=ftrack.connect.application.launch',
            modify_application_launch
        )
    
        # Location will be available from actions
        api_object.event_hub.subscribe(
            'topic=ftrack.action.launch',
            modify_application_launch
        )

    subscribing to these events should nake the location within the integrations too.
    here the location where this snippet has been taken from, so you have full reference

    Hope it helps
    L.

     

  4. Hi @Brad

    as you have found out already , ftrack connect provides a default local path for plugins to be installed into, which is defined through the appdir module.
    There are ways though to override that path without having to touch the source code of connect.
    The easier and most suggested is to override the FTRACK_CONNECT_PLUGIN_PATH (for connect plugins) and FTRACK_EVENT_PLUGIN_PATH (for api hooks).

    These environment are used usually to centralise the plugins across the studio so won't have to live on local user's machines.
    You can find more information on the connect documentation as well as on the api one.

    If you want more informations or you have further issues, please feel free to open a ticket with support !
    Hope it helps.

    L.
     

  5. HI @Evan Hale
    could you please post or send to support the code you are running ?

    The follwing snippet seems to return the availablity correctly:

    component = session.query('SequenceComponent').first()
    location = session.pick_location()
    location.get_component_availability(component )
    >> 0.0

    hope it helps.

    P.s
    Looking back at the code , the call thatreturns a dictionary is on the component and not on the location:

     

    component.get_availability()
    >> {'5929f24c-b015-4d48-b533-e0008fc5dd14': 0.0, '80dd99a3-1....'}

    This is because is returning the availablity for all the locations

    you can find the location avilability passing the location itself into the method:

    component.get_availability([location])
    >> {'5929f24c-b015-4d48-b533-e0008fc5dd14': 0.0}


    we'll have a look at updating the docs where needed.
    Thanks for reporting.

    L.

  6. Hi @YuChen

    ftrack_api refers to the latest ftrack python api, where ftrack refers to the legaci api which are deprecated by now (were supporting python2 only)
    hence finding the same classes (namely) on both.

    please use only :

    import ftrack_api.structure.Structure.base.Structure
    import ftrack_api.resource_identifier_transformer.base.ResourceIdentifierTransformer

    if you have any code still using:

    import ftrack

    worth looking into updating it to new api as you are likely to start finding issues , like SSL connections and such.

    hope it helps.
    L.

×
×
  • Create New...