DependencyViewer¶
The DependencyViewer visualizes and manages dependencies between scene files, assets, and products in the pipeline.
Overview¶
DependencyViewer helps understand and manage asset relationships:
- Visualize scene dependencies as a graph
- Track which scenes use which assets
- Update references to new versions
- Check for missing dependencies
- Manage asset versions in scenes
Features¶
- Dependency graph - Visual representation of relationships
- Reference tracking - See all file references
- Version updates - Update to latest asset versions
- Missing file detection - Find broken references
- Batch updates - Update multiple references at once
- Dependency report - Export dependency information
Usage Example¶
import PrismCore
# Initialize Prism Core
core = PrismCore.create() # In DCC
# Open Dependency Viewer
viewer = core.dependencyViewer()
API Reference¶
Classes¶
DependencyViewer
¶
Bases: QDialog, Ui_dlg_DependencyViewer
Dialog for visualizing version dependencies and external files.
This class provides a tree view of all dependencies (source scenes, exports, external files) for a given version. Each dependency is displayed with its existence status, type, modification date, and path.
Attributes:
| Name | Type | Description |
|---|---|---|
core |
The Prism core instance |
|
depRoot |
Path to the root version info file |
|
dependencies |
Dictionary mapping dependency IDs to [path, item, parent_id] |
Initialize the DependencyViewer dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
core
|
Any
|
The Prism core instance providing access to pipeline functionality |
required |
depRoot
|
str
|
Path to the version info file to analyze dependencies for |
required |
Source code in src/core/ProjectScripts/DependencyViewer.py
Functions¶
setRoot
¶
Set the root version info file and update the dependency tree.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
str
|
Path to the version info file to set as the root |
required |
This method: 1. Determines the display name from the version info 2. Clears the existing dependency tree 3. Updates dependencies starting from the new root
Source code in src/core/ProjectScripts/DependencyViewer.py
connectEvents
¶
Connect UI signals to their respective slot methods.
Connects search field changes, mouse events, and context menu requests to their corresponding handler methods.
Source code in src/core/ProjectScripts/DependencyViewer.py
mouseClickEvent
¶
Handle mouse click events on UI elements.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
Any
|
The mouse event object |
required |
uielement
|
str
|
Identifier for the UI element that was clicked |
required |
Processes left mouse button releases to clear selection when clicking empty areas of the tree widget.
Source code in src/core/ProjectScripts/DependencyViewer.py
rclList
¶
Display context menu for tree items.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
listType
|
str
|
Type of list ("deps" for dependencies) |
required |
pos
|
Any
|
Position where the context menu should appear |
required |
Provides options to: - Open the dependency file location in Explorer - Copy the file path to clipboard
Source code in src/core/ProjectScripts/DependencyViewer.py
updateDependencies
¶
Recursively update the dependency tree from a version info file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
depID
|
str
|
Unique identifier for this dependency level ("0" for root) |
required |
versionInfo
|
str
|
Path to the version info configuration file |
required |
ignore
|
Optional[List[str]]
|
List of dependency paths already processed to avoid duplicates |
None
|
This method: 1. Reads dependencies and external files from version info 2. Creates tree items showing existence status (green/red indicator) 3. Displays type (Source Scene/Export/File), date, and path 4. Recursively processes dependencies of dependencies
Source code in src/core/ProjectScripts/DependencyViewer.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | |
filterDeps
¶
Filter the dependency tree based on a search string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filterStr
|
str
|
Text to filter dependencies by (case-insensitive) |
required |
If filterStr is empty, displays all dependencies. Otherwise, shows only dependencies whose paths contain the filter string, along with their parent hierarchy.
Source code in src/core/ProjectScripts/DependencyViewer.py
clearItem
¶
Recursively clear all children from a tree widget item.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
QTreeWidgetItem
|
The tree widget item to clear |
required |
Removes all child items recursively from the given item.
Source code in src/core/ProjectScripts/DependencyViewer.py
Dependency Types¶
- File references - External scene files
- Image sequences - Textures and images
- Caches - Alembic, VDB, etc.
- External data - Any referenced files
Operations¶
- View - Visualize dependency graph
- Update - Change reference versions
- Repair - Fix broken references
- Report - Export dependency list
See Also¶
- ProjectEntities - Entity management
- Products - Product versioning