editor.asset_properties#
AssetPropertyEditor
is used to create new assets and edit existing asset
item properties.
- bookmarks.editor.asset_properties.SECTIONS#
The property editor sections.
- Type:
dict
Classes:
|
Property editor widget used to edit asset item properties. |
Functions:
|
Closes the |
|
Show the |
Data:
UI layout definition |
- class bookmarks.editor.asset_properties.AssetPropertyEditor(server, job, root, asset=None, parent=None)[source]#
Bases:
BasePropertyEditor
Property editor widget used to edit asset item properties.
The class is a customized
bookmarks.editor.base.BasePropertyEditor
, and implements asset creation on top of existing features.Methods:
Creates a new asset based on the current name and template selections.
create_link_file
(path)Creates a link file for nested assets.
A file path to use as the source of database values.
Initializes data.
Slot connected to the link button.
name
()Returns the name of the asset.
Saves changes.
Returns the currently stored ShotGrid properties.
- create_link_file(path)[source]#
Creates a link file for nested assets.
- Parameters:
path (str) – Path to the newly created asset.
- bookmarks.editor.asset_properties.close()[source]#
Closes the
AssetPropertyEditor
editor.
- bookmarks.editor.asset_properties.show(server, job, root, asset=None)[source]#
Show the
AssetPropertyEditor
window.- Parameters:
server (str) – server path segment.
job (str) – job path segment.
root (str) – root path segment.
asset (str, optional) – Asset name. Default: None.
- bookmarks.editor.asset_properties.SECTIONS = {0: {'color': PySide2.QtGui.QColor.fromRgbF(0.254902, 0.254902, 0.254902, 1.000000), 'groups': {0: {0: {'description': "The asset's name, e.g. 'SH0010'", 'key': None, 'name': 'Name', 'placeholder': "Enter name, e.g. 'SH0010'", 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bce0a0)>, 'widget': <class 'bookmarks.ui.LineEdit'>}, 1: {'description': "A short description of the asset, e.g. 'My first shot.'.", 'key': 'description', 'name': 'Description', 'placeholder': "A description, e.g. 'My first shot'", 'validator': None, 'widget': <class 'bookmarks.ui.LineEdit'>}}, 1: {0: {'description': 'Select a folder template to create this asset.', 'key': None, 'name': 'Template', 'placeholder': None, 'validator': None, 'widget': functools.partial(<class 'bookmarks.templates.TemplatesWidget'>, 'asset')}}}, 'icon': '', 'name': 'Settings'}, 1: {'color': None, 'groups': {0: {0: {'button': 'Link with ShotGrid Entity', 'description': 'Link item with a ShotGrid Entity', 'key': 'link', 'name': 'Link', 'placeholder': None, 'validator': None, 'widget': None}, 1: {'description': "Select the item's ShotGrid type", 'key': 'shotgun_type', 'name': 'Type', 'placeholder': None, 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bcdb60)>, 'widget': <class 'bookmarks.editor.base_widgets.SGAssetTypesWidget'>}, 2: {'description': "The ShotGrid ID number this item is associated with. e.g. '123'.", 'key': 'shotgun_id', 'name': 'ID', 'placeholder': "ShotGrid Project ID, e.g. '123'", 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bcdb60)>, 'widget': <class 'bookmarks.ui.LineEdit'>}, 3: {'description': 'The ShotGrid entity name. The entity can be a shot, sequence or asset.\nClick "Link with ShotGrid" to get the name and the id from the ShotGrid server.', 'key': 'shotgun_name', 'name': 'Name', 'placeholder': "ShotGrid entity name, e.g. 'MyProject'", 'validator': None, 'widget': <class 'bookmarks.ui.LineEdit'>}}}, 'icon': 'sg', 'name': 'ShotGrid Entity'}, 2: {'color': PySide2.QtGui.QColor.fromRgbF(0.254902, 0.254902, 0.254902, 1.000000), 'groups': {0: {0: {'description': "The frame this asset starts at, e.g. '1150'.", 'key': 'cut_in', 'name': 'In Frame', 'placeholder': "In frame, e.g. '1150'", 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bcdb60)>, 'widget': <class 'bookmarks.ui.LineEdit'>}, 1: {'description': "The frame this asset ends at, e.g. '1575'.", 'key': 'cut_out', 'name': 'Out Frame', 'placeholder': "Out frame, e.g. '1575'", 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bcdb60)>, 'widget': <class 'bookmarks.ui.LineEdit'>}, 2: {'description': "The asset's duration in frames, e.g. '425'.", 'key': 'cut_duration', 'name': 'Cut Duration', 'placeholder': "Duration in frames, e.g. '425'", 'validator': <PySide2.QtGui.QRegExpValidator(0x2a201bcdb60)>, 'widget': <class 'bookmarks.ui.LineEdit'>}}}, 'icon': 'todo', 'name': 'Cut'}, 3: {'color': PySide2.QtGui.QColor.fromRgbF(0.254902, 0.254902, 0.254902, 1.000000), 'groups': {0: {0: {'button': 'Visit', 'description': 'A custom url of the bookmarks, e.g. https://sheets.google.com/123', 'key': 'url1', 'name': 'Link #1', 'placeholder': 'https://my.custom-url.com', 'validator': None, 'widget': <class 'bookmarks.ui.LineEdit'>}, 1: {'button': 'Visit', 'description': 'A custom url of the bookmarks, e.g. https://sheets.google.com/123', 'key': 'url2', 'name': 'Link #2', 'placeholder': 'https://my.custom-url.com', 'validator': None, 'widget': <class 'bookmarks.ui.LineEdit'>}}}, 'icon': '', 'name': 'Links'}}#
UI layout definition