Mike

Members
  • Content Count

    134
  • Joined

  • Last visited

  • Days Won

    4

Mike last won the day on July 14 2016

Mike had the most liked content!

About Mike

  • Rank
    ftrack ninja

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

1,148 profile views
  1. @Lorenzo AngeliThank you! I'll give this a shot. When you say "install separately" do you mean like clone the Lucidity repo and install it to a folder within a dependencies directory? I'm currently just installing Lucidity to my virtual environment from PyPi. Just to clarify: I always thought that any package I installed into my Python project's virtual environment through `pip install "package"`would be accessible to launched software, but I guess that's not the case?
  2. I'm trying to update my custom application hooks to work with the latest connect and ftrack python api and I'm starting with Maya. I'm running into an issue where Maya isn't picking up my custom virtual environment modules. At the moment I'm only aware of the inability to find Lucidity module because it's being used to generate my publish paths. My custom Maya tools fail to launch when the "Can't find import module: lucidity" error occrues. I didn't have this issue in previous versions. One thing to note though is that Connect is able to find them because I'm able to launch my custom Actions that use Lucidity from the web app. Here's my Maya application launcher: class ApplicationLauncher(ftrack_connect.application.ApplicationLauncher): """Custom launcher to modify environment before launch.""" def __init__(self, application_store): '''.''' super(ApplicationLauncher, self).__init__(application_store) def _getApplicationEnvironment( self, application, context=None ): """Override to modify environment before launch.""" # Make sure to call super to retrieve original environment # which contains the selection and ftrack API. environment = super( ApplicationLauncher, self )._getApplicationEnvironment(application, context) environment['SOFTWARE'] = 'maya' environment['WORKING_DIR'] = 'scenes' environment['APP_VER'] = application['version'] # Append or Prepend values to the environment. # Note that if you assign manually you will overwrite any # existing values on that variable. self.logger.info(u'context selection : %s' % context['selection'][0]) # entity = context['selection'][0] task = ftrack.Task(entity['entityId']) self.logger.info(u'Task : %s' % task) self.logger.info(u'Task keys : %s' % task.keys()) taskParent = task.getParent() taskObjectType = taskParent.getObjectType() self.logger.info(u'Task parent : %s' % taskParent) self.logger.info(u'Task parent object type : %s' % taskObjectType) sequence = taskParent.getParent() episode = sequence.getParent() # Give different env variables depending on if sel is task or shot if task.getObjectType() == 'Task': environment['CONTEXT_TYPE'] = 'task' try: environment['FS'] = str(int(taskParent.getFrameStart())) except Exception: environment['FS'] = '1' try: environment['FE'] = str(int(taskParent.getFrameEnd())) except Exception: environment['FE'] = '1' environment['FTRACK_TASKID'] = task.getId() # Check task parents until they're a Shot or Asset Build. # This allows us to ignore folders. while taskParent.getObjectType() not in ['Shot', 'Asset Build']: taskParent = taskParent.getParent() environment['FTRACK_SHOTID'] = taskParent.getId() # If the shot doesn't belong to an asset build, # get its sequence. if not taskParent.getObjectType() == 'Asset Build': while sequence.getObjectType() != 'Sequence': sequence = sequence.getParent() environment['FTRACK_SEQID'] = sequence.getId() # If the task doesn't belong to an asset build, # get its episode. while episode.getObjectType() != 'Episode': episode = episode.getParent() environment['FTRACK_EPID'] = episode.getId() elif task.getObjectType() == 'Shot': environment['CONTEXT_TYPE'] = 'shot' try: environment['FS'] = str(int(task.getFrameStart())) except Exception: environment['FS'] = '1' try: environment['FE'] = str(int(task.getFrameEnd())) except Exception: environment['FE'] = '20' environment['FTRACK_SHOTID'] = task.getId() while taskParent.getObjectType() != 'Sequence': taskParent = taskParent.getParent() environment['FTRACK_SEQID'] = taskParent.getId() while episode.getObjectType() != 'Episode': episode = episode.getParent() environment['FTRACK_EPID'] = episode.getId() elif task.getObjectType() == 'Asset Build': environment['CONTEXT_TYPE'] = 'asset_build' try: environment['FS'] = str(int(task.getFrameStart())) except Exception: environment['FS'] = '1' try: environment['FE'] = str(int(task.getFrameEnd())) except Exception: environment['FE'] = '20' environment['FTRACK_SHOTID'] = task.getId() while episode.getObjectType() != 'Episode': episode = episode.getParent() environment['FTRACK_EPID'] = episode.getId() # Set envs environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_SCRIPTS_PATH'), 'MAYA_SCRIPT_PATH', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_PLUGINS_PATH').replace('MAYA_VER', str(application['version'])), 'MAYA_PLUG_IN_PATH', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_SCRIPTS_PATH'), 'PYTHONPATH', environment ) # Company environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_MODULE_PATH').replace('MAYA_VER', str(application['version'])), 'MAYA_MODULE_PATH', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_RENDER_DESC_PATH').replace('MAYA_VER', str(application['version'])), 'MAYA_RENDER_DESC_PATH', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_MAYA_SHELF_PATH'), 'MAYA_SHELF_PATH', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_SOLIDANGLE_LICENSE'), 'SOLIDANGLE_LICENSE', environment ) environment = ftrack_connect.application.appendPath( os.getenv('_XBMLANGPATH'), 'XBMLANGPATH', environment ) environment['QT_PREFERRED_BINDING'] = 'PySide2' # Always return the environment at the end. return environment
  3. I was able to get ftrack running with a few updates to my env variables did the trick, but I'm pretty stumped on how to proceed with this new issue that I'm making in a different thread for.
  4. Sorry for the delay, got pulled away from this for a bit. I did some digging and found that some of my ftrack env variables point to paths that no longer exist due to the updated connect folder structure. I'll make some changes and will let you know how it goes.
  5. Hello! I'm running into this error as well, but it's not consistent. When I open Maya I don't get any errors and a connection is successfully made to the servers. When I open Houdini I'm getting this: Traceback (most recent call last): File "", line 11, in File "D:\Git_Stuff\mb-armada\modules\mb_shipyard\mb_marina_major_minor\main_mmm.py", line 8, in ftrack_data = query_ftrack_data.query_data() File "D:\Git_Stuff\mb-armada\modules\mb_shipyard\mb_marina_major_minor\packages\mmm_api\query_ftrack_data.py", line 24, in query_data session = ftrack_api.Session() File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\common.zip\ftrack_api\session.py", line 254, in __init__ self._discover_plugins(plugin_arguments=plugin_arguments) File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\common.zip\ftrack_api\session.py", line 1328, in _discover_plugins self._plugin_paths, [self], plugin_arguments File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\common.zip\ftrack_api\plugin.py", line 120, in discover **selected_keyword_arguments File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\resource\hook\ftrack_location_compatibility\register_proxy_location.py", line 78, in register ftrack.EVENT_HUB.connect() File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\common.zip\ftrack_location_compatibility\_monkey_patch.py", line 21, in connect return ftrack.EVENT_HUB._connect() File "D:\Git_Stuff\mb-armada\modules\dependencies\ftrack_connect\common.zip\FTrackCore\api\event\hub.py", line 163, in connect .format(self.getServerUrl()) EventHubConnectionError: Failed to connect to event server at https://firstborn.ftrackapp.com. I've been using the line below to build my pane tab in a custom 123.py script. hdefereval.executeDeferred(lambda: make_panel()) I'm guessing the issue has something to do with when the panel is being built because when I create the python panel again by going to New Pane Tab Type> Python Panel> mb_MMM it queries the ftrack servers successfully and correctly builds the panel tab. I should mention that I'm still on connect 0.7.6. Will updating to 1.0.1 solve this problem? I've tried updating before and ran into some different issues which are preventing me from properly testing. So I'm hesitant to move on while some bugs are still prevalent in this version of my pipeline.
  6. Thanks, Mattias. Getting back into this. I'm not sure that the configure_locations function is being called. Do I need to subscribe to a different event? I don't see "configure-location" in the docs for the new API.
  7. What if we want to implement renaming? A lot of our projects require us to rename assets, shots, and even sometimes the project name itself. Has anyone implemented a workflow with renaming capabilities or does one already exist in ftrack?
  8. I just want to clarify that I'd like the sticky to be stickied for everyone, not just the user who stickied it. But it would be nice to have stickies only visible to you as well. You could share private stickies between people by tagging someone in the sticky (basically creating private threads). A checkbox would allow you to see all stickies or just your own (you can use the current filter by author to narrow down sticky visibility as well)
  9. I'm using a task's note section to link to an external OneNote notebook where artists and developers can keep detailed track of an asset. It would be great if I could sticky that note to the top of the notes list
  10. Mike

    Location Setup

    This is great, thanks a lot, Lucas!
  11. Mike

    Location Setup

    Good to know that I'm understanding it haha. So how would I go about doing this? I'm looking at the source code and I see base, disk, and server accessors. Could I use the server module as a starting point and the disk accessor as a reference and eventually get some results? What I mean is, is there enough here in the source code that I could eventually figure this out with minimal guidance? Also, in terms of how to transfer files over the internet, where should I start? Like are there libraries, tutorials, example programs/codes that do this already so I can start to breakdown the process and see exactly what I need? Thanks
  12. Mike

    Location Setup

    Hi Lucas, After getting back into locations and taking a look at the docs again, i think accessors are starting to make sense to me. A few questions/comments just to clarify: So ftrack comes with a disk accessor. In my location plugin I've setup my work and home locations with disk accessors. By doing that am I basically telling ftrack that the locations are local? If I want to transfer files over the internet do I need to set my home location to use a disk accessor and my work location to use an internet accessor? (or whatever the accessor would be called) Once those are set, I can use target_location.add_component(component, source=source_location) to easily transfer a file between the two? (as long as both locations are available)
  13. Mike

    Location Setup

    I have a little time right now, so I'm revisiting locations with the new api. I think I have it sort of working. I have a quick question, does ftrack have file transfering across locations built in, or is that up to the developer to create? For example I'm able to see the my current location (home) and the main studio location (work) from the maya import plugin. If i'm at work and I have some files on my home computer, I'm expecting that when I hit transfer in the maya import plugin that it will move the file from my home to computer to my work computer. This is never the case though. Instead the plugin is just creating the file directory on my local drive with my work's file structure prefix. Basically, does ftrack have a builtin ability to transfer files over the internet? Current location plugin:
  14. I think I discovered the problem. When I updated my master version of ftrack connect it looks like some of the modules were gitignored (it's a pesky problem). So they weren't available on my release directory, but I had them in my dev directory. I'll verify this tomorrow.