Search the Community

Showing results for tags 'component'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Company news
    • General announcements
  • ftrack Studio (main app)
    • General discussion
    • Feature requests
    • API
    • Help
    • Actions and Widgets
    • ftrack Go
  • ftrack Review
    • General discussion
    • Feature requests
    • Help
  • Connect and plugins
    • General discussion
    • Connect package releases
    • Feature requests
    • Help
    • Connect plugins releases
  • Advisory Forum
  • Tech preview
    • API
    • New integrations
    • Studio overview
    • ftrack Review

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 5 results

  1. Hi, I am currently trying to automatically get web-playable movies when publishing the sequnces of frames. I'd like to discuss whether it's an optimal way of doing this and to ask some questions. I am registering for "ftrack.location.component-added" event, get the location and the component, check if a component's "system_type" is "sequence", ask the location to provide a file system path to frames, create a movie from these frames and fire up the "ftrack.connect.publish.make-web-playable" event providing the version id and the movie file path. The movie is generated fine, the event is published but nothing new is added to my version, the movie is not there. If I try to publish these frames together with this movie manually (by selecting the movie as web-playable in the ftrack connect), everything works as expected. Any suggestions? Thank you. Regards, Andriy
  2. <ftrack_api.query.QueryResult object at 0x0000024562AC9CF8> # Error: ftrack_api.session.Session : Server reported error: ValueError(Cannot set relationship to string value.) # # Error: Server reported error: ValueError(Cannot set relationship to string value.) # Traceback (most recent call last): # File "<maya console>", line 1, in <module> # File "R:/Pipeline/configs/assetPipeline\assetAPI.py", line 430, in publishComponent # self.set_component(oVersion, filePath) # File "R:/Pipeline/configs/assetPipeline\assetAPI.py", line 420, in set_component # self.session.commit() # File "R:/Pipeline/APIs/ftrackAPI\ftrack_api\session.py", line 1241, in commit # result = self._call(batch) # File "R:/Pipeline/APIs/ftrackAPI\ftrack_api\session.py", line 1620, in _call # raise ftrack_api.exception.ServerError(error_message) # ServerError: Server reported error: ValueError(Cannot set relationship to string value.) # MY CODE def set_component(self, asset_version, filePath): logger.info("Publishing Component %s ---------------------------------" % filePath) location = self.session.query('Location where name is "ftrack.unmanaged"').one() # This is important # location = self.session.query('Location where name is "{}"'.format("ftrack.unmanaged")).one() print asset_version print "FilePath: %s" % filePath print "Location: " print location ft_component = asset_version.create_component(path=filePath, location=location) self.session.commit() if ft_component: logger.info("Publishing Component Succesful %s ---------------------------------" % ft_component) return ft_component def publishComponent(self, sAsset, componentType, filePath, sTaskType="Rigging",iVersionNumber=1): oVersion = self.build_asset_version(sAsset, sTaskType,iVersionNumber) print oVersion.keys() if componentType in ["model", "rig"]: publishChecks.sanityChecks(componentType) self.set_component(oVersion, filePath) def build_asset_version(self, sAsset, sTaskType, version=0, note=''): '''Builds an AssetVersion, it takes an asset and a task as arguments"''' asset = self.getOAsset(sAsset,sTaskType) task = self.getOTask(sAsset,sTaskType) try: # ONLY HERE FOR DEV DELETE AFTERWARDS version_query = 'AssetVersion where task_id is "{}" and version is "{}" and asset.type.id is "{}"'.format( task['id'], int(version), asset['type']['id']) current_versions = self.session.query(version_query).one() if current_versions: # Deletes the old version ^^^^^^^ DEV ONLY ^^^^^^^^ self.session.delete(current_versions) self.session.commit() except: logger.info("Asset Version Creation Error %s ---------------------------------" % asset['name'])
  3. Hi all, we need to add and get a component for a AssetVersion in the same session. Ex: unmanaged_location = session.query('Location where name is "ftrack.unmanaged"').one() version = session.query("AssetVersion where id is 87912656-5d89-11e6-a165-005056a76761").first() path = '/path/to/a/file' new_com_name = 'test_component' print len(version['components']) version.create_component( path, data={'name': new_com_name}, location=unmanaged_location ) session.commit() print len(version['components']) Result: 1 1 Only if we reopen the session we can get the new component. Cheers!
  4. Hi I am struggling to work out how to create a new AssetVersion in the new API. I think I have to do the following: Create an Asset -- parented to the shot Create an AssetVersion -- linking to the task and asset Create the Component. Unfortunately I'm getting an error, it seems to want a context_id on the Asset, but I don't know what to give it? I have the following code: location = session.query('Location where name is "ftrack.unmanaged"').first() task = session.query('Task where id is "d4564359-2944-49d4-93fa-b11909f19ff5"').first() shot = session.query('Shot where id is "bf127242-da0b-40aa-ac19-ca793f7590e0"').first() data = { 'parent': shot, 'name':"aAsset", 'type':'scene' } asset = session.create("Asset", {}) data = { "task": task, "asset": asset, "name": "Philip Test", "version": 99, } version = session.create("AssetVersion", data) component = version.create_component( path=r"P:\a_project\series_01\sequences\025\sq025_sh040\2d\publish\v009\040_Compositing.nk", data={ 'name': 'nuke_script' }, location=location ) session.commit() And I get the following error: Traceback (most recent call last): File "C:/Users/Philips/Documents/source_code/test_project/ftrack/create_version.py", line 51, in <module> location=location File "L:\script_library\pipeline\libs\3rd_party\production\ftrack_api\entity\asset_version.py", line 47, in create_component return self.session.create_component(path, data=data, location=location) File "L:\script_library\pipeline\libs\3rd_party\production\ftrack_api\session.py", line 1816, in create_component 'FileComponent', path, data, location File "L:\script_library\pipeline\libs\3rd_party\production\ftrack_api\session.py", line 1887, in _create_component location.add_component(component, origin_location, recursive=False) File "L:\script_library\pipeline\libs\3rd_party\production\ftrack_api\entity\location.py", line 77, in add_component [component], sources=source, recursive=recursive File "L:\script_library\pipeline\libs\3rd_party\production\ftrack_api\entity\location.py", line 249, in add_components transferred=transferred ftrack_api.exception.LocationError: Failed to register components with location <UnmanagedLocation("ftrack.unmanaged", cb268ecc-8809-11e3-a7e2-20c9d081909b)> due to error: Server reported error: OperationalError((OperationalError) (1048, "Column 'context_id' cannot be null") 'INSERT INTO asset (id, name, context_id, taskid, type_id) VALUES (%s, %s, %s, %s, %s)' (u'6220bf4b-3d0f-45cf-aa6c-45106fd49396', None, None, None, None)) Transferred component data that may require cleanup: [(<dynamic ftrack FileComponent object 54489720>, 'P:\\a_project\\series_01\\sequences\\025\\sq025_sh040\\2d\\publish\\v009\\040_Compositing.nk')]
  5. Hello . I am working in a script that will let me upload images to ftrack.server location .Then I set its thumbnail.For this I do this: modelcomponent = # file uploaded to ftrack version = model_component['version'] version['thumbnail_id'] = model_component['id'] fo.session.commit() It works finel.Image goes to ftrack and its thumbnail appears with no issues. But I realized there is no FtrackReviewcomponent. I found and example and add this to my script: model_component['metadata']['ftr_meta'] = json.dumps({ 'format': 'image'}) model_component['name'] = 'ftrackreview-image' With this I get the FtrackReview component, but I lose the file component.I canĀ“t see the url to the image anymore.