eight

Members
  • Content Count

    50
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by eight

  1. You make some good points. I'm using threads for the API calls so that it won't freeze the UI, but I often get errors because of it. So thread safety would also be really good to have. The error I almost always get is: TypeError: 'Symbol' object has no attribute '__getitem__' I'm not exactly sure what this means, but it seems like the dynamic entity is not finished being constructed.
  2. Hi, I'd like to make a feature request for an asynchronous API. I'm using the new API and liking it so far, but I was disappointed that all network functions are still blocking like the old API. Most network APIs I have used require a callback as a parameter, so that the application is not left hanging, waiting for the result. Even better are the network APIs that use coroutines to wait for network calls such as Tornado. If this feature was added to the API it would make my day. Thanks for reading.
  3. Thanks for replying. I just sent an email to support.
  4. OK. I've got the answer. This is how I did it: First I query the user, then I use their ID to get all of their tasks. user = session.query('User where username is {}'.format(name)).one() tasks = session.query('Task where assignments any (resource_id={})'.format(user['id']))
  5. I second this. I tried 'Task where assignments any (resource.username=name)' but I got the error:
  6. Hi, I'm starting to use the new API, but I keep getting warnings like this: I followed the url in the warning message, but in this case, it's not very helpful in fixing the issue. I tried installing pyOpenSSL, but that didn't work. I would prefer not to ignore these warnings since the documentation says it's "strongly discouraged".
  7. Thanks. I'll go ahead with your suggestion.
  8. Is it possible to recreate the default Piggy Bank project and VFX Schema? I want to be able to revive these as a basis to build off of in case they get changed.
  9. eight

    Problem Deleting Asset

    Well, I figured it out. Seems that if I delete all of the AssetVersions attached to the Asset before I delete the Asset, it goes away. But if I don't delete the AssetVersions first, it seems to get stuck to the Shot.
  10. eight

    Problem Deleting Asset

    Hello, I'm getting unexpected behavior when I try to delete an Asset with the API. If I delete an Asset on a Task, then list the parent shot's Assets, then that asset is still there. Here's an example I just came up with: taskAssets = task.getAssets()taskAssets[0].delete()shot = task.getParent()shotAssets = shot.getAssets()shotAssets will still have the asset I deleted. Even if I run this several times, the assets I'm trying to delete are still attached to the shot.
  11. eight

    Batch Calls

    It's hard to say exactly what I need to batch because it could be anything. But right now, I'm trying to get a bunch of info for several Tasks, as well as their Assets, Versions, and Components. I guess I was looking for something like the get method, but being able to put in *args. I don't know how it would work if you wanted to get child object properties as part of the batch though. Something like this made-up code: task.get(getTaskCallback, 'name', 'parents', 'thumbnail', 'status', 'assets')def getTaskCallback(data): taskUi.name = data['name'] taskUi.parents = data['parents'] taskUi.thumbnail = data['thumbnail'] taskUi.status = data['status'] for asset in data['assets']: asset.get(getAssetCallback, 'name', 'versions')def getAssetCallback(data): taskUi.addAsset(data) # etc etcI feel it would be better without having to chain so many callbacks, but I couldn't think of an elegant way to do it. Anyway, I'm looking forward to the new API.
  12. eight

    Batch Calls

    Is it possible to make batch calls with the API? Making a lot of API calls tends to freeze the program, so I've had to go multithreaded. Using multiple threads doesn't seem like the right way to go for something that's just waiting on network calls. So I feel like it would be more appropriate to use some kind of batch network call if there's one available. I just couldn't find anything like it in the documentation.
  13. eight

    Available Tasks

    Okay, thanks for doing that.
  14. eight

    Available Tasks

    Your suggestion does remove tasks that aren't assigned to the user in the planning stage, but I still have the issue of getting Task Types that aren't assigned to the user in Planning. For some reason there is no Phase.getTaskTypes() method from what I can see. I still get 'Hair' type tasks when I'm not assigned to them.
  15. eight

    Available Tasks

    Sorry, took me a while to respond. Thank you for the example. However, my results are different than what appears in 'My Tasks' in the browser. For example, a Task with a 'Hair' type will show up for the ftrack API, but not for the web interface. This is because I'm not assigned to the 'Hair' task type in the Planning section. I don't know how to check if I'm assigned to the proper Task Types.
  16. eight

    Available Tasks

    I still haven't found a way to filter Available Tasks because I keep hitting dead ends. It's including things like Milestones, but they're returned as Task objects. If it's not too much to ask, could you provide an example?
  17. eight

    Available Tasks

    Okay, good to know. I was looking into the Phase class and it doesn't seem to have any way of accessing the TaskTypes which I'll need to filter available tasks.
  18. eight

    Available Tasks

    Hello, What's the best way to get available tasks? I can search for tasks with an empty user list + NOT_STARTED state, but this isn't completely accurate. This still pulls in too many tasks because people who aren't assigned to the task type in the planning stage shouldn't be able to see it. Also a side note: When I use Project.getTasks() using users=[] as a parameter returns all tasks instead of ones without users assigned.
  19. eight

    Location Path is Red

    Thanks for the help, I really appreciate it.
  20. eight

    Location Path is Red

    That solved it. The Topic processor node was what I needed. When I came across these examples in the documentation at first, I didn't realize they would be completely necessary. The documentation on Topic plugins seems pretty sparse (or maybe I'm looking in the wrong places). Is there somewhere I can read more about it? As for Nuke. I was previously setting the environment variables in the render farm, but forgot to set it on my computer. Whoops. Thanks for taking time to solve this for me. I had another question as well, and it's related enough that starting a new thread doesn't seem necessary: In the Locations tutorial, it says that when adding a component, files are transferred automatically. It's easy to see how this works with the example given, which just copies from one folder to another on a local hard drive. But what happens if you transfer from an office in Los Angeles to an office in New York for example? Does ftrack have something built-in that will allow this to work, or is this something that has to be done manually?
  21. eight

    Location Path is Red

    Thank you for the in-depth reply. I tried all of your suggestions, unfortunately it seems that nothing has changed. The text is still red in the web interface. In Nuke I actually can't choose the correct location. It only wants to show the 3 built-in ftrack locations. Does the ftrack plugin discover new locations on its own? Here's the code I changed: losAngeles.py: import ftrackdef register(registry, **kw): locationName = "test.losangeles" ftrack.ensureLocation(locationName) structure = ftrack.OriginStructure() accessor = ftrack.DiskAccessor(prefix="") location = ftrack.Location(locationName, structure=structure, accessor=accessor) registry.add(location)updated code: location = ftrack.Location("test.losangeles")component = version.createComponent(path=componentPath, location=location)print component# <component('{'container_id': None, 'name': 'main', 'filetype': '.exr', 'entityType': 'component', 'version_id': 'c79a1170-f28a-11e3-88cf-04011a8b0d01', 'padding': 7, 'system_type': 'sequence', 'entityId': 'c7b963b8-f28a-11e3-88cf-04011a8b0d01', 'id': 'c7b963b8-f28a-11e3-88cf-04011a8b0d01', 'size': 214720903}')>print component.getResourceIdentifier()# V:\PROJECTS\Eric_Tests\_WORK\BL_010\2D\comps\renders\ftrack\ftrack.%07d.exrprint component.getFilesystemPath()# V:\PROJECTS\Eric_Tests\_WORK\BL_010\2D\comps\renders\ftrack\ftrack.%07d.exrasset.publish()For the resolver, I just copied the example in the link you gave. I should also mention that I set the environment variables for FTRACK_LOCATION_PLUGIN_PATH and FTRACK_TOPIC_PLUGIN_PATH to the directories that these Python files are in. And I have the line ftrack.setup() in the file that does the asset publish.
  22. eight

    Location Path is Red

    Hi, I'm trying to create a custom location which uses a disk path that doesn't change. I've created a script that's supposed to publish an image sequence. It runs without errors, and I can see it in ftrack (browser), but when I look at the published version path, it's red, as if there's an error. Also, if I try to import it in Nuke, it won't show up. Here's the relevant code for that: locations.pydef getLosAngeles(): locationName = "test.losangeles" accessor = ftrack.DiskAccessor(prefix=r"V:") structure = ftrack.OriginStructure(prefix=r"V:") location = ftrack.ensureLocation(locationName) location = ftrack.Location(locationName, accessor=accessor, structure=structure) return location------------------------------------------------------------------------------------------------publish.pytry: asset = shot.getAsset(name=assetName, assetType='comp')except: asset = shot.createAsset(name=assetName, assetType='comp', task=task)version = asset.createVersion(taskid=task.getId())componentPath = path_extra.toNukePadding(inFile)componentPath = "{0} [{1}]".format(componentPath, frameList)location = locations.getLosAngeles()component = version.createComponent(path=componentPath, location=location)asset.publish()And the path I'm trying to publish is: V:\PROJECTS\Eric_Tests\_WORK\BL_010\2D\comps\renders\ftrack\ftrack.%07d.exr. I'm not clear on what the right way to do this is.
  23. eight

    Maya Publish Path

    Thanks for the reply. Locations seems to be the way to go. Since it doesn't seem to be a feature that's in the plugin, I'll have to edit the Python source. I have some questions about locations, but to avoid getting too off topic I'll post in the API section.
  24. eight

    Maya Publish Path

    Thanks for replying. Your suggestion gets it on the right disk, but the folder structure is still completely under ftrack control. I see looking at the Maya integration help page that this is a feature planned for a future release.
  25. eight

    Maya Publish Path

    Hi, I'm trying out the Maya plugin. We're currently using a network drive to save all our Maya scenes to, and we have a specific folder structure we try to follow. However, when publishing a Maya scene, it ends up copying the scene to somewhere on my C: drive. Isn't it possible to leave the scene path untouched when publishing?