PluginManager¶
The PluginManager module is responsible for discovering, loading, initializing, and managing all Prism plugins including DCC integrations and custom extensions.
Overview¶
PluginManager handles the complete lifecycle of plugins in Prism:
- Plugin discovery from plugin directories
- Dynamic plugin loading and initialization
- Plugin dependency management
- Plugin API version compatibility
- Plugin enable/disable functionality
Features¶
- Automatic discovery - Find plugins in standard locations
- Version management - Handle plugin compatibility
- Dependency resolution - Load plugins in correct order
- Dynamic loading - Load/unload plugins at runtime
- Plugin API - Standardized interface for plugin developers
- Custom plugin paths - Add user-defined plugin locations
Usage Example¶
import PrismCore
# Initialize Prism Core
core = PrismCore.create(prismArgs=["noUI"])
# Get loaded plugins
plugins = core.plugins.getLoadedPlugins()
# Get specific plugin
maya_plugin = core.plugins.getPlugin("Maya")
# Check if plugin is loaded
is_loaded = core.plugins.isPluginLoaded("Houdini")
# Reload plugin
core.plugins.reloadPlugin("CustomPlugin")
API Reference¶
Classes¶
PluginManager
¶
Bases: object
Manages Prism plugins and their lifecycle.
Initialize the PluginManager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
core
|
Any
|
Reference to the Prism core instance. |
required |
Source code in src/core/PrismUtils/PluginManager.py
Functions¶
initializePlugins
¶
Initialize and load all plugins for a Prism session.
Searches for and loads the specified app plugin first, then loads all other plugins from configured paths. Triggers startup callbacks after loading.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
appPlugin
|
str
|
Name of the app plugin to load (e.g., 'Standalone', 'Maya', 'Houdini'). |
required |
Source code in src/core/PrismUtils/PluginManager.py
getPluginDirs
¶
getPluginDirs(includeDefaults: bool = True, includeEnv: bool = True, includeConfig: bool = True, enabledOnly: bool = True) -> Dict[str, List[str]]
Get plugin directories from various sources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
includeDefaults
|
bool
|
Include default plugin directories |
True
|
includeEnv
|
bool
|
Include PRISM_PLUGIN_PATHS and PRISM_PLUGIN_SEARCH_PATHS env vars |
True
|
includeConfig
|
bool
|
Include user config plugin paths |
True
|
enabledOnly
|
bool
|
Only include enabled plugins from config |
True
|
Returns:
| Type | Description |
|---|---|
Dict[str, List[str]]
|
Dict with 'pluginPaths' and 'searchPaths' lists |
Source code in src/core/PrismUtils/PluginManager.py
setPluginPathEnabled
¶
Enable or disable a plugin path in user config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Plugin path to modify. |
required |
enabled
|
bool
|
Whether to enable or disable the path. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src/core/PrismUtils/PluginManager.py
setPluginSearchPathEnabled
¶
Enable or disable a plugin search path in user config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Search path to modify. |
required |
enabled
|
bool
|
Whether to enable or disable the path. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if successful, False otherwise. |
Source code in src/core/PrismUtils/PluginManager.py
getPluginPath
¶
getPluginPath(location: str = 'root', pluginType: str = '', path: str = '', pluginName: str = '') -> str
Get the file system path for a plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
str
|
Location type ('root', 'computer', 'user', 'project', 'custom'). |
'root'
|
pluginType
|
str
|
Optional plugin type ('App', 'Custom', 'Single File'). |
''
|
path
|
str
|
Custom path if location is 'custom'. |
''
|
pluginName
|
str
|
Optional specific plugin name. |
''
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Plugin path. |
Source code in src/core/PrismUtils/PluginManager.py
getUserPluginPath
¶
Get the user-specific plugin directory path.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
User plugin directory path. |
Source code in src/core/PrismUtils/PluginManager.py
getComputerPluginPath
¶
Get the computer-specific plugin directory path.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Computer plugin directory path. |
Source code in src/core/PrismUtils/PluginManager.py
getDefaultPluginPath
¶
Get the default plugin installation directory.
Checks environment variable and user config, falls back to computer path.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Default plugin directory path. |
Source code in src/core/PrismUtils/PluginManager.py
getFallbackPluginPath
¶
Get the fallback plugin directory for failed installations.
Checks environment variable and user config, falls back to user path.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Fallback plugin directory path. |
Source code in src/core/PrismUtils/PluginManager.py
loadAppPlugin
¶
loadAppPlugin(pluginName: str, pluginPath: Optional[str] = None, startup: bool = False) -> Optional[Any]
Load the application plugin for the current DCC.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of the app plugin (e.g., 'Maya', 'Houdini'). |
required |
pluginPath
|
Optional[str]
|
Optional path to plugin directory. |
None
|
startup
|
bool
|
Whether this is being called during Prism startup. |
False
|
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Optional[Any]: Loaded plugin instance, or None if loading failed. |
Source code in src/core/PrismUtils/PluginManager.py
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | |
loadPlugins
¶
loadPlugins(pluginPaths: Optional[List[str]] = None, directory: Optional[str] = None, directories: Optional[List[str]] = None, recursive: bool = False, force: bool = True, ignore: Optional[List[str]] = None, singleFilePlugins: bool = False) -> List[Any]
Load plugins from specified paths or directories.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPaths
|
Optional[List[str]]
|
Specific plugin paths to load |
None
|
directory
|
Optional[str]
|
Single directory to search for plugins |
None
|
directories
|
Optional[List[str]]
|
Multiple directories to search |
None
|
recursive
|
bool
|
Search subdirectories recursively |
False
|
force
|
bool
|
Force reload even if already loaded |
True
|
ignore
|
Optional[List[str]]
|
List of plugin names to skip |
None
|
singleFilePlugins
|
bool
|
Load single-file .py plugins |
False
|
Returns:
| Type | Description |
|---|---|
List[Any]
|
List of loaded plugin instances |
Source code in src/core/PrismUtils/PluginManager.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | |
searchPlugins
¶
searchPlugins(pluginPaths: Optional[List[str]] = None, directory: Optional[str] = None, directories: Optional[List[str]] = None, recursive: bool = True, pluginNames: Optional[List[str]] = None) -> List[Dict[str, str]]
Search for plugins in specified paths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPaths
|
Optional[List[str]]
|
Optional list of direct plugin folder paths. |
None
|
directory
|
Optional[str]
|
Optional single directory to search. |
None
|
directories
|
Optional[List[str]]
|
Optional list of directories to search. |
None
|
recursive
|
bool
|
Whether to search recursively. Defaults to True. |
True
|
pluginNames
|
Optional[List[str]]
|
Optional list of specific plugin names to find. |
None
|
Returns:
| Type | Description |
|---|---|
List[Dict[str, str]]
|
List[Dict[str, str]]: List of dicts with 'name' and 'path' keys. |
Source code in src/core/PrismUtils/PluginManager.py
activatePlugin
¶
Activate and load a previously deactivated plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to plugin directory. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Optional[Any]: Loaded plugin instance, or None if loading failed. |
Source code in src/core/PrismUtils/PluginManager.py
loadPlugin
¶
loadPlugin(path: Optional[str] = None, name: Optional[str] = None, force: bool = True, activate: Optional[bool] = None, showWarnings: bool = False) -> Optional[Any]
Load a single plugin from path or name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Optional[str]
|
Optional path to plugin directory or .py file. |
None
|
name
|
Optional[str]
|
Optional plugin name to search for and load. |
None
|
force
|
bool
|
Whether to reload if already loaded. Defaults to True. |
True
|
activate
|
Optional[bool]
|
Whether to activate if plugin was inactive. Defaults to None. |
None
|
showWarnings
|
bool
|
Whether to show warning popups. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Optional[Any]: Loaded plugin instance, or None if loading failed. |
Source code in src/core/PrismUtils/PluginManager.py
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 | |
loadPluginMetaData
¶
Load plugin metadata without loading the full plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Optional[str]
|
Path to plugin directory. |
None
|
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Optional[Any]: Plugin metadata instance, or None if loading failed. |
Source code in src/core/PrismUtils/PluginManager.py
reloadPlugins
¶
Reload multiple plugins.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
Optional[List[str]]
|
Optional list of plugin names to reload. Reloads all if None. |
None
|
Source code in src/core/PrismUtils/PluginManager.py
reloadPlugin
¶
Reload a single plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to reload. |
required |
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Optional[Any]: Reloaded plugin instance. |
Source code in src/core/PrismUtils/PluginManager.py
reloadCustomPlugins
¶
Reload all custom plugins.
Unloads and reloads all modules for custom plugins.
Source code in src/core/PrismUtils/PluginManager.py
unloadProjectPlugins
¶
Unload all plugins located in the project directory.
Source code in src/core/PrismUtils/PluginManager.py
deactivatePlugin
¶
Deactivate a loaded plugin without uninstalling it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to deactivate. |
required |
Source code in src/core/PrismUtils/PluginManager.py
getNotAutoLoadPlugins
¶
Get list of plugins that should not auto-load.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configOnly
|
bool
|
If True, only returns config-based inactive plugins. |
False
|
Returns:
| Type | Description |
|---|---|
List[str]
|
List[str]: List of plugin names configured not to auto-load. |
Source code in src/core/PrismUtils/PluginManager.py
getAutoLoadPlugin
¶
Check if a plugin is configured to auto-load.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to check. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if plugin should auto-load, False otherwise. |
Source code in src/core/PrismUtils/PluginManager.py
setAutoLoadPlugin
¶
Set whether a plugin should auto-load on startup.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to configure. |
required |
autoload
|
bool
|
Whether plugin should auto-load. |
required |
Source code in src/core/PrismUtils/PluginManager.py
unloadPlugin
¶
Unload a plugin and clean up its resources.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
Optional[str]
|
Optional name of plugin to unload. |
None
|
plugin
|
Optional[Any]
|
Optional plugin instance to unload. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Path of unloaded plugin. |
Source code in src/core/PrismUtils/PluginManager.py
unloadAppPlugin
¶
Unload the current application plugin and close related windows.
Source code in src/core/PrismUtils/PluginManager.py
getPluginMetaData
¶
getPluginNames
¶
Get names of all available plugins.
Returns:
| Type | Description |
|---|---|
List[str]
|
Sorted list of plugin names (loaded and unloaded) |
Source code in src/core/PrismUtils/PluginManager.py
getPluginNameFromPath
¶
Extract plugin name from file/directory path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to plugin file or directory |
required |
Returns:
| Type | Description |
|---|---|
str
|
Plugin name string |
Source code in src/core/PrismUtils/PluginManager.py
getPluginSceneFormats
¶
Get all scene formats supported by plugins.
Returns:
| Type | Description |
|---|---|
List[str]
|
List of file extensions (e.g., ['.ma', '.mb', '.blend']) |
Source code in src/core/PrismUtils/PluginManager.py
getPluginData
¶
Get attribute data from a plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of the plugin |
required |
data
|
str
|
Attribute name to retrieve |
required |
Returns:
| Type | Description |
|---|---|
Any
|
Attribute value or None if not found |
Source code in src/core/PrismUtils/PluginManager.py
getPlugin
¶
Get plugin instance by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of the plugin to retrieve |
required |
allowUnloaded
|
bool
|
If True, include inactive plugins |
False
|
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Plugin instance or None if not found |
Source code in src/core/PrismUtils/PluginManager.py
isPluginLoaded
¶
getUnloadedPlugins
¶
getUnloadedPlugin
¶
Get a specific unloaded plugin by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of the unloaded plugin |
required |
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Unloaded plugin instance or None |
Source code in src/core/PrismUtils/PluginManager.py
removeUnloadedPlugin
¶
Remove a plugin from the unloaded plugins list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of the plugin to remove |
required |
Source code in src/core/PrismUtils/PluginManager.py
getLoadedPlugins
¶
Get all currently loaded plugins.
Returns:
| Type | Description |
|---|---|
Dict[str, Dict[str, Any]]
|
Dict with 'App' and 'Custom' keys containing plugin dicts |
Source code in src/core/PrismUtils/PluginManager.py
getPlugins
¶
registerRenderfarmPlugin
¶
Register a renderfarm submission plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
Any
|
Renderfarm plugin instance |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if registered successfully |
Source code in src/core/PrismUtils/PluginManager.py
unregisterRenderfarmPlugin
¶
Unregister a renderfarm submission plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
Any
|
Renderfarm plugin instance |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if unregistered successfully |
Source code in src/core/PrismUtils/PluginManager.py
getRenderfarmPlugins
¶
getRenderfarmPlugin
¶
Get a specific renderfarm plugin by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Plugin name to find |
required |
Returns:
| Type | Description |
|---|---|
Optional[Any]
|
Renderfarm plugin instance or None |
Source code in src/core/PrismUtils/PluginManager.py
createPlugin
¶
createPlugin(pluginName: str, pluginType: str, location: str = 'root', path: str = '') -> Optional[str]
Create a new plugin from template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name for the new plugin |
required |
pluginType
|
str
|
Plugin type ('App', 'Custom', 'Single File') |
required |
location
|
str
|
Install location ('root' or custom) |
'root'
|
path
|
str
|
Custom path for plugin |
''
|
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Path to created plugin or None if failed |
Source code in src/core/PrismUtils/PluginManager.py
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 | |
addToPluginConfig
¶
addToPluginConfig(pluginPath: Optional[str] = None, searchPath: Optional[str] = None, idx: int = 0) -> None
Add plugin or search path to user config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPath
|
Optional[str]
|
Specific plugin path to add |
None
|
searchPath
|
Optional[str]
|
Search directory path to add |
None
|
idx
|
int
|
Insert position (0=first, -1=last) |
0
|
Source code in src/core/PrismUtils/PluginManager.py
removeFromPluginConfig
¶
removeFromPluginConfig(pluginPaths: Optional[List[str]] = None, searchPaths: Optional[List[str]] = None) -> bool
Remove plugin or search paths from user config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPaths
|
Optional[List[str]]
|
List of plugin paths to remove |
None
|
searchPaths
|
Optional[List[str]]
|
List of search paths to remove |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if config was modified |
Source code in src/core/PrismUtils/PluginManager.py
canPluginBeFound
¶
Check if plugin path is in search paths or config.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPath
|
str
|
Path to check |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if plugin can be found |
Source code in src/core/PrismUtils/PluginManager.py
searchPluginPath
¶
Search for first plugin path by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to find |
required |
Returns:
| Type | Description |
|---|---|
Union[str, bool]
|
Plugin path or False if not found |
Source code in src/core/PrismUtils/PluginManager.py
searchPluginPaths
¶
Search for all plugin paths matching name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginName
|
str
|
Name of plugin to find |
required |
Returns:
| Type | Description |
|---|---|
Union[List[str], bool]
|
List of plugin paths or False if none found |
Source code in src/core/PrismUtils/PluginManager.py
getFunctionInfo
¶
Get metadata about a function for monkey patching.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
Callable
|
Function to get info for |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
Dict with 'id' and 'class' keys |
Source code in src/core/PrismUtils/PluginManager.py
monkeyPatch
¶
monkeyPatch(orig: Callable, new: Callable, plugin: Any, quiet: bool = False, force: bool = False) -> None
Replace a function with a plugin override (monkey patch).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
orig
|
Callable
|
Original function to replace |
required |
new
|
Callable
|
New function to use instead |
required |
plugin
|
Any
|
Plugin performing the patch |
required |
quiet
|
bool
|
If True, don't show errors |
False
|
force
|
bool
|
If True, replace existing patches |
False
|
Source code in src/core/PrismUtils/PluginManager.py
unmonkeyPatchFunction
¶
Remove a monkey patch and restore original function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
functionData
|
Dict[str, Any]
|
Dict with patch info (orig, new, id, plugin) |
required |
Source code in src/core/PrismUtils/PluginManager.py
unmonkeyPatchPluginFunctions
¶
Remove all monkey patches applied by a specific plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
Any
|
Plugin instance whose patches to remove |
required |
Source code in src/core/PrismUtils/PluginManager.py
isFunctionMonkeyPatched
¶
Check if a function is currently monkey patched.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
Callable
|
Function to check |
required |
plugin
|
Optional[Any]
|
Optionally check if patched by specific plugin |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True if function is patched (and by plugin if specified) |
Source code in src/core/PrismUtils/PluginManager.py
getFunctionPatch
¶
getFunctionPatch(function: Callable, preferredPatchers: Optional[List[str]] = None) -> Optional[Dict[str, Any]]
Get monkey patch info for a function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
Callable
|
Function to get patch for |
required |
preferredPatchers
|
Optional[List[str]]
|
List of preferred plugin names |
None
|
Returns:
| Type | Description |
|---|---|
Optional[Dict[str, Any]]
|
Patch dict or None if not patched |
Source code in src/core/PrismUtils/PluginManager.py
callUnpatchedFunction
¶
Call the original unpatched version of a function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
Callable
|
Patched function whose original version to call |
required |
*args
|
Any
|
Function arguments |
()
|
**kwargs
|
Any
|
Function keyword arguments (supports preferredPatchers key) |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
Return value from original function or False if not found |
Source code in src/core/PrismUtils/PluginManager.py
installHub
¶
Install Hub and PrismInternals plugins.
Downloads and installs required Hub infrastructure plugins.
Source code in src/core/PrismUtils/PluginManager.py
downloadPlugin
¶
Download a plugin from the Prism service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
str
|
Plugin name ('Hub', 'PrismInternals', etc.) |
required |
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Path to downloaded zip file or None if failed |
Source code in src/core/PrismUtils/PluginManager.py
1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 | |
updatePlugins
¶
Extract and install plugin updates from zip/tar files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginUpdates
|
List[Dict[str, str]]
|
List of dicts with 'target' and 'zip' keys |
required |
Source code in src/core/PrismUtils/PluginManager.py
removePlugin
¶
Remove a plugin directory.
Backs up plugin before removal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPath
|
str
|
Path to plugin directory to remove |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if successful |
Source code in src/core/PrismUtils/PluginManager.py
1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 | |
getNonExistentPath
¶
Get non-existent path by appending incremental number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Base path |
required |
Returns:
| Type | Description |
|---|---|
str
|
Path with _N suffix that doesn't exist |
Source code in src/core/PrismUtils/PluginManager.py
backupPlugin
¶
Create backup of plugin before update/install.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pluginPath
|
str
|
Path to plugin directory |
required |
Returns:
| Type | Description |
|---|---|
str
|
Path to backup directory |
Source code in src/core/PrismUtils/PluginManager.py
clearPluginBackup
¶
Delete plugin backup directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backupPath
|
str
|
Path to backup directory |
required |
Source code in src/core/PrismUtils/PluginManager.py
restorePluginFromBackup
¶
Restore plugin from backup directory after failed install.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backupPath
|
str
|
Path to backup directory |
required |
Source code in src/core/PrismUtils/PluginManager.py
postInstallPlugins
¶
postInstallPlugins(plugins: List[str], basepath: str, load: bool = True, parent: Any = None) -> bool
Post-installation tasks for plugins - add to config, load, setup integrations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugins
|
List[str]
|
List of plugin directory names |
required |
basepath
|
str
|
Base directory containing plugins |
required |
load
|
bool
|
Whether to load plugins. Defaults to True. |
True
|
parent
|
Any
|
Parent widget for dialogs. Defaults to None. |
None
|
Returns:
| Type | Description |
|---|---|
bool
|
True on success |
Source code in src/core/PrismUtils/PluginManager.py
setupIntegrations
¶
Open installer dialog to setup DCC integrations for a plugin.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plugin
|
str
|
Plugin name |
required |
parent
|
Any
|
Parent widget for dialog. Defaults to None. |
None
|
Source code in src/core/PrismUtils/PluginManager.py
UnloadedPlugin
¶
Bases: object
Placeholder for plugin that failed to load.
Attributes:
| Name | Type | Description |
|---|---|---|
core |
PrismCore instance |
|
version |
Plugin version |
|
pluginName |
Plugin name |
|
pluginPath |
Path to plugin |
|
pluginType |
Plugin type |
|
appShortName |
Application short name |
|
location |
Plugin location |
Initialize UnloadedPlugin placeholder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
core
|
Any
|
PrismCore instance |
required |
pluginName
|
str
|
Plugin name |
required |
path
|
str
|
Path to plugin. Defaults to "". |
''
|
location
|
str
|
Plugin location. Defaults to "". |
''
|
Source code in src/core/PrismUtils/PluginManager.py
Plugin Types¶
Prism supports several plugin types: - DCC plugins - Integration with 3D/2D applications - Custom plugins - User-created extensions - Render farm plugins - Deadline, Tractor, etc. - Storage plugins - Cloud storage integrations
Plugin Development¶
Plugins must implement standard interfaces:
- initializePlugin() - Setup and registration
- uninitializePlugin() - Cleanup
- Plugin callbacks for Prism events
See Also¶
- Callbacks - Plugin event system
- Integration - DCC application integration
- PrismInstaller - Plugin installation