class
ScriptLibManObject.
LibManager
Bases: object
An instance implementing this interface is injected into the scriptengine scope under the name library manager.
repositories
Gets the list of available library repositories.
The order of those repositories is configurable by the user in the dialog and the script.
This list is a snapshot of the current state. When repositories are created, removed or moved, those changes are not reflected "live" in the list, and you need to get a fresh copy.
tuple <LibRepository>
insert_repository
rootfolder
name
index=-1
Creates a new library repository.
rootfolder (str) -- The rootfolder for the repository (this must be the full path to an existing directory on disk).
name (str) -- The name of the repository.
index (int) -- The index of the repository in the list. -1 means the repository is added to the end of the list.
The newly created repository.
move_repository
repository
new_index
Move_repositories the specified repository to a new position in the list.
Use this to manipulate the search order.
repository (LibRepository) -- The repository.
new_index (int) -- The new index. You can pass -1 to move it to the end of the list.
remove_repository
repository
delete_on_disk=False
Removes the specified repository.
repository (LibRepository) -- The repository.
delete_on_disk (bool) -- If set to True, the on-disk directory is also deleted.
update_repository
repository
new_name=None
new_location=None
copy_libraries=False
Update the specified repository.
new_name (str) -- The new name.
new_location (str) -- The new location.
copy_libraries (bool) -- if set to True, the libraries from the old location are installed at the new location, if they don't exist.
get_file_path
library
Gets the file path of the specified library in the library repository.
library (ManagedLib) -- The library.
str
The file path of the library.
categories
Gets all the known library categories.
tuple
top_level_categories
Gets the all known top level library categories.
tuple
get_category
guid
Gets the category with the specified GUID.
install_library
filepath
repository=None
overwrite=False
Installs the library with the specified filepath.
filepath (str) -- The filepath of the library to install.
repository (LibRepository) -- The repository. This parameter is optional, if omitted, the first repository in the list is used.
overwrite (bool) -- if set to True, existing libraries are replaced.
The installed library.
uninstall_library
repository
library
Uninstalls a library from the specified repository.
repository (LibRepository) -- The repository.
library (ManagedLib) -- The library.
get_library
name
repository
Gets all libraries with the specified name.
name (str) -- The name.
repository (LibRepository) -- The repository. If you pass None, all repositories are searched in order.
The found library.
get_all_libraries
repository_OR_exclude_shadowed_libs
This override is used when repository_OR_exclude_shadowed_libs is of type LibRepository.
Gets all libraries.
repository (LibRepository) -- The repository.
tuple <ManagedLib>
This override is used when repository_OR_exclude_shadowed_libs is of type bool.
Gets all libraries.
exclude_shadowed_libs (bool) -- If set to True, shadowed libs are excluded.
tuple <ManagedLib>
find_library
display_name
Finds the library with the specified display_name.
display_name (str) -- The display name to search for.
tuple <ManagedLib, LibRepository>
A python tuple containing the ManagedLib and the LibRepository, or None if nothing found.
class
ScriptLibManObject.
LibRepository
Bases: object
Description class for a library repository.
editable
Gets a value indicating whether this LibRepository is editable.
The default system library repository is not editable - that means, it cannot be removed from the list of repositories.
bool
True if editable, otherwise False.
name
Gets the name of the repository.
str
root_folder
Gets the root folder of the repository.
str
class
ScriptLibManObject.
ManagedLib
Bases: object
Description class for a managed library.
displayname
Display name.
str
company
Company.
str
title
Title.
str
version
Version.
Version
default_namespace
Default namespace.
str
dependencies
Gets the dependencies as a list of strings.
tuple <str>
categories
class
ScriptLibManObject.
LibCategory
Bases: object
Information about a library category.
guid
Gets the guid identifying the category.
Guid
parent
Gets the parent category, or None if the category is top level.
default_name
Gets the default name.
str
name
Gets the localized name, or the default name if no localized name is available.
str
localized_name
Gets the localized name for the current UI culture.
str
version
Version.
Version
class
ScriptLibManObject.
ScriptLibManObjectMarker
class
ScriptLibManObject.
ScriptLibManObject
Bases: ScriptLibManObject.ScriptLibManObjectMarker
Functionality for manipulating library managers.
All objects implementing LibManObject will be extended with this methods.
get_libraries
recursive=False
Returns a list of all libraries.
recursive (bool) -- If set to True, sublibraries are also queried recursively.
list <str>
The list of library names.
add_library
name_or_library
Adds the library with the specified name.
name_or_library (str or (from V3.5.5.0) ManagedLib) -- The name or (from V3.5.5.0) the library.
add_placeholder
name
default_resolution
Adds the placeholder for a library with the specified name.
name (str) -- The name.
default_resolution (str or (from V3.5.5.0) ManagedLib) -- The default resolution.
remove_library
name
Removes the librariy with the specified name.
name (str) -- The name.
references
Gets the collection of the references currently configured within this library manager.
3.5.5.0
class
ScriptLibManObject.
ScriptLibraryReferences
Bases: list
The references currently managed by the library manager.
class
ScriptLibManObject.
ScriptLibraryReference
Bases: object
A library reference in the library manager.
id
Id.
long
is_placeholder
Gets a value indicating whether this ScriptLibraryReference is a placeholder.
bool
True if it is a placeholder, otherwise False.
is_managed
Gets a value indicating whether this ScriptLibraryReference is a managed reference to a fixed library version.
bool
name
Gets the name of this library.
For managed items, this follows the pattern "Name, Version (Company)". For placeholder items, this name follows the pattern "#Name". See also: ScriptPlaceholderReference.placeholder_name.
str
namespace
Gets or sets the namespace for this library.
str
system_library
Gets a boolean value indicating whether this library is a system library or not.
System libraries have been added implicitly by plug-ins whereas non-system libraries have been explicitly added by the user.
bool
get_dependencies
Gets the dependencies of this library.
For libraries containing cyclic dependencies, this may lead to an endless recursion.
list <ScriptLibraryReference>
A list of dependencies.
parameters
Gets the library parameter set.
If a global variable list containing only constant values has the attribute 'parameterlist', its content may be modified in the referencing project using this mechanism.
hide_when_referenced_as_dependency
Gets or sets a value indicating whether this library node should be hidden in the user interface if it a direct or indirect dependency of a top-level library node.
bool
publish_symbols_in_container
Gets or sets the qualified-only flag.
If set, the name of the library is mandatory for any access to the library content.
The default is true.
bool
qualified_only
Gets or sets the qualified-only flag.
If set, the name of the library is mandatory for any access to the library content.
Defaults to True.
bool
optional
Gets or sets the optional flag.
Libraries which are optional are not reported to the user as missing if they do not exist.
bool
class
ScriptLibManObject.
ScriptManagedLibraryReference
Bases: ScriptLibManObject.ScriptLibraryReference
A managed library reference which points to a fixed version of the library.
ScriptLibraryReference.is_managed is true for those instances.
managed_library
Gets the managed library.
class
ScriptLibManObject.
ScriptPlaceholderReference
Bases: ScriptLibManObject.ScriptLibraryReference
A placeholder reference. :class`ScriptLibraryReference` instances with ScriptLibraryReference.is_placeholder == True implement this interface.
placeholder_name
Gets the name of the placeholder.
In contrast to ScriptLibraryReference.name, this name does not include the leading '#' character.
str
default_resolution
Gets or sets the default resolution of the library.
str
effective_resolution
Effective resolution.
str
is_redirected
Gets a value indicating whether this ScriptPlaceholderReference is redirected.
bool
get_redirection
Gets the redirection setting for this library.
str
The redirection.
set_redirection
fixed_resolution
Sets the redirection for this library.
fixed_resolution (str) -- The fixed resolution. Use None or an empty string to delete the redirection.
resolution_info
Gets a human readable information how this placeholder is resolved.
str
resolver_guid
Gets a machinable readable information how this placeholder is resolved.
Guid
class
ScriptLibManObject.
ScriptLibraryParameters
Bases: list
The library parameters interface. This is a sequence of the parameter names.
If a global variable list containing only constant values has the attribute 'parameterlist', its content may be modified in the referencing project using this mechanism.
class
ScriptLibManObject.
ScriptLibManObjectContainer
Bases: object
Projects and Application Objects are extended with this interface.
3.5.2.0
has_library_manager
Gets a value indicating whether this ScriptLibManObjectContainer has a library manager.
bool
True if there is a library manager, otherwise False.
get_library_manager
Gets the library manager for this application or project, implicitly creating one if none is existing yet.
The library manager object.