Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_filebrowser.py
| Show First 20 Lines • Show All 678 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| return | return | ||||
| asset_library_ref = context.asset_library_ref | asset_library_ref = context.asset_library_ref | ||||
| asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) | asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) | ||||
| if asset_file_handle.local_id: | if asset_file_handle.local_id: | ||||
| # If the active file is an ID, use its name directly so renaming is possible from right here. | # If the active file is an ID, use its name directly so renaming is possible from right here. | ||||
| layout.prop(asset_file_handle.local_id, "name", text="") | layout.prop(asset_file_handle.local_id, "name", text="") | ||||
| layout.prop(asset_file_handle.local_id.asset_data, "catalog_id") | |||||
| row = layout.row() | row = layout.row() | ||||
| row.label(text="Source: Current File") | row.label(text="Source: Current File") | ||||
| else: | else: | ||||
| layout.prop(asset_file_handle, "name", text="") | layout.prop(asset_file_handle, "name", text="") | ||||
| col = layout.column() # Just to allow disabling editing. | |||||
| col.enabled = False | |||||
| col.prop(asset_file_handle.asset_data, "catalog_id") | |||||
| col = layout.column(align=True) # Just to reduce margin. | col = layout.column(align=True) # Just to reduce margin. | ||||
| col.label(text="Source:") | col.label(text="Source:") | ||||
| row = col.row() | row = col.row() | ||||
| row.label(text=asset_lib_path) | row.label(text=asset_lib_path) | ||||
| row.operator("asset.open_containing_blend_file", text="", icon='TOOL_SETTINGS') | row.operator("asset.open_containing_blend_file", text="", icon='TOOL_SETTINGS') | ||||
| ▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines | |||||