Mari Extension Pack Python API |
General information:
The following subclasses of the mari.ExtensionPack() class have been exposed.
Some classes contain subclasses such as "__epGUI__" for UI Calls and "__epSystem__" for less useful system calls
Use your Browsers built in search (F3) to search through this document.
Base Class & Alias:
The base class is mari.ExtensionPack(). An alias is defined as mari.ep()so
- mari.ep.nodegraphSelection.deselectAllNodes()
is the same as .. - mari.ExtensionPack.nodegraphSelection.deselectAllNodes()
Available Change Tags:
|
"Introduced" and "Modified" Tags
|
- EP6R1, EP6R1v2
- EP6R2, EP6R2v2
Classes |
- archive()
- autosave()
- bake()
- bakePoints()
- benchmark()
- brush()
- camera()
- channel()
- channelLayer()
- content()
- dev()
- dragAndDrop()
- exceptions()
- exportChannel()
- gizmo()
- help()
- history()
- hotbox()
- imageAnnotation()
- imageManager()
- layer()
- layout()
- lights()
- materialIngest()
- matrix()
- node()
- nodeLayout()
- nodeNavigation()
- nodeProperties()
- nodeStyle()
- nodeUtilities()
- nodegraph()
- nodegraphGrid()
- nodegraphPalette()
- nodegraphSelection()
- nodegraphStyle()
- object()
- ocio()
- patch()
- pinnedLayers()
- presetBrowser()
- project()
- project_paths()
- project_template()
- projectors()
- quickmarks()
- radioNodes()
- resources()
- selection()
- selection_group()
- shader()
- shaderPreset()
- shading()
- shelf()
- splashScreen()
- symmetry()
- text()
- toolbar()
- utils()
- version()
- view()
- web()
Class Description:
project archiving related tools
- archiveCurrentProject(path)
Archives the current project WHILE the project is open.
Arguments:
path (string): the target path (e.g. c:/temp/archive.mra)
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.archiveUpToDate(cur_project, outOfDate=False)
Sets the ArchiveUpToDate Metadata on a Project
Arguments:
cur_project (mari.project): a mari.Project
outOfDate (bool): Sets the 'Out of Date' Metadata to True of False
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.markProjectAsArchived(UUID)
Adds information about Archive Status and Archive Date to the Project Tooltip
and marks the Project Screenshot with a visual indicator
Arguments:
UUID (string): The UUID of the project to process
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Autosave related methods
- autosavePaused()
Returns True if autosave has been Paused, False otherwise
Returns:
(bool): True if autosave has been Paused, False otherwise
Introduced:
EP6R2v2
Modified:
EP6R2v2
- setPauseAutosave(state)
Pauses or unpauses autosave
Arguments:
state (bool): True if autosave should be paused, False if it should be unpaused
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Baking related methods
- refreshModoBakePresetsList()
refreshes the QComboBox inside the Modo Bake Palette
to reload Modo Bake Presets from all available locations
including locations set by the Environment Variable
MARI_MODO_BAKE_PRESETS
- __epGUI__.SubstanceAutomationBakeBridgeUI()
launch the Substance Baker Bridge UI
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addBakePresetsDefaultPaths()
Appends the Mari Extension Pack Modo Bake Presets
location to the MARI_MODO_BAKE_PRESETS Environment
variable path.
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.resetTemporaryPreferences()
When the Substance baker Bridge runs low on GPU Memory, we attempt
to free up memory by reducing Mari settings temporarily, while
the Baker Bridge Dialog is open.
After the Baker Bridge closes, the preferences are reset to their original values.
In order to account for any Mari crashes, we store the preferences
in a temporary file. Whenever Mari opens we check if the temporary file
still exists, indicating Extension pack wasn't able to reapply the settings
(e.g. the Baker Bridge or Mari crashed) and in this case we reapply them.
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Bake Point related methods
- bakeSelectedBakePoints()
Bakes all selected Bake Points in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- smartBakeHierarchy()
From the currently selected node upstream, refresh all bake points that are empty or out of date including in groups
Introduced:
EP6R1
Modified:
EP6R1
- useBake(bool)
EP DEPRECATION WARNING: This method is deprecated and will be removed in the future
`
Sets the "use Bake" checkbox in selected bake points to on or off
Arguments:
bool (bool): True/False
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Performance Optimization and Test Methods
- createTimer()
Creates a timer object that can be used to time operations.
Use as follows:
timer = createTimer()
timer.start()
print(timer.end())
Returns:
timerObject: a class for controlling a timer
------------------------------------------------------------------------------------------
Related Methods:
timer.start(): starts a timer
timer.end(): completes the previously started timer.
Returns a tuple (convertedTime,timeInSeconds)
------------------------------------------------------------------------------------------
Introduced:
EP6R2
Modified:
EP6R2
- getAverageFPS(wedgeCount=100000, ID=None)
Samples the average Viewport FPS.
The average is defined by the number of wedges
Arguments:
wedgeCount (int): The number of iterations to run.
Defaults to 100000
ident (string): Optional Identifier to store the FPS Count under.
Extension Pack uses this option to associate measured FPS
to preference combinations
Returns:
(float): Returns the average FPS on the canvas
Introduced:
EP6R2
Modified:
EP6R2
- gpuMemoryUsage(subtract_mari_usage=True)
Returns the total and free GPU memory.
On Windows the free GPU Memory is the currently free memory, on linux
if "subtract_mari_usage" argument is True, Mari's own memory usage is readded to the free memory.
This does not work on Windows.
Arguments:
subtract_mari_usage (bool): LINUX ONLY. Factors out Mari's own Memory Usage in the returned free Memory
Returns:
(list): (Total Memory in MB, Free Memory in MB)
Introduced:
EP6R2v2
Modified:
EP6R2v2
- ramMemoryUsage()
Returns the total and free RAM memory.
Returns:
(list): (Total Memory in MB, Free Memory in MB)
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Brush related methods
- toggleSteadyStroke()
Toggles the Steady Stroke Brush Otpion on and off
When toggling on, the last used Mode is restored.
Modes are stores per Tool
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setup_dynamic_brushsize(action_path=None)
Utility Function to setup the dynamic brushsize system
on Mari Startup
Class Description:
Camera/View related tools
- switch_to_ortho_view()
Switch the active tab to the Ortho View
Introduced:
EP6R1
Modified:
EP6R1
- switch_to_persp_view()
Switch the active tab to the Perspective View
Introduced:
EP6R1
Modified:
EP6R1
- switch_to_split_view()
Switch the active tab to the Split View
Introduced:
EP6R1
Modified:
EP6R1
- switch_to_uv_view()
Switch the active tab to the UV View
Introduced:
EP6R1
Modified:
EP6R1
- unproject_channel_to_imagemanager()
Unproject Channel to Image Manager tool
Introduced:
EP6R1
Modified:
EP6R1
- unproject_layer_to_imagemanager()
Unproject Layer to Image Manager tool
Introduced:
EP6R1
Modified:
EP6R1
- unproject_view_to_imagemanager()
Unproject View to Image Manager tool
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Channel related tools
- channelFromChannelNode(geo, channelNode)
Returns a mari.channel from a mari.bakePointNode (a channel node)
Arguments:
geo (mari.geoEntity): The geo to look for a channel
channelNode (mari.BakePoint): The channelNode
Returns:
mari.Channel or None: Returns a Mari Channel or None if nothing is found
Introduced:
EP6R1
Modified:
EP6R1
- createChannelFromUDIMTemplate()
EP DEPRECATION WARNING: This method is deprecated and will be removed in a future version
Create a new Channel with the UDIM Size Configuration
stored via channel_template_get
Introduced:
EP6R1
Modified:
EP6R1
- duplicate_channel()
Duplicate selected channel with all sharing intact
Introduced:
EP6R1
Modified:
EP6R1
- duplicate_nodeNetwork(geo, inputNode, inputNodeNodeGraph, StopAfterRadioNodes=True, RenameChannelIncremental=True, RenameChannel=False, newChannelName='Renamed Channel', offsetX=50, offsetY=50)
Duplicatas a Node Network such as a channel while cleanign up and rebuilding shared connections in the graph.
Please be aware the same method exists in the Nodegraph Class
Arguments:
geo (mari.geoEntity): Geo, inputNode lives on
inputNode (mari.Node): The node which to use as a base to duplicate the network
(upstream connections). Should be a channel node but doesn't have
to be
inputNodeNodeGraph (mari.Nodegraph): The Nodegraph the input Node belongs to
StopAfterRadioNodes (bool): If true (default value) connections upstream of a radio node will
not be duplicated and the original Radio Node Connection is
maintained if the first node upstream of a radio has connections
to other channels.
RenameChannelIncremental (bool): If true (default value) and the inputNode is a Channel, the
resulting duplicated channel will be renamed incrementally (1,2,3 etc.)
RenameChannel (bool): If RenameChannelIncremental=False and RenameChannel=True, and the inputNode
is a channel, the resulting duplicate channel will be renamed with the name
specified under newChannelName
newChannelName (string): if RenameChannel=True and the inputNode is a channel, the resulting
duplicate Channel will be renamed with this name
offsetX,offsetY (int): The offsetX and offsetY specify the offset of the duplicated nodes
from their original nodegraph position
Returns:
mari.Node(): Returns the new Node with intact connections
Introduced:
EP6R1
Modified:
EP6R1
- focusChannelContentInGraph(stopAfterRadios=False)
Selects the corresponding Nodes of a Channel in the Nodegraph and focuses the view on it
Arguments:
stopAfterRadios (boolean): If True, only nodes up to and including a radio node will be selected and focused.
Radio Node Connections will not be included. Default = False
Introduced:
EP6R1
Modified:
EP6R1
- focusChannelInGraph()
Selects the corresponding Node of a Channel in the Nodegraph and focuses the view on it
Introduced:
EP6R1
Modified:
EP6R1
- lockAllChannels()
Lock all Channels
Introduced:
EP6R1
Modified:
EP6R1
- lockChannel()
Lock a Channel
Introduced:
EP6R1
Modified:
EP6R1
- resizeChannelToUDIMTemplate(geo=None, channel=None)
EP DEPRECATION WARNING: This method is deprecated and will be removed in a future version
Sets the currently selected Channel to the UDIM resolutions
stored via channel_template_get.
geo and channel can optionally be supplied as arguments
Arguments:
geo (mari.geoEntity): Pass in the Geometry the Channel lives on. If None (default) the selected object is used
channel (mari.Channel): Pass in the Channnel to get the resolution off. If None (default) the selected channel is used
Introduced:
EP6R1
Modified:
EP6R1
- saveChannelUDIMTemplate(geo=None, channel=None)
EP DEPRECATION WARNING: This method is deprecated and will be removed in a future version
Samples the currently selected Channel and stores its resolutions per UDIM.
geo and channel can optionally be supplied as arguments
Arguments:
geo (mari.geoEntity): Pass in the Geometry the Channel lives on. If None (default) the selected object is used
channel (mari.Channel): Pass in the Channnel to get the resolution off. If None (default) the selected channel is used
Introduced:
EP6R1
Modified:
EP6R1
- syncCurrentChannel(sourceObject=None, targetObject=None, channelName=None)
Syncs the channel selection between objects
Arguments:
sourceObject (mari.geo): optional object to specify the source channel to sync with
targetObject (mari.geo): optional target object to sync the channel selection on. If None, all objects are synced
channelName (string): optional Channel Name to sync all objects with.
Introduced:
EP6R1
Modified:
EP6R1
- unlockAllChannels()
unlock all channels
Introduced:
EP6R1
Modified:
EP6R1
- unlockChannel()
Unlock a channel
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.channelsFromNode_UI()
Create Channels from a selected Node
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.create_packed_channel()
Launch Pack Channel UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.duplicateFlattenChannels()
Launches Duplicate/Flatten Channel Dialog
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Channel Layer related methods
- __epGUI__.channelLayer_AddLayer()
Launches the "Add Channel Layer" UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.channelLayer_AddLayerMask()
Launches the "Add Channel Mask" UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.channelLayer_AddMaskGroup()
Launches the "Add grouped Channel Mask" UI
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Install Content
- checkIfShelvesAreUpToDate(progressDialog=None)
Compares if Shelf Content is the latest and installs any new ones
Arguments:
progressDialog (obj): This allows you to pass in a progress dialog to be used.
If this is None it will spawn its own progress Dialog but otherwise
use the given one. This is to avoid progress Dialogs randomly open
and closing on EP Startup, when several things will be installed
Returns:
success (bool): Returns true if the checking process finished. It always returns True
and the return is just a method to have sequential processes running via
"if true" check.
progressDialog (obj): Returns the Progress Dialog used by this process. This can be exactly
the same progress dialog that was passed in via the Args or the new one
created by the process
Introduced:
EP6R1
Modified:
EP6R1
- installHDRIs(progressDialog=None)
Will install content to the Mari shelf under an "Environment Group"
1) Mari HDRIs will be installed in appropriate directories
2) Substance Painter common Install Locations will be checked and if found,
added to the Environment Image Path Preferences in Preferences / Paths
3) Additional HDRIs will be installed from any folder specified in Preferences / Paths / Environment
Arguments:
progressDialog (obj): This allows you to pass in a progress dialog to be used.
If this is None it will spawn its own progress Dialog but otherwise
use the given one. This is to avoid progress Dialogs randomly open
and closing on EP Startup, when several things will be installed
Returns:
success (bool): Returns true if the checking process finished. It always returns True
and the return is just a method to have sequential processes running via
"if true" check.
progressDialog (obj): Returns the Progress Dialog used by this process. This can be exactly
the same progress dialog that was passed in via the Args or the new one
created by the process
Introduced:
EP6R1
Modified:
EP6R1
- installMaterialPresets(closeDialogAfter=False)
Installs standard empty material presets to a new shelf.
This method is also called directly from the Mari Preferences when checking and unchecking
Material Presets. In these cases "closeDialogAfter" is set to True
Arguments:
closeDialogAfter (bool): If true the Progress Dialog that will spawn will be force closed and not passed onto other dialogs
Returns:
success (bool): Returns true if the checking process finished. It always returns True
and the return is just a method to have sequential processes running via
"if true" check.
progressDialog (obj): Returns the Progress Dialog used by this process. Please be aware of the
closeDialogAfter Argument, as the progress dialog might have been closed by
that argument and therefore None is returned
Introduced:
EP6R1
Modified:
EP6R1
- rendermanForMariInstalled()
Check if Renderman for Mari is installed
Returns:
(bool) True if Renderman for Mari is installed
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addMaterialTemplatePreferences()
Add Template Preferences to the Mari Preferences
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadMaterialTemplatePreference()
load the Material Template Preferences from the Config file
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadMaterialTemplatePreferenceFromEnvVar()
load the material template preferences from Env Variables
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveMaterialTemplatePreference()
Save the Material Template Preferences to the Config file
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
A number of tools and dialogs to
easily find classes, methods, actions and menu paths
- __epGUI__.action_finder()
Launches Dialog to search through Mari Actions
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.class_method_finder()
Launches Dialog to search through available classes and methods
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.menu_path_finder()
Launches Dialog to search through Mari Menu Paths
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.mimeTypeInspector()
A simpel dialog accepting Drag and Drop events and returning the Mime Type
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.node_path_finder()
Launches Dialog to search through available node paths. Requires open Project
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Drag and Drop Callback Related methods
- getLastLayerStackRefLayer()
Returns the Layer (mari.Layer) that was below
the last Drag & Drop Action to the Layerstack containing text/plain mime data
This is the positional Reference Layer that can be used
to set the position of a new layer object in the Target Layerstack
Returns:
mari.Layer: A Mari Layer Object
Introduced:
EP6R1
Modified:
EP6R1
- getLastLayerstackDropTarget()
Returns the last Layerstack (mari.Layerstack) that was the target
of the last Drag & Drop Action containing text/plain mime data
Returns:
mari.Layerstack: A Mari Layerstack Object
Introduced:
EP6R1
Modified:
EP6R1
- getLastNodegraphDropNodeGraph()
Returns the Nodegraph (mari.Nodegraph()) that was the target
of the last Drag & Drop Action containing text/plain mime data
Returns:
mari.NodeGraph: A Mari Nodegraph Object
Introduced:
EP6R1
Modified:
EP6R1
- getLastNodegraphDropPosition()
Returns the node graph position coordinates
from the last drag & drop action to the Nodegraph Palette
containing text/plain mime data
Returns:
QPointF: X and Y Position in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- resetLastDropTargets()
Resets/removes all saved data from the last dropactions.
This means the other methods of this class e.g. getLastLayerStackRefLayer()
will return None.
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.add_DragAndDrop_Callback_Preferences()
Adds Preferences to Mari Misc Preferences to turn Callbacks on and off
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.load_DragAndDrop_Callback_Preferences()
Loads Callback Preferences in Mari Misc Preferences from the config file
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.register_DragAndDrop_Callbacks()
Registers Extension Pack Callbacks for Drag and Drop
Mari 4.7 and higher only
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.register_PresetBrowser_DragAndDrop_Callbacks()
Registers Preset Browser Drag and Drop Actions
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.save_DragAndDrop_Callback_Preferences()
Saves Callback Preferences in Mari Misc Preferences to the config file
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Handles Extension Pack's Global Exception Logger
- getExceptionHandlerClass()
Returns Extension Pack's global Exception Handler that is attached to
sys.excepthook.
Whenever an exception occurs there are two class' internal signals emitted:
_exception_caught_log(str)
_exception_caught_raw(exc_type, exc_value, exc_traceback)
You can use the class to attach other uses to those signals.
The _exception_caught_log() signal is containing the log message that gets
written to Extension Pack's own Log Files under /Mari/Logs/, while the
_exception_caught_raw() contains the unaltered data from sys.excepthook
Please note, that Extension Pack's Exception Handler is set up in a way that it
still calls previous methods that were attached to sys.excepthook before Extension Pack
attached its own.
Whenever Extension pack's Exception handler gets triggered the previous Exception handler gets
called as well via
self.old_excepthook(exc_type, exc_value, exc_traceback)
If you want to completely prevent Extension Pack from registering its own excepthook, you can
set the Environment Variable MARI_EP_PREVENT_EXCEPTION_LOGGING. This will stop Extension Pack
from modifying sys.excepthook on startup.
Arguments:
None:
Returns:
class UncaughtHook(QtCore.QObject): The Extension Pack Exception Handler Class
Signals:
_exception_caught_log(str): The signal used by the Exception Handler Class to
write Messages to Extension pack's own log
_exception_caught_raw(o,o,o): The signal forwards the original data from sys.excepthook
e.g. exc_type, exc_value, exc_traceback
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Export related tools
- exportLast()
Runs the last Export from Export Custom Channel Selection
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportSelectedChannels()
Launches Export Custom Channel Selection Dialog with the
"Flattened" CHeckbox turned off
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportSelectedChannelsFlattened()
Launches Export Custom Channel Selection Dialog with the
"Flattened" CHeckbox turned on
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.restoreExportLastBehavior()
Sets the Checkbox for "Export Last" Patch Selection Behavior
back to the way it was when Mari was last opened
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setExportLastBehavior()
Sets the Checkbox for how "Export Last" is to deal
with Selected Patch Export - using the original selection
or the current one
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Gizmo methods
- __epGUI__.lauchMaskPresetUI(nodelist, ReplaceExisting=False, ForceConnectionDialog=False, parent=None)
Launches the Mask Preset Setup UI
scanning the nodelist for ports that can be setup.
This is the system used to auto setup Smart Masks.
Arguments:
nodelist (list): a list [] of mari.Node Objects
ReplaceExisting (bool): if the tool is executed with Replace Existing, it will replace existing connections
on a preset. Otherwise it will only create new connections on empty node ports
ForceConnectionDialog (bool): Usually a Connection Dialog won't be shown if the Tool finds all necessary channels
in your Project. Running it with ForceConnetionDialog=True will always show the
connection dialog
parent: The parent for the dialog. If left at None the parent will be the mari main window
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchMaskPresetUIPreferences()
Launches the Mask Preset Setup Preferences UI.
This is the system used to auto setup Smart Masks.
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchMaskPresetUI_BakingMode(parent=None)
Launches the Mask Preset Setup UI
This is the system used to auto setup Smart Masks.
In the Baking mode it doesn't require a node but shows Curvature Baking options
so users can create the frequently used channels without already having a preset
Arguments:
parent: The parent for the dialog. If left at None the parent will be the mari main window
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchMaskPresetUI_RefreshMode(nodelist, parent=None)
Launches the Mask Preset Setup UI
scanning the nodelist for ports that can be setup.
This is the system used to auto setup Smart Masks.
In the refresh mode all ports are considered even if they already have something
attached
Arguments:
nodelist (list): a list [] of mari.Node Objects
parent: The parent for the dialog. If left at None the parent will be the mari main window
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchMaskPresetUI_SelectedNodes(ReplaceExisting=False, ForceConnectionDialog=False, parent=None)
Launches the Mask Preset Setup UI
with the current Node Selection as processing base
This is the system used to auto setup Smart Masks.
Arguments:
ReplaceExisting (bool): if the tool is executed with Replace Existing, it will replace existing connections
on a preset. Otherwise it will only create new connections on empty node ports
ForceConnectionDialog (bool): Usually a Connection Dialog won't be shown if the Tool finds all necessary channels
in your Project. Running it with ForceConnetionDialog=True will always show the
connection dialog
parent: The parent for the dialog. If left at None the parent will be the mari main window
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Access to Help and Tutorials
- contactFoundrySupport()
Opens a webbrowser to the Foundry Support Portal
Introduced:
EP6R1
Modified:
EP6R1
- createSmartMaskProject()
Creates a Project with the Smart Mask Icon Geo and some Bakes
Introduced:
EP6R1
Modified:
EP6R1
- open_LogFile()
Opens the Mari Log File
Introduced:
EP6R1
Modified:
EP6R1
- open_MariUserSettingsFolder()
Opens the Mari User Settings Folder
Introduced:
EP6R1
Modified:
EP6R1
- open_online_help()
Launch Extension Pack Online Help
Introduced:
EP6R1
Modified:
EP6R1
- open_pyAPI_help()
Launch Extension Pack Local Py API Help
Introduced:
EP6R1
Modified:
EP6R1
- open_releaseNotes()
Launch the Release Notes
Introduced:
EP6R1
Modified:
EP6R1
- open_tutorials()
Launch Youtube Extension Pack Tutorials
Introduced:
EP6R1
Modified:
EP6R1
- send_bug_report()
Opens an email form to report an Extension Pack Issue
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.documentationEditor(noDialog=False)
The documentation editor runs over the documentation
and builds accordion style menus as well as replacing
header colors
Accordions are built based on the following syntax within the Online help.
The ids are used to generate unique items within the page that the stylesheet
can react to.
Example of an accordion with 2 tabs:
#--[ACC-START,UNIQUE_ID1,UNIQUE_ID2,Label]--#
#--[ACC,UNIQUE_ID1,UNIQUE_ID2,Label]--#
#--[ACC-END]--#
Example of an accordion with two tabs,expanded by default.
#--[ACC-START-EXPANDED,UNIQUE_ID1,UNIQUE_ID2,Label]--#
#--[ACC-EXPANDED,UNIQUE_ID1,UNIQUE_ID2,Label]--#
#--[ACC-END]--#
Arguments:
noDialog (bool): if True, the process runs with default settings
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.PyAPIHelpURL()
returns the local python help path
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.PythonAPI_HelpBuilder(TargetFolder='', CustomMarkerTargetUrl='extPack_PythonAPI_Doc.html', OnePagePerClass=False)
Builds an HTML Documentation of the Extension Pack Classes and Method
Arguments:
TargetFolder (string): The Target Folder to build the HTML Help in.
If left empty ('') the HTML Docs will be built under
Extension Packs /Tools/Help Folder
CustomMarkerTargetUrl (string): When building all of the HTML help within a single HTML page
the HTML Builder will add markers to each class and a link list
of classes linking to those markers at the top of the page.
The CustomMarkerTargetUrl is the Filename of the HTML Page
so the Anchor linking works (e.g )
OnePagePerClass (bool): If true, a single HTML page per class will be created.
If False (Default), then all classes will be documented within a single page
with a table of content at the top of the page.
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.activationIssuesHelp()
returns the URL to the steps to debug ativation issues
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.email()
Returns the Extension Pack Contact Email
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.facebook()
returns the online url to the Extension Pack Facebook Page
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.localWebServerFilePath()
Returns the path to the local webserver python script file
Returns:
string
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.onlineHelpBasePath()
returns the online help base domain (without HTML page)
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.onlineHelpURL()
returns the online help url
Returns:
string
Introduced:
EP6R1
Modified:
EP6R2
- __epSystem__.openResourceMoveTutorial()
Opens a tutorial in a web browser
how to move Extension Pack Resource Files
out of the Install Folder
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.openTdrTutorial()
Opens a tutorial in the webbrowser how to adjust TDR Values
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.releaseNotesURL()
returns the local release notes text file path
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.resourceMovingTutorialURL()
returns the online help URL to the Tutorial for moving Extension Pack
Resources out of the main folder
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.tdrTutorialURL()
returns the online help URL to the Tutorial for adjusting TDR Values
Returns:
string
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.twitter()
returns the online url to the Extension Pack Twitter Page
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.updateOnlineHelpBaseIdent()
This sets the global variable ONLINE_HELP_BASE_IDENT.
It parses the MARI_EP_HELP_LOCATION Environment Variable
first and if this one is empty/non-existent defaults
to what is defined in ONLINE_HELP_BASE
- __epSystem__.youtubeURL_AllTutorials()
returns the online url to the youtube playlist containing
all Extension Pack Tutorials
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.youtubeURL_VersionSpecificTutorials()
returns the online url to the youtube playlist containing
Extension Pack Tutorials for this particular Version
Returns:
string
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Undo Related Methods
- clearHistory()
Saves project and clears the history after a dialog asking to confirm
Introduced:
EP6R1
Modified:
EP6R1
- resumeHistory()
closes any active macro in case the history recordng has been interrupted due to a bug
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Hotbox related methods
- currentHotboxInstance()
Returns the currently open Hotbox Instance
Returns:
HotboxInstance or None: Gives the currently open Hotbox Instance.
Introduced:
EP6R1
Modified:
EP6R1
- showHotbox(path='', SubmenuBackLink=None, force=False, resetPosition=True)
General Method to launch a hotbox
Arguments:
path (str): The Path to the Hotbox Configuration Folder
SubmenuBackLink (str): The Path to the Hotbox Configuration Folder the Submenu should link back to
force (bool): Force Open a new Instance of the Hotbox
resetPosition (bool): Resrt the Cursor Position (Hotbox Center on Launch) to cursor position
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.hotboxManagerUI()
Launches the Hotbox Designer UI
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.installEPHotboxes()
Installs Extension Pack Hotboxes into the Hotbox Folder
if they don't exist yet/are the same version
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setupEPHotboxesOnStartup()
Sets up Extension Pack Hotboxes on Mari startup
in a way that I am removing pre existing mari hotkeys for certain actions
if they are mapped
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setupHotboxesOnStartup()
Sets up existing User Hotboxes on Mari startup
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Class to handle all aspects of sticky notes with images
- createNewImagNote(customPosition=None)
Creates a new visual note in the currently active graph
Arguments:
customPosition (QPoint): A custom position to create the node at. Otherwise
the nodegraph center of the active graph tab
Returns:
node (mari.Node): Returns the newly created Note or None
Introduced:
EP6R1
Modified:
EP6R1
- getImagePath(node)
Retrieves the image path from a visual Note
Arguments:
node (mari.Node): the node to get the image path from
Returns:
(string): the image path
Introduced:
EP6R1
Modified:
EP6R1
- getImageSize(imagePath)
Returns the image size of a given image on disc
Arguments:
imagePath (string): path to an image on dic
Returns:
(int),(int): Returns two integers (width,height) or None,None if path not found
Introduced:
EP6R1
Modified:
EP6R1
- getLastImageNote()
Returns the last created Visual Note.
This can be useful since certain actions internally create a new stickyNote
Returns:
(mari.Node): Returns a Mari Sticky Note or None
Introduced:
EP6R1
Modified:
EP6R1
- getProjectThumbnailPath()
Returns the path to the directory where image notes are saved.
The path is within the current project directory
Returns:
(string): Path to snapshot directory
Introduced:
EP6R1
Modified:
EP6R1
- imageNoteFromFile(filePath=None, initialScale='100%', forceNewNote=False, customPosition=None, colorizeImage=False, color=[255, 255, 255], blendMode='Multiply', stickyNoteToReplace=None)
Set a visual Note from an chosen file from disc.
If the action is performed with a sticky note selected and forceNewNote is False (Default)
the selected sticky note will be modified.
Otherwise a new sticky note will be created
if a filePath argument is given that path will be used,
otherwise a file dialog will be shown
Arguments:
filePath (string): An optional file path. If given no dialog will be shown
initialScale (string): A percentage as a string to set the new scale factor to.
Vaid strings are:
'5%' '10%' '20%' '30%' '40%''50%' '60%' '70%' '80%' '90%' '100%''110%'
'120%''130%''140%''150%''160%''170%''180%''190%''200%'
Defaults to 100%
forceNewNote (bool): Optional argument if to force a new Note at all times.
Defaults to False. If False a new note will only be created if no
existing visual Note is selected. Otherwise the existing one will be replaced.
customPosition (QPoint): An optional custom position for the node. This might be required because
the function internally replaces the original node.
While the original node position should be maintained, sometimes you might
want to specify a new position.
Default to None,which in turn will use the center of the current nodegraph tab
colorizeImge (bool): If True, allows you to colorize the Image before use. Defaults to False.
Coloriziation will be done within the Mari Project. E.g. if you supply an imagePath
in a Location outside of the Mari Project Cache, the file will be copied over to the
project and then colorized. The original file remains unchanged.
color (list): The color values to use when colorizeImage Parameter is true. Defaults to [255,255,255]
blendMode (string): The Blend Mode to use when colorizing an Image.
Available option are "Multiply","Soft Light","Screen","Overlay".
Defaults to "Multiply"
stickyNoteToReplace (mari.Node): If forceNewNote is False and a node is provided on this argument, the given node
will be replaced with a new image note
Returns:
(mari.Node): Returns a StickyNote
Introduced:
EP6R1
Modified:
EP6R1
- imageNoteFromNode(graph=None, nodelist=None)
Creates a visual note for given nodes by attaching a viewer to nodes
and placing the note directly next to the given node
If the graph and nodelist argument are None, then the currently open
graph tab and the selected nodes within it are used.
Arguments:
graph (mari.NodeGraph): A optional Mari Nodegraph to work with. Defaults to None.
If this is None, the currently open Nodegraph is used
nodelist (list): A list of nodes to process. Defaults to None.
If this is None, the selected Nodes of the currently open
Nodegraph are used.
The nodes of the given Nodelist need to be part of the
give graph (graph argument)
Introduced:
EP6R1
Modified:
EP6R1
- imageNoteFromView(scaleFactor='100%')
Creates a visual Note from the current viewport
If the action is performed with a sticky note selected
the selected sticky note will be modified.
Otherwise a new sticky note will be created
Arguments:
scaleFactor (string): A percentage as a string to set the default scale factor to.
Vaid strings are:
'5%' '10%' '20%' '30%' '40%''50%' '60%' '70%' '80%' '90%' '100%''110%'
'120%''130%''140%''150%''160%''170%''180%''190%''200%'
Defaults to 100%
Returns:
(mari.Node): Returns a StickyNote
Introduced:
EP6R1
Modified:
EP6R1
- nodeIsImageNote(node)
Returns True if the given Node is a visualNote
Arguments:
node (mari.Node): the node to test
Returns:
(bool): True if the Node is a visualNote
Introduced:
EP6R1
Modified:
EP6R1
- relinkImageNotePathToProject(node)
Relinks a path of a given visual note to the current projets
Visual Note Folder. If the file does not exist inside the folder
it will be copied.
Arguments:
(mari.Node): a mari Node of type Sticky Note
Introduced:
EP6R1
Modified:
EP6R1
- removeAllImageNotes(graph=None, silent=False)
will remove all visual Notes from the given Graph
If the Graph Argument is None (default),
the currenty active Graph Tab will be considered
Arguments:
graph (mari.Nodegraph): The mari.nodegraph to apply the action to.
Defaults to None, in which case the currenty active
graph tab will be considered.
silent (bool): if true, no warning dialog will be shown
Introduced:
EP6R1
Modified:
EP6R1
- setImageOnNote(stickyNote, imagePath, sizeX=512, sizeY=512)
Sets an image onto a sticky note.
Arguments:
stickyNote (mari.Node): A Mari Sticky Note
imagePath (string): Path to an image file
sizeX (int): An optional initial width for the image
sizeY (int): An optional initial height for the image
Returns:
(bool): Returns True if the action was successful
Introduced:
EP6R1
Modified:
EP6R1
- updateImagePath(node, newPath, original_path=None)
Replace the current stickyNotes image path with a new one
Arguments:
node (mari.Node): a mari sticky note
newPath (string): a path to an image on disc
original_path (string): Optional. The Original Path is the Path an image was import from on disc.
This acts like a fallback if the main path inside the Project no longer exists.
Added in EP 6R2v2. Defaults to None.
Introduced:
EP6R1
Modified:
EP6R2v2
- updateImageSize(node, newWidth=512, newHeight=512, customPosition=None)
Updates the given nodes core image size settng in the html attribute
Arguments:
node (mari.Node): a mari sticky note
newWidth (int): the new width of the image
newHeight (int): the new height of the image
customPosition (QPoint): An optional custom position for the node. This might be required because
the function internally replaces the original node.
While the original node position should be maintained, sometimes you might
want to specify a new position.
Default to None.
Returns:
mari.Node: Returns a sticky Note
Introduced:
EP6R1
Modified:
EP6R1
- updateScaleFactor(node, newFactorPercent, customPosition=None)
Updates a visual Notes "Scale Factor" Setting.
Please note, this internally creates a new instance of the stickyNote which
replaces the old given node
Arguments:
node (mari.Node): a mari sticky Note
newFactorPercent (string): A percentage as a string to set the new scale factor to.
Vaid strings are:
'5%' '10%' '20%' '30%' '40%''50%' '60%' '70%' '80%' '90%' '100%''110%'
'120%''130%''140%''150%''160%''170%''180%''190%''200%'
customPosition (QPoint): An optional custom position for the node. This might be required because
the function internally replaces the original node.
While the original node position should be maintained, sometimes you might
want to specify a new position.
Default to None.
Returns:
(mari.Node): Returns a StickyNote
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.closeIconShelfInstance()
Closes any Icon Shelf running in the Background
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.imageNoteFromCustomView()
Opens a snapshot dialog showing the current view and allowing
cropping and default scale factor
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchIconShelf()
Opens the icon shelf
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.resetIconShelfPositionAndSize()
Closes any currently active instance of the Icon Shelf
then resets the size and position to default
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.imageSizeChanged(name, value, node)
a signal connection when the image size dropdown in an image note gets triggered
Arguments:
name (string): A Metadata Name
value (variant): Metadata Value
node (mari.Node): The Mari Node that needs updating
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.inherit_image_from_backup(node)
If the main image does not exist we check the original import path of the image
and transfer it onto the node
Arguments:
node (mari.Node): A EP Image Note
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Image Manager related methods
- activateAutoReloadingOnSelectedImages()
Sets the Auto Reloading on selected images in the image manager
to on
Introduced:
EP6R1
Modified:
EP6R1
- cleanImageManager()
Checks if an Image is used in the project by comparing the Image Path
in the Image Manager to Image Path Metadata on all nodes in project
Introduced:
EP6R1
Modified:
EP6R1
- deactivateAllImageAutoReloading()
Sets the "Auto Reload" CHeckbox on all images in the Image Manager to "Off"
This is an action called from the Right Mouse Click Menu of the
Image Manager / Auto Reload Menu
Introduced:
EP6R1
Modified:
EP6R1
- deactivateAutoReloadingOnSelectedImages()
Sets the Auto Reloading on selected images in the image manager
to off
Introduced:
EP6R1
Modified:
EP6R1
- disableReferenceImage_onSelectedImages()
Disables the IsReferenceImage Checkbox on selected images
Introduced:
EP6R1
Modified:
EP6R1
- enableImageAutoReloadOnImageManagerFiles(imageList=None)
Enables the "Auto Reload" behavior on loaded Images Manager Images
Arguments:
imageList (list): an optional list of images to limit the auto reload metadata additon to
Introduced:
EP6R1
Modified:
EP6R1
- enableReferenceImage_onSelectedImages()
Enables the IsReferenceImage Checkbox on selected images
Introduced:
EP6R1
Modified:
EP6R1
- findImage(filePath, is_raw=None, is_scalar=None)
Checks if a given filepath is already imported into the Image Manager with optional checks for
raw and scalar mode
Arguments:
filePath (str): path to an image file
is_raw (bool): Optional. If the files colorspace config should be RAW
is_scalar (bool): Optional. If the files colorspace config should be Scalar
Returns:
mari.Image: Returns the mari.Image Object or None if not found
Introduced:
EP6R2v2
Modified:
EP6R2v2
- openImageInApplication(applicationExecutable)
Opens the last selected image in the application provided
Arguments:
applicationExecutable (str): A path to an executable appliction
Introduced:
EP6R1
Modified:
EP6R1
- openImageInDefaultApplication()
Opens the last selected image in the default application
associated with the image format
Introduced:
EP6R1
Modified:
EP6R1
- openImageInFileBrowser()
Opens the last selected image in your OS Filebrowser
Introduced:
EP6R1
Modified:
EP6R1
- rasterizeVectorImage(filePath, colorSpaceConfig, size)
Imports an SVG file into the Image Manager, rasterized at a given
size
Arguments:
filePath (str): path to a .svg file on disc
colorSpaceConfig (mari.ColorspaceConfig): The Colorspace Config File to use for opening
size (tuple): A tuple defining width and height of the final
rasterized vector image
Returns:
mari.Image: Returns the mari.Image Object added to the Image Manager
Introduced:
EP6R2
Modified:
EP6R2
- reloadImage(imageObject)
Reloads a given image Object.
Returns the image object
Arguments:
imageObject: the mari.image object to reload
Returns:
mari.Image: the new image object
Introduced:
EP6R1
Modified:
EP6R1
- reloadSelectedImages(svgMode=False)
Reloads selected images in the image manager from disc and updates
their occurences inside of the project (tiled, triplanar etc.)
Arguments:
svgMode (bool): Optional. If True and the selected File originates from a
.svg file (as detected by metadta "svgSourceFile"
a dialog will spawn to be able to chnage the resolution
of the rasterized image. If False (default) the svg file
will be reloaed at previous resolution.
Argument Has no effect on other file formats.
Introduced:
EP6R1
Modified:
EP6R2
- reloadSelectedSVGFiles()
Reloads selected images in the image manager from disc and updates
their occurences inside of the project (tiled, triplanar etc.).
If the selected file originates from an SVG File a dialog will prompt for the new resolution
Introduced:
EP6R2
Modified:
EP6R2
- removeImageManagerTabs()
Removes all User created Image Manager Tabs
Introduced:
EP6R1
Modified:
EP6R1
- setAutoReloading_onSelectedImages(mode)
Sets the Auto Reloading on selected images in the image manager
to on or off
Arguments:
mode (bool): True/False to enable/disable the Auto Reload
Introduced:
EP6R1
Modified:
EP6R1
- useImageAsBrushtip()
Uses the currently selecte image as the brushtip on the current tool
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.configureApplications()
Launch UI to configure Applications to open images in
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportSelected()
Export the selected images in the image manager to a folder
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.svgRasterizer(filePath, originalImage=None, noCancel=False)
Opens a SVG Rasterization Dialog
Arguments:
filePath (str): a path to a svg file
originalImage (mari.image): a mari image object to replace (optional, defaults to None)
noCancel (bool): if True, the Cancel Button in the SVG Loader is disabled
Returns:
mari.Image: a rasterized Mari Image Object
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.addImageManagerDefaultApplications()
Adds some standard applications (Photoshop,Krita) to the list of application
available in "Open with" if found on your sytem
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.connectSVGLoader()
Creates a Signalo Connection to mari.images.imageLoaded(),
testing the file format of loaded images.
If a .svg file is loaded a dialog will spawn with rasterizaton
options
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.disableAllImageAutoReloadingOnProjectClose()
Removes all paths in the "File Change Watcher" so no
image changes are detected anymore
This is usually only called once a project is closed. For individual
turning off of the feature on selected images, you can use deactivateAutoReloadingOnSelectedImages()
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.disconnectSVGLoader()
Disconnects Signal Connection to mari.images.imageLoaded(),
testing the file format of loaded images for .svg files
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Layer related methods
- addMask(mode)
The Add Mask Tools in Extension Pack are replacements for the existing Mari Add Mask functionality
Reveal All
Hide All
From Alpha
From Selection
From Selection Group
They act identical to the default Mari functionality in most cases however the Add Mask Tools
will no longer be disabled/greyed out when a mask or mask stack already exists on the layer
When executed on a layer with a pre-existing mask, the mask will be removed and a new one added
depending on the tool executed
When executed on a layer with a pre-existing mask stack, the mask stack will be removed and a new one added
depending on the tool executed
Arguments:
mode (str): available options are "reveal","hide","from Alpha","from Selection","from Selection Group"
Introduced:
EP6R1
Modified:
EP6R1
- cloneMergeSelectedLayers()
Executes layer Clone & Merge
Introduced:
EP6R1
Modified:
EP6R1
- convertToPaintable()
Extension Pack Version of standard Mari Layer Convert to Paintable
Supports multi selection and channel layers
Introduced:
EP6R1
Modified:
EP6R1
- copyLayerAttributes()
Copies selected Layer Attributes to a Clipboard
Introduced:
EP6R1
Modified:
EP6R1
- copyWithShared()
Executes "Copy with Shared Connections"
Shared Layers will always be relinked to their original source,
including in Mask Stacks
Pasted Channel Layers will be relinked to the original channel,
without unnecessary channel duplication
Introduced:
EP6R1
Modified:
EP6R1
- findActiveLayerSelection(includeAdjustmentStacks=True, includeMaskStacks=True, includeGroupLayers=True, includeChannelLayers=True, silentFail=False)
The following are used to find layerselections no matter where in the Mari Interface
(Floating Palettes, Mask Stacks etc.)
This is to support a) Layered Shader Stacks b) deeply nested stacks (maskstack,adjustment stacks),
as well as cases where users are working in pinned or docked channels without it being the current channel
Arguments:
includeAdjustmentStacks (bool): Determines if to include this StackType into the search
includeMaskStacks (bool): Determines if to include this StackType into the search
includeGroupLayers (bool): Determines if to include this StackType into the search
includeChannelLayers (bool): Determines if to include this StackType into the search
silentFail (bool): If true, no warnings are returned if nothing is found
Returns:
curGeo: The current Geo or NONE
curChannel: The current Channel or NONE
curStack: The current Layerstack (NOT the same necessary as the channel) or NONE
curLayer: The 'current' layer as in the current paint target or NONE
curSelList: A list of all selected layers or NONE
Introduced:
EP6R1
Modified:
EP6R1
- layerCopy()
Standard Mari Layer COPY Action,however since extension pack
moves the action in the UI it is declared here again
Introduced:
EP6R1
Modified:
EP6R1
- layerCut()
Standard Mari Layer CUT Action,however since extension pack
moves the action in the UI it is declared here again
Introduced:
EP6R1
Modified:
EP6R1
- layerPaste()
Standard Mari Layer PASTE Action,however since extension pack
moves the action in the UI it is declared here again
Introduced:
EP6R1
Modified:
EP6R1
- pasteLayerAttributes()
paste Layer Attributes onto selected layer from a Clipboard
Introduced:
EP6R1
Modified:
EP6R1
- pasteWithShared()
Executes "Paste with Shared Connections"
Shared Layers will always be relinked to their original source,
including in Mask Stacks
Pasted Channel Layers will be relinked to the original channel,
without unnecessary channel duplication
Introduced:
EP6R1
Modified:
EP6R1
- toggleSelectionLock()
toggles the locking of selected layers
Introduced:
EP6R1
Modified:
EP6R1
- toggleSelectionVisibility()
toggles the visibility of selected layers
Introduced:
EP6R1
Modified:
EP6R1
- toggleUnselectedLock()
toggles the locking of unselected layers
Introduced:
EP6R1
Modified:
EP6R1
- toggleUnselectedVisibility()
toggles the visibility of unselected layers
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.swapLayerType()
Dialog Call.
Allows you to swap out any Layer type for another Layer type.
If possible, settings are transfered between nodes
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
View Layout related methods
- loadLayoutFromPath(Path, LayoutName=None)
Load an mws layout file from a given path.
Arguments:
Path (string): The Path to a mws layout file or folder where a mws layout file is located.
LayoutName (string): Optional Argument. The Layout File Name without extension.
This is required if the Folder the file sits in is named differently then the Layout file
Introduced:
EP6R1
Modified:
EP6R1
- restoreDefaultLayout()
Restore the Mar Default Layout
Introduced:
EP6R1
Modified:
EP6R1
- saveLayout(layoutName, Description='')
Saves a layout to the folder specified in Mari Preferences / Path / Layout Tab.
Also adds the layout to View / Saved Layouts Menu
Arguments:
layoutName (string): The name of the layout
Description (string): An Optional Description. Defaults to ""
Returns:
(string): Returns a cleaned Layoutname, that has been sanitized from invalid characters
Introduced:
EP6R1
Modified:
EP6R1
- setLayoutFolderPreference(path)
Sets the Layout Folder in the Preference.
This is the location where layouts are loaded from.
Arguments:
path (string): A path where Layouts should be stored
Returns:
bool: True if path could be set
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationHorizontal()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationSplitBottom()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationSplitLeft()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationSplitRight()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationSplitTop()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- setPaletteOrientationVertical()
Set the Preference Window Corner Dock Areas to a value
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportLayout()
Export a Layout to Disc via a File Dialog
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.importLayout()
Import a Layout from Disc via a fileDialog
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.layoutManager()
Open the Layout Manager UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.saveLayoutUI()
Open a dialog to specify a name and description for a layout.
The Layout gets saved into the location specified in Mari Preferences / Path / Layout
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addLayoutFolderPreference()
Adds Preferences to the Mari Preference Dialog
to set a Path where Layouts should be stored
/Preferences/Paths/Layouts
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadLayoutFolderPreference()
Load theLayout Preference Path from the config
and set it in the /Preferences/Paths/Layouts
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.reinstallCustomUIElements()
Readds custom UI Elements previously added by EP on Startup
(View / extPack_layoutChange)
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.restoreSavedLayouts()
Restores all previously saved layouts to Menu
View / Saved Layouts. This is called on Mari Open
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveLayoutFolderPreference()
Saves the layout Folder to the config
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Light related methods
- rotateEnvironmentLight(mode, multiplier)
Rotates the Environment Light.
Mode is either "slow","medium" or "fast"
The multiplier is usually 1 or -1 to rotate clockwise or
counterclockwise
Arguments:
mode (string): The mode determines the rotation angles per step as defined in the Mari Preferences
Options are "slow","medium","fast"
multiplier (int): The Multiplier defines the direction of rotation .. clock wise or counter-clockwise.
Usual settings are 1 for clockwise, -1 for counter clockwise
Introduced:
EP6R1
Modified:
EP6R1
- rotateLightsByAngle(angle=1)
Rotate all lights byt he given angle
Arguments:
angle (int) angle to rotate by
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createEnvLightPreference()
Adds ENV Light Rotation Settings to the Preferences
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveEnvLightPreference()
Saves the Setting of the ENV Light Rotation in the Preferences
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Methods to deal with Material Ingestion from Images
- __epGUI__.ingestImageManagerImagesIntoLayer()
Ingests the currently selected image manager images into the active layer
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.ingestImageManagerImagesIntoNode()
Ingests the currently selected image manager images into the active node
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchMaterialIngester()
A wrapper around the standard mari material ingester.
All it does is turn the ingester into a mari action to be able
to get its action.triggered() signal
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addEPNodes_to_MaterialIngester()
Adds Extension Pack Nodes with Image Attributes to the list of compatible nodes in
the Mari Material Ingester
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addEPPresets_to_MaterialIngester()
Adds Material Preset to the Material Template History Dropdown
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Matrix related methods
- decomposeMatrix(matrix)
Returns the Translation,Scale and Rotation Values from a given Matrix
Arguments:
matrix (mari.Matrix): a Mari Transform Matrix
Returns:
Tuple: a tuple comprised of 3 sets of:
( Scale X, Scale Y, Scale Z)
( Angle X, Angle Y, Angle Z)
( Translation X, Translation Y, Translation Z)
Introduced:
EP6R2v2
Modified:
EP6R2v2
- decomposeMatrixEulerAngles(matrix)
Returns the Rotation Values from a given Matrix
Arguments:
matrix (mari.Matrix): a Mari Transform Matrix
Returns:
Tuple: a tuple of 3 values corresponding to X,Y and Z
Introduced:
EP6R2v2
Modified:
EP6R2v2
- decomposeMatrixScale(matrix)
Returns the Scale Values from a given Matrix
Arguments:
matrix (mari.Matrix): a Mari Transform Matrix
Returns:
Tuple: a tuple of 3 values corresponding to X,Y and Z
Introduced:
EP6R2v2
Modified:
EP6R2v2
- decomposeMatrixTranslation(matrix)
Returns the Translation Values from a given Matrix
Arguments:
matrix (mari.Matrix): a Mari Transform Matrix
Returns:
Tuple: a tuple of 3 values corresponding to X,Y and Z
Introduced:
EP6R2v2
Modified:
EP6R2v2
- invertMatrix(matrix)
Return the Inverse Matrix
Arguments:
matrix (list, 16 items): A transform matrix (4x4) as a list
Returns:
Matrix (4x4): A inverted Transform Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- matrixFromVectors(rotation=(0, 0, 0), translation=(0, 0, 0), scale=(1, 1, 1))
Creates a 4x4 Matrix from given Vectors
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Use toScaleEulerAnglesTranslationMatrix() instead
Arguments:
rotation (List): A list of 3 values XYZ
translate (List): A list of 3 values XYZ
scale (List): A list of 3 values XYZ
Returns:
Tuple: a list of 16 items that can be fed into a mari.Matrix
Introduced:
EP6R1
Modified:
EP6R1
- objectTransformToWorldSpaceMatrix(object_scale, object_angles, object_translation)
Convert Object Space XYZ Values for scale, angles and translation to World Space Matrix
Arguments:
world_scale (list): List of 3 floats, X, Y, Z, representing scale in world space
world_angles (list): List of 3 floats, X, Y, Z, representing rotation in world space
world_translation (list): List of 3 floats, X, Y, Z, representing translation in world space
Returns:
Matrix (4x4): A World Space Transform Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- setTransform(obj, transform_matrix, clock_frame=0)
This method is a stable workaround for mari's buggy
- geoEntity.setTransform(matrix, clockframe)
- locatorEntity.setTransform(matrix, clockframe)
methods. When using mari's native methods the object receives updated transforms however the next time
the user interacts with the Object outside of python via the "Transform Selected Object" Tools, the
Python changes are discarded.
The reason for this is that the setTransform() methods do not update metadata on the active object related
to the Viewport Gizmo:
The following Metadata exists:
LocatorScale
LocatorTranslation
LocatorRotation
Each one of those accepts a string version of a custom matrix, e.g. LocatorScale needs to be given a pure Scale
Matrix.
This method first runs a regular setTransform() with the provided transform_matrix, then handles the metadata.
Arguments:
obj (mari.geoEntity or locator): The Mari Geo or Locator to apply transforms to
transform_matrix (Matrix): The Full 4x4 Transformation Matrix to apply to the Object
clock_frame (int): Optional. Frame to apply Transform to. Defaults to 0
Returns:
None:
Introduced:
EP6R2v2
Modified:
EP6R2v2
- toEulerAnglesMatrix(values)
Returns a Euler angle Matrix from given Scale X,Y,Z Values
Arguments:
values (tuple): a tuple (x,y,z)
Returns:
mari.Matrix: A Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- toScaleEulerAnglesTranslationMatrix(scale, angles, translation)
Returns a 4x4 Transform Matrix
Arguments:
scale (tuple): a tuple (x,y,z) for scale values
angles (tuple): a tuple (x,y,z) for rotation values
translation (tuple): a tuple (x,y,z) for translation values
Returns:
mari.Matrix: A Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- toScaleMatrix(values)
Returns a Scale Matrix from given Scale X,Y,Z Values
Arguments:
values (tuple): a tuple (x,y,z)
Returns:
mari.Matrix: A Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- toTranslationMatrix(values)
Returns a Translation Matrix from given Scale X,Y,Z Values
Arguments:
values (tuple): a tuple (x,y,z)
Returns:
mari.Matrix: A Matrix
Introduced:
EP6R2v2
Modified:
EP6R2v2
- worldToObjectTransform(world_scale, world_angles, world_translation)
Convert Worldspace XYZ Values for scale, angles and translation to Object Space
Arguments:
world_scale (list): List of 3 floats, X, Y, Z, representing scale in world space
world_angles (list): List of 3 floats, X, Y, Z, representing rotation in world space
world_translation (list): List of 3 floats, X, Y, Z, representing translation in world space
Returns:
object_scale (list): List of 3 floats, X, Y, Z, representing scale in object space
object_angles (list): List of 3 floats, X, Y, Z, representing rotation in object space
object_translation (list): List of 3 floats, X, Y, Z, representing translation in object space
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Node methods contain all methods that make changes to a node or sample info
- channelsNodeBelongsTo(node_to_find, geo, excludeChannelLayer=True)
Returns a Dictionary of Channels [UUID:CHANNEL]
that a given node belongs to
Arguments:
node_to_find (mari.Node): A Node (mari.Node) you want to determine which channel(s) are using it
geo (mari.geoEntity): Which Object in your scene you want to check for channels
excludeChannelLayer (bool): If true only Channels will be returned that use the node in their own channel stream
but not as part of a 'channel layer' stream
Returns:
{dict}: Returns a Dictionary of Channels with key= ChannelUUID, value=ChannelObject
Introduced:
EP6R1
Modified:
EP6R1
- connectNodeToLastNode(overwriteExistingConnections=False)
will connect the currently selected node to the previous selected node
Repeated execution of the command will cycle the connection through the
inputs of the currently selected node
Arguments:
overwriteExistingConnections (bool): Determines if the connection overwrites existing connections
from other nodes. If True, the previous node will replace
the existing node connection on a port, if false, it will
find the first empty input port to connect to
Introduced:
EP6R1
Modified:
EP6R1
- copyNodeConnections(nodeToCopyFrom, nodeToCopyTo, RemoveSourceNode=False)
Copies Input and Output Connections fromt the Source Node to the Target Node
Arguments:
nodeToCopyFrom (mari.Node): The source node from which to copy connections
nodeToCopyTo (mari.Node): The target node to which to copy connections
RemoveSourceNode (bool): If to remove the source Node after copying. Defaults to False
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- current(returnFirstSelectedNode=True)
Convenience method to get the current node selection.
Returns the first selected node or all selected nodes of the current nodegraph
Arguments:
returnFirstSelectedNode (bool): if True, only the first selected node is returned
Returns:
(list): The list of selected Nodes if returnFirstSelectedNode is False
(mari.Node): The first selected Node if returnFirstSelectedNode is True and a Node is selected
None if no node is selected.
Introduced:
EP6R1
Modified:
EP6R1
- disconnectAllInputConnections(nodelist=None)
Disconnects all node connections feeding into the given nodes.
If no nodes are specified in the argument, the selected nodes are used instead
Arguments:
nodelist (list): Optional. A List of Mari Nodes to run the command on.
Defaults to None. If None, the selected Nodes will be used instead
Introduced:
EP6R1
Modified:
EP6R1
- disconnectAllOutputConnections(nodelist=None)
Disconnects all node connections feeding out of the given nodes.
If no nodes are specified in the argument, the selected nodes are used instead
Arguments:
nodelist (list): Optional. A List of Mari Nodes to run the command on.
Defaults to None. If None, the selected Nodes will be used instead
Introduced:
EP6R1
Modified:
EP6R1
- findConnectedNodeOutput(graph, node_to_find, skipDots=False, SpecificOutput=None)
Returns the Nodes that are connected to the Output of the supplied Node
With Skip Dots turned on, the return will contain the node connected to a dotNode
if there is one inbetween
Please note as of Mari 4.5 there is additional standard Python API mari.node().outputNodes()
that may be better suited for the task in some cases
Arguments:
graph (mari.nodeGraph): The Graph to search in
node_to_find (mari.Node): The node you want to check for, which other nodes are connected to
its output(s)
skipDots (bool): If to ignore dot nodes as output and proceed to next node
specificOutput (string): If to check a Specific Output Port Name of node_to_find
Returns:
(list): A list of pairs ([mari.Node,Output Port Node is connected to on node_to_find)
Introduced:
EP6R1
Modified:
EP6R1
- getAllNodesConnectedToNode(targetNode, nodeGraph, GroupContentMode='Include Group Node Contents', returnBakePointUpstream=True, includeTargetNode=True, GraphGroup_TraverseConnectedOutputOnly=False, MainGraph_TraverseStreamOnly=False, IncludeGraphGroupNode=False, IncludeMaterials=False, StartStream=None)
Given a Target Node (and the nodeGraph it lives in) this will return all Nodes
that are connected to the targetNode + optionally targetNode again as well.
Arguments:
targetNode (mari.Node): The Node you want to find all connected nodes for
nodeGraph (mari.nodeGraph): The Nodegraph the targetNode lives in
GroupContentMode (str): If "Include Group Node Contents" all Nodes inside of Graph Groups will be returned as well.
Otherwise just the nodes fromt he target Node Nodegaph will be returned
returnBakePointUpstream (bool): If "False" nodes upstream from bake points will only be returned if the bake point
is disabled or does not useBake(). If "True" all nodes upstream of Bakepoints will be returned
includeTargetNode (bool): If "True" the given targetNode will be includes in the returned list
GraphGroup_TraverseConnectedOutputOnly (bool): If 'True' and GroupContentMode = Inlcude Group Node Content,
only group content will be evaluated that is connected to an output that
is part of the topological sorting of the main input node given to the function
MainGraph_TraverseStreamOnly (bool): If 'True' the given Nodegraph will only return upstream nodes that are part of the
specified StartStream. The StartStream will only be evaluated from the first MultiChannel
Node onwards, before that all upstream nodes are included
IncludeGraphGroupNode (bool): If True Graph Group Nodes are included in the returned Node List. Otherwise only the
CONTENTS of the Graph Group Nodes are returned (given that groupContentMode is set to
'Include Group Node Contents')
If IncludeGraphGroupNode is False and includeMaterials is True, normal GraphGroups
are not returned while material multiChannels nodes are returned.
IncludeMaterials (bool): If True Material MultiChannelNodes are included. This will include Materials even if
IncludeGraphGroupNode is off
StartStram (string or None): Optionally, you can provide a stream name to evaluate along. You should have
GraphGroup_TraverseConnectedOutputOnly turned on for this
Returns:
(list): A list of nodes (mari.Node)
Introduced:
EP6R1
Modified:
EP6R1
- getNodeCategory(node)
Returns the Node Category of a Node, as it is listed in the UI
Arguments:
node: A Node Object (mari.Node)
Returns:
(string): Returns the Node Category as a String
Introduced:
EP6R1
Modified:
EP6R1
- getNodeMaterialStreamName(graph, inputNode)
If the given inputNode is part of a node stream that has multiChannel Nodes,
this method will return the Material Stream Name this Node is part of. E.g. 'Base Color', 'Metallic' etc.
This can the be used in other methods to filter nodestreams based on stream name e.g. in
mari.ExtensionPack.nodegraph.getNodesonStream()
Arguments:
graph (mari.NodeGraph): The Graph the inputNode belongs to
inputNode (mari.Node): The Node to test for a stream name
Returns:
(bool): Returns True if the Node is part of a Material Stream, False if not
(string): Returns the Stream Name if Node os part of a Material Stream, 'None' (as string) if not
Introduced:
EP6R1
Modified:
EP6R1
- getNodePosition(graph, node)
Returns the Node Position as a list and a string
Arguments:
graph: The nodegraph the node belongs to (mari.NodeGraph)
node: A Node Object (mari.Node)
Returns:
(list): Returns a list with the coordinates [x,y]
Introduced:
EP6R1
Modified:
EP6R1
- getNodePrettyName(node)
Returns the pretty Name of a Node, as it is listed in the UI
Arguments:
node: A Node Object (mari.Node)
Returns:
(string): Returns a String
Introduced:
EP6R1
Modified:
EP6R1
- inputNode(node, nodeport)
A wrapper method around mari.node.inputNode() to deal with differences
between mari versions.
The method will return pairs of [inputNode,outputPortOnInputNode] for mari 4.5
and above and [inputNode,''] for versions below mari 4.5
Arguments:
node: The node to check for connections on (mari.Node)
port: The Input Port Name to check for connections (string)
Returns:
(list): Returns a list with the pair [inputNode, outputPortOnInputNode]
Introduced:
EP6R1
Modified:
EP6R1
- moveNodesToPosition(graph, nodes, positionList)
Moves Nodes to a specific position
Arguments:
graph: The nodegraph the node belongs to (mari.NodeGraph)
nodes: A list of mari nodes
positionList: A list of coordinates [x,y]
Returns:
(list): Returns a list of mari.Nodes
Introduced:
EP6R1
Modified:
EP6R1
- nodeName(node)
Wrapper for differences in node name functions between Mari 4.x and Mari 4.8
Arguments:
node (mari.Node): The Node to get the name from
Returns:
(string): The Node name
Introduced:
EP6R1
Modified:
EP6R1
- reloadSelected_PaintAndImages(silent=False)
Reload Paint and Images will work on the current Nodegraph's Node Selection. It will
a) reload Paint Nodes with Images according the the per-Image-in-Imageset Path
b) reload any image manager nodes used in selected nodes
c) re-export and reload Bake Point Image Data
Arguments:
silent (bool): if silent is True, no message boxes will appear asking to confirm. Defaults is False
Introduced:
EP6R1
Modified:
EP6R1
- saveNodeAttributes(selectedNode)
Save the given Nodes Node Attributes to a File
Similar to what is in the Nodepgraph Class, but this one can use a given node instead of a selection
Arguments:
selectedNode (mari.Node): A Mari Node
Introduced:
EP6R1
Modified:
EP6R1
- setInputNode(node, portname, NodeToConnect, OutputPortName='')
A wrapper method around mari.node.setInputNode() to deal with differences between mari versions.
The method allows the same code for both Mari 4.5+ and below
On mari 4.5+ this supports multiOutput Nodes, below it doesn't so the OutputPortName is ignored then.
Arguments:
node: The node to connect something to (mari.Node)
portname: The Input Port Name to connect something to (string)
NodeToConnect: The Node to Connect to the Port
OutputPortName: The OutputPort of the NodetoConnect to connect to
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- setNodeAttributes(selectedNode)
Apply a saved set of Node Attributes the given Node
Similar to what is in the Nodepgraph Class, but this one can use a given node instead of a selection
Arguments:
selectedNode (mari.Node): A Mari Node
Introduced:
EP6R1
Modified:
EP6R1
- setNodeName(node, newName)
Wrapper for differences in node name functions between Mari 4.x and Mari 4.8
Arguments:
node (mari.Node): The Node to set a new name on
newName (string): The new Node name
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- smartRenameNode(graph, node)
Smart rename Nodes. Renames node based on upstream connection
Arguments:
graph (mari.Nodegraph): A mari Nodegraph obkect
node (mari.Node): Node to rename
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Nodegraph Node Layout and Distribution Methods
- alignNodes_HorizontallyBottom(nodelist=[], defaultToSelection=True, streamBased=True, preventAnimation=False)
Align nodes horizontally Bottom
Requires Mari 4.7 or higher
Arguments:
nodelist (list): A list of Mari Nodes. If not provided defaults to selected nodes
defaultToSelection (bool): If true and nodelist is empty, the graph selection will be used
streamBased (bool): If true (default), nodes will be aligned based on their node streams.
This means nodes of a stream will align to the bottom position of the node
with the highest Y coordinate in your selection, that shares the same neighbouring nodes.
preventAnimation (bool): If true, nodes will directly jump to a position instead of having animated movement
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- alignNodes_HorizontallyTop(nodelist=[], defaultToSelection=True, streamBased=True, preventAnimation=False)
Align nodes horizontally top
Requires Mari 4.7 or higher
Arguments:
nodelist (list): A list of Mari Nodes. If not provided defaults to selected nodes
defaultToSelection (bool): If true and nodelist is empty, the graph selection will be used
streamBased (bool): If true (default), nodes will be aligned based on their node streams.
This means nodes of a stream will align to the top position of the node
with the highest Y coordinate in your selection, that shares the same neighbouring nodes.
preventAnimation (bool): If true, nodes will directly jump to a position instead of having animated movement
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- alignNodes_VerticallyLeft(nodelist=[], defaultToSelection=True, preventAnimation=False)
Align nodes vertically left
Requires Mari 4.7 or higher
Arguments:
nodelist (list): A list of Mari Nodes. If not provided defaults to selected nodes
defaultToSelection (bool): If true and nodelist is empty, the graph selection will be used
preventAnimation (bool): If true, nodes will directly jump to a position instead of having animated movement
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- alignNodes_VerticallyRight(nodelist=[], defaultToSelection=True, preventAnimation=False)
Align nodes vertically right
Requires Mari 4.7 or higher
Arguments:
nodelist (list): A list of Mari Nodes. If not provided defaults to selected nodes
defaultToSelection (bool): If true and nodelist is empty, the graph selection will be used
preventAnimation (bool): If true, nodes will directly jump to a position instead of having animated movement
Returns:
None:
Introduced:
EP6R1
Modified:
EP6R1
- distributeBetweenNodes_Horizontally(nodelist)
Given a list of nodes, the method will determine the farthest left and right node position
and distribute the other nodes of the list inbetween evenly
Arguments:
nodelist (list): A List of Mari Nodes
Introduced:
EP6R1
Modified:
EP6R1
- distributeBetweenNodes_Vertically(nodelist)
Given a list of nodes, the method will determine the highest and lowest node position
and distribute the other nodes of the list inbetween evenly
Arguments:
nodelist (list): A List of Mari Nodes
Introduced:
EP6R1
Modified:
EP6R1
- distributeBetweenSelectedNodes_Horizontally()
Using the list of curently selected nodes, the method will determine the farthest left and right node position
and distribute the other nodes of the list inbetween evenly
Introduced:
EP6R1
Modified:
EP6R1
- distributeBetweenSelectedNodes_Vertically()
Using the list of curently selected nodes, the method will determine the highest and lowest node position
and distribute the other nodes of the list inbetween evenly
Introduced:
EP6R1
Modified:
EP6R1
- distributeNodesHorizontally(nodelist=None, specificXDistance=1, backdropOffsetLimit=True)
Distribute Nodes horizontally with a given Distance between Nodes starting from the first node on the left
Arguments:
nodelist (list): A List of Mari Nodes. If 'None' is handed in, it uses the current selection
specificXDistance (float/int): The distance between nodes
backDropOffsetLimit (bool): when true, nodes will now be allowed to go outside of their parent backdrop
Returns:
(bool): Returns if the node distance was artificially constrained by the backdropOffsetLimit
Introduced:
EP6R1
Modified:
EP6R1
- distributeNodesVertically(nodelist=None, specificYDistance=1, backdropOffsetLimit=True)
Distribute Nodes vertically with a given Distance between Nodes starting from the first node at the top
Arguments:
nodelist (list): A List of Mari Nodes. If 'None' is handed in, it uses the current selection
specificYDistance (float/int): The distance between nodes
backDropOffsetLimit (bool): when true, nodes will now be allowed to go outside of their parent backdrop
Returns:
(bool): Returns true if the node distance was artificially constrained by the backdropOffsetLimit
Introduced:
EP6R1
Modified:
EP6R1
- layoutNodes(graph=None, nodelist=[])
This method is a modification of Mari's own nodegraph.autoLayoutNodes() method.
It works either with the given arguments or without them, in which case
the currently open Nodegraph and its selected nodes are used.
When a single node is selected and layoutNodes is called, Mari's own
autoLayoutNodes() is called with the selected Node as its root.
If multiple nodes are selected only the selected nodes will be laid out,
which is the main difference to mari's autoLayout, which always lays out the
entire connected stream
Arguments:
graph (mari.Nodegraph): Optional argument to give a parent nodegraph. Defaults to None
nodelist (list of mari.Nodes): Optional argument to give a list of nodes to operate on.
If the nodelist is empty but the graph argument is not None,
the selected nodes in the given graph are used.
If the list is not empty, the given nodes need to be part of
the given graph given as argument.
If both graph and nodelist args are not given, the method will always
run on the currently open graph and its selected nodes
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.distributeNodeUI()
Opens a UI to distribute ndoes
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Methods to jump from and to nodes
- cycleBookmarkNodesBackwards()
Cycle backwards through the available node graph bookmark nodes in the current graph
Introduced:
EP6R1
Modified:
EP6R1
- cycleBookmarkNodesForward()
Cycle forward through the available node graph bookmark nodes in the current graph
Introduced:
EP6R1
Modified:
EP6R1
- jumpToNextInStream(typeIDToFind='MRI_Misc_Channel_Input', customSearch=None)
jump to the next downstream node (based on current node selection) that matches
either the typeIDtoFind or a special customSearch parameter.
If a customSearch is defined, this supercedes the typeIDtoFind
Arguments:
typeIDToFind (string): A Type ID to find (node.typeID())
customSearch (string): If a custom search is defined,this supercedes any typeIDToFind.
Possible custom searches are:
"paint","bakePoint","geoChannel","groupNode","channelNode","shader","material"
Introduced:
EP6R1
Modified:
EP6R1
- jumpToNextSimilarInStream()
jump to the next downstream node in the stream that is matching
the current noe selection type
Introduced:
EP6R1
Modified:
EP6R1
- jumpToNodeInput()
Jumps to the connected Node of the currently selected node input
If a node has multiple inputs a dialog will show
Introduced:
EP6R1
Modified:
EP6R1
- jumpToNodeOutput()
Jumps to the connected Node of the currently selected node output
If multiple Nodes are connected to the Output a dialog will show
Introduced:
EP6R1
Modified:
EP6R1
- jumpToPreviousInStream(typeIDToFind='MRI_Misc_Channel_Input', customSearch=None)
jump to the next upstream node (based on current node selection) that matches
either the typeIDtoFind or a special customSearch parameter.
If a customSearch is defined, this supercedes the typeIDtoFind
Arguments:
typeIDToFind (string): A Type ID to find (node.typeID())
customSearch (string): If a custom search is defined,this supercedes any typeIDToFind.
Possible custom searches are:
"paint","bakePoint","geoChannel","groupNode","channelNode","shader","material"
Introduced:
EP6R1
Modified:
EP6R1
- jumpToPreviousSimilarInStream()
jump to the next upstream node in the stream that is matching
the current noe selection type
Introduced:
EP6R1
Modified:
EP6R1
- jumpViewToRadioNodeConnection()
Focuses your Nodegraph on connected Nodes from the currently selected Radio Node or
Radio Transmitter Node. This method is also available inside the main radioNodes() calss
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.jumpToBookmark()
Launches the "Jump to Bookmark" UI
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Node Properties methods to handle single click node properties viewing
- clearNodePropertiesOnSingleClick_Connections()
removes all connections previously made to enable single click node properties
Introduced:
EP6R1
Modified:
EP6R1
- getPauseNodePropertiesState()
Returns true if the Auto Property Loading on single selection has been paused
Returns:
bool: True if the Auto Loadin of Node Properties on selection
has been paused
Introduced:
EP6R1
Modified:
EP6R1
- initializeNodePropertiesOnSingleClick()
a method called on Mari Project startup to create signal connections for one-click
node properties changing.
The method will connect to all Nodegraphs in the Project.
Only has an effect if Preference /Node Graph/Node Properties/SingleClickPropertiesLoading
is True
Introduced:
EP6R1
Modified:
EP6R1
- initializeNodePropertiesOnSingleClick_onSpecificGeo()
Generates a signal connection from nodegraph.nodeSelectionChanged()
to updateNodePropertiesOnSelection() for a newly added Geometry
Only has an effect if Preference /Node Graph/Node Properties/SingleClickPropertiesLoading
is True
Introduced:
EP6R1
Modified:
EP6R1
- pauseNodePropertiesUpdate(mode=False)
Pauses or unpauses the automatic loading of Node Properties
on single click on a node.
This only has an effect if in the Mari preferences / Nodegraph Tab
the Node Properties on Single Click Pref is checked
Arguments:
mode (bool): If True, the automatic updating of Node Properties is paused.
Defaults to False.
Introduced:
EP6R1
Modified:
EP6R1
- updateNodePropertiesOnSelection(force=False, forceOpenPalette=False)
Updates the Node Properties based on the current node selection.
This method is usually called by the nodegraph.nodeSelectionChanged() signal.
Arguments:
force (bool): if true, the node properties get updated even if they are paused via the api.
If the Node Properties Palette is hidden, nothing happens
forceOpenPalette (bool): if true, the node properties palette gets forced open
Introduced:
EP6R1
Modified:
EP6R1v2
- __epSystem__.addNodePropertiesPreference()
Adds a Preference to Mari Preferences / Nodegraph Tab
to change the open Behavior of Node Properties from double click
to single click
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadNodePropertiesPreference()
Loads a Preference from Mari Preferences / Nodegraph Tab
to change the open Behavior of Node Properties from double click
to single click
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveNodePropertiesPreference()
Saves a Preference from Mari Preferences / Nodegraph Tab
to change the open Behavior of Node Properties from double click
to single click
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Methods related to look and style of Nodes
- revertNodeStyle(inputNodeList)
Reverts a previously modifed Node Style back to Mari default
Arguments:
inputNodeList (if of mari.Node): The Nodes to revert
Introduced:
EP6R1
Modified:
EP6R1
- setNodeStyle(inputNodeList, setColor=True, setShape=False, setPixmap=False, topColor='1.0,0.0,0.0,1', bottomColor='1.0,0.0,0.0,1', NodeShape=3, pixMapPath='')
Allows you to change the style of a Node, e.g. the color, shape and pixmap icon.
The method works by writing a new node instance and removing the old one.
Certain Node Types are not supported such as Paint Nodes and Bake Point Nodes.
Arguments:
inputNodeList(list of mari.Node): The Nodes to change the Style on
setColor(bool): Boolean to define if to change the color
setShape(bool): Boolean to define if to change the shape
setPixmap(bool): Boolean to define if to change the icon
topColor (string): If setColor is True, this defines the top color of the node.
Colors are set in 0-1 range per channel e.g. "1.0,0.0,0.0,1.0"
bottomColor (string): If setColor is True, this defines the bottom color of the node.
Colors are set in 0-1 range per channel e.g. "1.0,0.0,0.0,1.0"
nodeShape(int): if setShape arg is True, this defines the shape of the node.
At the time of writing this Mari supported 8 shape types.
Therefore valid integers are 0-7 (again at the time of documenting this)
pixMapPath(string): A path to an icon file (png or svg) if setPixmap is True
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.showNodeStyles()
Direct action to launch the Nodestyle UI Hotbox
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Node Utility methods
- createSmartHeightBlend()
Creates a Height Blend node and hooks it up to the selection
Introduced:
EP6R1
Modified:
EP6R1
- createSmartMergeNode()
Creates a Multi Channel Merge Node if the selected Nodes contain Materials
or a regular Merge Node otherwise
Introduced:
EP6R1
Modified:
EP6R1
- createStickyNoteWithNodeChanges(graph=None, nodelist=None)
Creates a sticky Note and adds all non-default values from a node
to it, then places the sticky note under the source node.
Repeatedly executing it on a node that already has a sticky note,
will update the existing sticky note.
If no changes are made in a node, existing sticky notes will be deleted.
While you can supply a nodelist as an argument, if just executed by default,
it will use the current node selection in the currently open graph tab.
Arguments:
graph (mari.Nodegraph): Optional. The graph the nodes in the nodelist belong to.
if None which is the default, the currently open graph is used
nodelist (list of mari.Nodes): Optional. A list of nodes. If None (default), the currently
selected nodes in the graph (other arg) are used.
Introduced:
EP6R2
Modified:
EP6R2
- removeAllStickyNotesWithNodeChanges(graph=None)
Removes all automatically generated sticky notes, containing
information about what node value has changed
Arguments:
graph (mari.Nodegraph): Optional.The graph to search for these kind of
Sticky Notes. If None (default), the currently open
graph will be searched
Introduced:
EP6R2
Modified:
EP6R2
- replaceMergeNodesWithBlendNodes(useSelection=False, ignoreColorSpaceBlend=False, ignoreSwizzle=False, ignoreAdvnacedBlend=False, surpressPopup=False)
This method replaces Merge Nodes with corresponding Extension Pack
Blend Mode Nodes.
Blend Mode Nodes will be swapped in, matching the set Blend Mode on
the Merge Node to Replace.
Opacity Settings, input and output connections will be transferred.
If the node to replace is a MergeNoAlpha Node, the "Keep Alpha" Option
inside the BlendMode Node will be activated.
As BlendMode Nodes have less options than Merge Nodes, some arguments are
available to determine when to leave a Merge Node in place and not replace it
A UI version of this method is available under __epGUI__.replaceMergeNodesWithBlendNodesUI()
Arguments:
useSelection (bool): if true, only merge nodes within the current
nodegraph selection will be replaced.
If false (default), all Merge Nodes within
the current Nodegraph Tab will be checked if they
can be replaced.
ignoreColorSpaceBlend (bool): if true, the "Use Blending Color Space"
dropdown in Merge Nodes will be ignored when
checking if a Merge Node can be replaced.
By default (if False), Merge Nodes will only be replaced
if "Use Blending Color Space" is set to "Disabled"
ignoreSwizzle (bool): if true, the "Swizzle" Otpions
in Merge Nodes will be ignored when
checking if a Merge Node can be replaced.
By default (if False), Merge Nodes will only be replaced
if the Swizzle options are set to default values.
ignoreAdvnacedBlend (bool): if true, the "Advanced Blend Mode" Otpions
in Merge Nodes will be ignored when
checking if a Merge Node can be replaced.
By default (if False), Merge Nodes will only be replaced
if the Advanced Blend Mode Setting is either Disabled or
the "Blendif" and "BlendIfBelow" settings are at default settings.
surpressPopup (bool): By default Extension Pack will give a report window
with information how many merge nodes were replaced and
which ones couldn't be replaced.
Use this argument to surpress this popup.
Introduced:
EP6R1
Modified:
EP6R1
- setMergeNodeColorSpaceToDisabled(node)
EP DEPRECATION WARNING: This method is deprecated and will be removed in a later version.
Use SetMergeNodeColorspace() Option instead.
Sets the currently selected merge node "Color Space Enabled"
Setting to Disabled
Arguments:
node (mari.Node): the merge node to modify the setting on
Introduced:
EP6R1
Modified:
EP6R1
- setMergeNodeColorspace(node, setTo='Disable')
Set Merge Nodes ColorSpaceEnabled option
Arguments:
node (mari.Node): the merge node to modify the setting on
setTo (string): The setting to set the dropdown to.
The names here correspond with the available
Settings in the Merge Node Color Space Enabled
Dropdown
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.replaceMergeNodesWithBlendNodesUI()
Opens a dialog to allow you to replace Merge Nodes with Blend Mode Nodes
- __epSystem__.autoUpdateBakeLookupOnExistingNodes()
Builds a signal connection (for any node in your project)
for nodes that have an inputPort 'BakedData'
on shader recompilation the nodes Image Attribute
gets autopopulated with the UDIM 1001 of an attached
BP Node
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.lockBackdropColorsInProject()
This method gets called on project launch and locks the backdrop colors so they don't get randomized by mistake
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.nodeChangesToStickyNoteConnections(stickynote)
Utility method that gets called when a project is opened
It rebuilds the given stick notes connection to its source node
Arguments:
stickynote (mari.Node): A sticky node
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.nodeCreatedConnect()
Builds Signal connect to mari.nodes.nodeCreated collecting all method executions when this is called
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.nodeCreatedDisconnect()
Kills Signal connect to mari.nodes.nodeCreated collecting all method executions when this is called
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.pauseNodeCreatedProcessing(pause)
Pauses and unpauses Extension Pack's processing of Nodes
that happen on the mari.nodes.nodeCreated Signal.
Useful if you need to temporarily pause everything without
disconnecting
Arguments:
pause (bool): True to Pause processing, False to restart it
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.receiverCreated(node)
checks if a brodcast node was selected when a receiver node was created.
If a broacast node was the previous node selection, the broadcast nodes
channel Name gets set on the receiver
Arguments:
node (mari.Node): a receiver node
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setDynamicNodeGraphTabManager()
Creates a signal connection to mari.geo.entityMadeCurrent
to dynamically open and close Nodegraph Tabs that do not belong
to the current object.
If the Object is reselected, the last open NG Tabs are restored
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setMergeNodeColorspace_PreferenceChanged(saveSetting=True)
EP DEPRECATION WARNING: This method is deprecated and will be removed in a later version.
Part of a system to automatically turn of "Color Space Enabled"
on newly created Merge Nodes in the Nodegraph.
This method is used to update signal connects when the preference
"Set Color Space Enabled" is changed by the user
Arguments:
saveSetting (bool): if true the setting gets instantly saved to the mari config
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setMergeNodeColorspace_createPreference()
EP DEPRECATION WARNING: This method is deprecated and will be removed in a later version.
Part of a system to automatically turn of "Color Space Enabled"
on newly created Merge Nodes in the Nodegraph.
This method is used to create a preference
"Set Color Space Enabled" int he Nodegraph section of the Mari Preferences
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Nodegraph methods contain all methods that add or change the nodegraph or run over entire graphs
- clearNodegraph(currentGeoOnly=True)
CAREFUL ! Deletes all nodes, without prior warning
Arguments:
currentGeoOnly (bool): if true ony the current geo will be evaluated
Introduced:
EP6R1
Modified:
EP6R1
- copyNodeAttributes(node=None)
Save the currently selected Node Attributes to a File.
Also exists as mari.ExtensionPack.node.saveNodeAttributes()
Arguments:
node (mari.Node): If a node is provided the node's attributes will be copied.
If no node is provided (None, default), the current Node selection is used.
Introduced:
EP6R1
Modified:
EP6R2
- createNodeAtPosition(graph, nodeString, positionList)
Creates a new node at a specific position
Arguments:
graph: The nodegraph the node belongs to (mari.NodeGraph)
nodesString: A standard mari node string (same as mari.Nodegraph.createNode() )
positionList: A list of coordinates [x,y]
Returns:
(mari.Node): Returns a mari.Node
Introduced:
EP6R1
Modified:
EP6R1
- createNodeDuplicateAtPosition(graph, nodes, PositionList, removeOriginalNode=False)
Create duplicates of given nodes at a position
Arguments:
graph: The nodegraph the node belongs to (mari.NodeGraph)
nodes: A list of Node Objects (list(mari.Node))
offsetList: A list of offset coordinates [x,y]
removeOrigNodes: If True the original nodes are removed
Returns:
(list): Returns a list of nodes
Introduced:
EP6R1
Modified:
EP6R1
- createNodeDuplicateWithOffset(graph, nodes, offsetList, removeOriginalNode=False)
Create duplicates of given nodes with a position offset
Arguments:
graph: The nodegraph the node belongs to (mari.NodeGraph)
nodes: A list of Node Objects (list(mari.Node))
offsetList: A list of offset coordinates [x,y]
removeOrigNodes: If True the original nodes are removed
Returns:
(list): Returns a list of nodes
Introduced:
EP6R1
Modified:
EP6R1
- current()
this is a method to find the active nodegraph based on the open tab.
Returns:
mari.Nodegraph: The currently active and open Mari Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- duplicateNodesWithConnections(offsetX=50, offsetY=50)
Duplicate selected Nodes while maintaining their connections
Arguments:
offsetX: Specifies the offset of the duplicated nodes from their original position
offsetY: Specifies the offset of the duplicated nodes from their original position
Returns:
(list): a list of duplicated mari.Nodes
Introduced:
EP6R1
Modified:
EP6R1
- duplicate_nodeNetwork(geo, inputNode, inputNodeNodeGraph, StopAfterRadioNodes=True, RenameChannelIncremental=True, RenameChannel=False, newChannelName='Renamed Channel', offsetX=50, offsetY=50)
Duplicatas a Node Network such as a channel while cleanign up and rebuilding shared connections in the graph
Please be aware the same method exists in the mari.ExtensionPack.channel() Class
Arguments:
geo (mari.geoEntity): Geo, inputNode lives on
inputNode (mari.Node): The node which to use as a base to duplicate the network
(upstream connections). Should be a channel node but doesn't have
to be
inputNodeNodeGraph (mari.Nodegraph): The Nodegraph the input Node belongs to
:StopAfterRadioNodes (bool): If true (default value) connections upstream of a radio node will
not be duplicated and the original Radio Node Connection is
maintained if the first node upstream of a radio has connections
to other channels.
RenameChannelIncremental (bool): If true (default value) and the inputNode is a Channel, the
resulting duplicated channel will be renamed incrementally (1,2,3 etc.)
RenameChannel (bool): If RenameChannelIncremental=False and RenameChannel=True, and the inputNode
is a channel, the resulting duplicate channel will be renamed with the name
specified under newChannelName
newChannelName (string): if RenameChannel=True and the inputNode is a channel, the resulting
duplicate Channel will be renamed with this name
offsetX,offsetY (int): The offsetX and offsetY specify the offset of the duplicated nodes
from their original nodegraph position
Returns:
(mari.Node): Returns the new Node with intact connections
Introduced:
EP6R1
Modified:
EP6R1
- getAllNodesInProject(classFilter=None)
Returns a list of all nodes across all geos in your project
Arguments:
classFilter (class): Optional Class to filter for. Defaults to None.
To filter for backdropNodeClass for example use
mari.BackdropNode
Returns:
NodeList (list)
Introduced:
EP6R1
Modified:
EP6R1
- getAllNodesOnGeo(geo, classFilter=None)
Returns all nodes for the given geo
Arguments:
geo (mari.Geo) geo to return nodes for
classFilter (class): Optional Class to filter for. Defaults to None.
To filter for backdropNodeClass for example use
mari.BackdropNode
Returns:
NodeList (list): list of nodes
Introduced:
EP6R1
Modified:
EP6R1
- getNodesonStream(targetNode, includeGroupNode=True, stream='None')
Returns a filtered topological sorting to the target node, however with only
nodes that are part of the specified stream
Arguments:
targetNode (mari.Node): The target Node of the Stream
includeGroupNode (bool): If to include any GroupNodes in the return. Defaults to True
stream (string): The Stream Name to check for
Returns:
(list): Returns list of Mari Nodes
Introduced:
EP6R1
Modified:
EP6R1
- getUpstreamNodes(graph, destination_node)
A wrapper method for mari.Nodegraph.getUpstreamNodes() (which didn't used to work so well)
Arguments:
graph (mari.Nodegraph): The Graph to check against
destination_node (mari.Node): The Target Node
Returns:
(list): A list comprised of mari.Node Objects
- lastCreatedNode()
returns the last created node
Returns:
(mari.Node): the last created Node. This might be a node created by Mari internally
as this does not differentiate between user created nodes and mari created nodes
Introduced:
EP6R1
Modified:
EP6R1
- recursiveGroupNodeList(node_list)
Returns all Group Nodes including Groups in Groups based on initial list provided
For example given a nodelist you will get all Group Nodes inside this Nodelist
including all Group Nodes inside of Group Nodes
Arguments:
node_list (list): A list of nodes (mari.Node)
Returns:
(list): A list of group nodes (mari.GraphGroup)
Introduced:
EP6R1
Modified:
EP6R1
- recursiveNodeList(node_list)
Returns all Nodes including Group Contents based on initial list provided
For example if you give a nodelist containing a group node, the return
will include all nodes from the initial nodelist plus all nodes from within the group
Arguments:
node_list (list): A list containing mari.Node objects
Returns:
(list): A list containing mari.Node objects
Introduced:
EP6R1
Modified:
EP6R1
- repeatLastNodeCreation()
repeats the creation of the last node at the current cursor position
Introduced:
EP6R1
Modified:
EP6R1
- setNodeAttributes(nodelist=None)
Set the currently selected Node Attributes from a Clipboard File
Also exists as mari.ExtensionPack.node.setNodeAttributes()
Arguments:
nodelist (list): If a nodelist is provided the clipboard is applied to those nodes
If no nodelist is provided (None, default), the current Node selection is used.
Introduced:
EP6R1
Modified:
EP6R2
- smartRenameNodes()
Smart rename selected Nodes based on a some given rules
A method running based on a node argument is available in the nodes() class
Introduced:
EP6R1
Modified:
EP6R1
- viewerNode(graph=None)
Returns the Viewer node of a Graph
This is a replacement for Mari's own nodeGraph.viewerNode()
method that only works in Root Nodegraphs (Mari 6).
Arguments:
graph (mari.nodeGraph): (Optional) A Mari Nodegraph objet to check for a viewer.
If None or not provided, the currently open Nodegraph will
be used
Returns:
mari.Node: The Viewer Node if found or None
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.importNodes()
Launches the Import Nodes dialog.
This is a wrapper for mari's own Import Nodes.
This version of it prevents certain Extension Pack
Node Actions such as Randomizing of Backdrop Colors to take
effect.
Introduced:
EP6R2
Modified:
EP6R2
- __epGUI__.nodeMetaDataEditor(Force=False)
A editor to edit and compare node metadata
Arguments:
Force (bool): By default the Node Editor can only work with Group Nodes, Materials
Custom Procedurals and a small set of other Nodes such as
Item List Nodes. If you launch the dialog in Forced Mode (True)
the Dialog will open for any selected Node, showing the Node Metadata.
Please note that Force Mode is experimental. There is no guarantee that
that editing functionalities will work with non-supported Nodes.
Introduced:
EP6R1
Modified:
EP6R2
- __epGUI__.rampEditor()
A editor to edit data as ramps.
Works with curve nodes such as Brightness Lookups, Color Lookups, RGBA Lookup and Gradient Map X8
Introduced:
EP6R2
Modified:
EP6R2
- __epGUI__.renameNodesUI()
Launch the "Multi Rename Nodes" Tool UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.swapNodeType()
Allows you to swap out any node type for another node type.
If possible, settings are transfered between nodes
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Controls for the Nodegraph Background Grid
- decreaseGridHeight()
Decrease the Height of grid cells in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- decreaseGridLineOpacity()
Decrease the Opacity of Grid Lines in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- decreaseGridLineWidth()
Decrease the Width of Grid Lines in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- decreaseGridWidth()
Decrease the Width of grid cells in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- increaseGridHeight()
Increases the Height of grid cells in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- increaseGridLineOpacity()
Increase the Opacity of Grid Lines in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- increaseGridLineWidth()
Increase the Width of Grid Lines in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- increaseGridWidth()
Increases the Width of grid cells in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- toggleGridSnap()
Toggles Grid Snap on and off
Introduced:
EP6R1
Modified:
EP6R1
- toggleShowGrid()
Toggles the showing of the Grid in the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setNodegraphGridDefaults()
Sets new defaults for the Nodegraph Grid Colors
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.syncGridSnapStates()
Gets run on project open to sync the action triggered states to the state of the prefs
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Methods relaed to the Nodegraph Palette and Palette Tabs
- cursorPositionInNodegraphSpace()
returns the user cursor position in nodegraph space
Returns:
(QPointF): the position of the cursor in nodegraph space
Introduced:
EP6R1
Modified:
EP6R1
- cycleNodegraphTabs()
Cycle through the open Nodegraph Tabs
Introduced:
EP6R1
Modified:
EP6R1
- enterSubgraph()
'
Opens a subgraph (e.g. selected roupnode)
Introduced:
EP6R1
Modified:
EP6R1
- findNodeAbstractGraphicsView()
this method returns the QGraphicsView of the Nodegraph
Returns:
(QGraphicsView): The Graphical View Widget of the Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- findNodeGraphContext()
this is a method to find the active nodegraph based on the open tab.
A more direct method has been added under mari.ExtenionPack.nodegraph().current()
Returns:
mari.Nodegraph: The currently active and open Mari Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- findNodeGraphTabWidget(returnNoneIfRootGraph=False)
this is a method to find the active nodegraph Tab widget
Arguments:
returnNoneIfRootGraph (bool): If true the return is always None if the active tab widget is the root graph
Returns:
(QTabbedWidget): Returns the QTabbedWidget or None
Introduced:
EP6R1
Modified:
EP6R1
- leaveSubgraph()
'
Leaves a subgraph (e.g. selected groupnode)
Introduced:
EP6R1
Modified:
EP6R1
- setNodegraphContext()
this sets the context focus inside of mari to the Nodegraph.
This is useful to return focus to the Nodegraph after a dialog was opened/closed
Introduced:
EP6R1
Modified:
EP6R1
- setNodegraphTabIndex(index)
set the active open Nodegraph Tab
Arguments:
index (int): The Index Number of the Tab
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Controls for the Nodegraph Selection
- deselectAllNodes()
deselect all Nodes in the current Graph Tab
Introduced:
EP6R1
Modified:
EP6R1
- deselectAllNodesExceptBackdrops()
deselect all Nodes except backdrops in the current Graph Tab
Introduced:
EP6R1
Modified:
EP6R1
- getLastNodeSelection()
Returns the last made node selection.
This might be the currently selected node(s)
Returns:
(list): a list of nodes
Introduced:
EP6R1
Modified:
EP6R1
- getPreviousNodeSelection()
Returns the last made node selection before the current one.
Returns:
(list): a list of nodes
Introduced:
EP6R1
Modified:
EP6R1
- getSelectedNodesOnCurrentGeoRootGraph(FirstOnly=False)
A quick and easy way to get the selected Nodes from the current geo root graph
Arguments:
FirstOnly (bool): If "True" only the first found selected node willl be returned,
otherwise all selected ones
Returns:
(list): A list of nodes (mari.Node) if FirstOnly=False
(mari.Node) A single mari.Node if FirstOnly=True
Introduced:
EP6R1
Modified:
EP6R1
- getSelectedNodesOnCurrentGraph(FirstOnly=False)
A quick and easy way to get the selected Nodes from the currently open graph
Arguments:
FirstOnly (bool): If "True" only the first found selected node willl be returned,
otherwise all selected ones
Returns:
(list): A list of nodes (mari.Node) if FirstOnly=False
(mari.Node) A single mari.Node if FirstOnly=True
Introduced:
EP6R1
Modified:
EP6R1
- getSeparateNodeStreams(nodelist)
Takes a given nodelist from e.g. a selection [Node1,Node2,Node3,Node4,Node5,Node6]
and checks what nodes are connected to each other, then splits it into lists.
For example for two node streams:
Node1->Node2->Node3
Node4->Node5->Node6
... a nested list is returned [ [Node1,Node2,Node3],[Node4,Node5,Node6]]
Arguments:
nodelist (list): a list of nodes
Returns:
(list): a list of lists. Each sublist is a separate nodestream
Introduced:
EP6R2
Modified:
EP6R2
- selectAllNodes()
Select all Nodes in the current Graph Tab
Introduced:
EP6R1
Modified:
EP6R1
- selectClosestNodeToCursoAndView(viewNodeProperties=True)
Selects the closest node to the cursor in the current nodegraph
and attach a viewer.
By default it will also view the Node Properties
Arguments:
viewNodeProperties (bool): If true, the nodes node properties will be shown.
if false, the node will only be selected
Defaults to True
Returns:
mari.Node The selected Node or None
Introduced:
EP6R1
Modified:
EP6R1
- selectClosestNodeToCursor(viewNodeProperties=True)
Selects the closest node to the cursor in the current nodegraph.
By default it will also view the Node Properties
Arguments:
viewNodeProperties (bool): If true, the nodes node properties will be shown.
if false, the node will only be selected
Defaults to True
Returns:
(mari.Node): The selected Node or None
Introduced:
EP6R1
Modified:
EP6R1
- selectCustomNodes(showReport=True)
Selects all Custom Nodes (non mari default ones) in current Graph Tab
and provides a message with information about the node types
Arguments:
showReport (bool): By default the method will show a report of all custom node types on top of selecting them
Set to False to prevent that and just select custom nodes
Introduced:
EP6R1
Modified:
EP6R1
- selectNodesByType(typeOfNode='Paint', nodegraph=None, referenceNode=None)
Selects all Nodes of a given type
Arguments:
typeOfNode (string): Specifies the type of Node to select.
Available Options are:
"Paint" , "BakePoint","GeoChannel",
"Channel","Shader","Material",
"Same Type", "Same Category'
"Same Type" will run off the typeID() of a node
"Same Category" will run off the Path of the Node
found in the Node Information Dialog (hotkey I)
nodegraph (mari.nodeGraph): Optional Nodegraph Argument to use as the reference graph
to select nodes in. If None, the currently open Nodegraph Tab
will be used.
Defaults to None
referenceNode (mari.Node): Optional Single Node Argument to use as the reference Node.
This node will be used when running in "Same Category" &
"Same Type" Mode to determine what Type or Category to select
Defaults to None, in which case the first selected node of the
given graph will be used. The graph will be the currently open
Nodegraph tab or the given graph provided via the nodegraph argument
Introduced:
EP6R1
Modified:
EP6R1
- selectUpstreamNodes(Stream='None')
select all upstream nodes from the current node selection
Arguments:
Stream (string): optional Material Stream Name to limit the upstream Selection to
Introduced:
EP6R1
Modified:
EP6R1
- selectUpstreamNodes_ignoreRadios(Stream='None')
select all upstream nodes from the current node selection but stop
BEFORE a radio node or receiver node
Arguments:
Stream (string): optional Material Stream Name to limit the upstream Selection to
Introduced:
EP6R1
Modified:
EP6R1
- selectUpstreamNodes_stopAfterRadios(Stream='None')
select all upstream nodes from the current node selection but stop
AFTER a radio node or receiver node
Arguments:
Stream (string): optional Material Stream Name to limit the upstream Selection to
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.clearNodeGraphSelectionTrackingData()
Clears the cache for Nodegraph Selections
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.discontinueNodeGraphSelectionTracking()
disconnects nodegraph selectiont racking
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initializeNodeGraphSelectionTracking()
a method called on Mari Project startup to create signal connections
to track nodegraph selection changes on all geos
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initializeNodeGraphSelectionTracking_onSpecificGeo(entity='')
Generates a signal connection from nodegraph.nodeSelectionChanged()
to the Selection Tacking Cache for a newly added Geometry
Args:
entity (mari.geoEntity): The Entity added
Introduced:
EP6R1
Modified:
EP6R2v2
Class Description:
Handles custom Nodegraph Stylesheet edits
- toggleAllowAutoInsert()
Toggles on/off if Auto Insert it allowed
if dragging a Node onto a wire
Introduced:
EP6R1
Modified:
EP6R1
- toggleAllowShakeToExtract()
Toggles on/off if Nodes can be extracted via a Mouse Shake
Requires Mari 7.0v1 or higher.
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.addStyleSheetPreferences()
Adds preferences to control the Mari internal Nodegraph Stylesheet to Nodegraph Tab of Prefs
- __epSystem__.getStyleData(group, key, value, fromTempFile=True)
Retrieves Nodegraph Stylesheet data from disc
Arguments:
group (str): The group is the section in the Nodegraph Stylesheet to change
key (str): The key in the Nodegraph Stylesheet you wish to edit
value (str,int) The value to set the key to
fromTempFile (bool) Determines if to fetch from a temporary file that gets transferred into the
Nodegraph Stylesheet on exit of Mari. This is necessary because Mari keeps
internal Stylesheet data in memory and otherwise data would get lost and overwritten
with old data on mari exit. Defaults to True
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.syncAutoInsert()
Syncs the state of Auto Insert on / off
(if dragging a Node onto a wire) to the
UI option in the Nodegraph / Connection Menu
- __epSystem__.updateStylesheetFromPref(group, key, asTempFile=True)
Singal Attachment as changeScript when a preference in the Nodegraph/Nodegraph Style sheet
section is edited.
Arguments:
group (str): The group is the section in the Nodegraph Stylesheet to change
key (str): The key in the Nodegraph Stylesheet you wish to edit
asTempFile (bool) Determines if to write to a temporary file that gets transferred into the
Nodegraph Stylesheet on exit of Mari. This is necessary because Mari keeps
internal Stylesheet data in memory and otherwise data would get lost and overwritten
with old data on mari exit. Defaults to True
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.writeMemoryStylesheetToDisc()
Mari keeps a stylesheet for the nodegraph in memory.
This methods writes the stylesheet values from memory to disc
- __epSystem__.writeStyleData(group, key, value, asTempFile=True)
Writes nodegraph Stylesheet data
Arguments:
group (str): The group is the section in the Nodegraph Stylesheet to change
key (str): The key in the Nodegraph Stylesheet you wish to edit
value (str,int) The value to set the key to
asTempFile (bool) Determines if to write to a temporary file that gets transferred into the
Nodegraph Stylesheet on exit of Mari. This is necessary because Mari keeps
internal Stylesheet data in memory and otherwise data would get lost and overwritten
with old data on mari exit. Defaults to True
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Object related methods
- geoUVIndices(currentGeoOnly=True)
Builds a UV Index Dictionary of your current geo or all geos
Arguments:
currentGeoOnly (bool): Determines if to build the Indices for current Geo or all Geos
Returns:
dict
list
Introduced:
EP6R1
Modified:
EP6R1
- removeObjectVersion()
Remove the currently set object version on the geo in the object palette
Introduced:
EP6R2
Modified:
EP6R2
- setAllSUBDToHigh()
Set all objects to highest available subdivision
Introduced:
EP6R1
Modified:
EP6R1
- setAllSUBDToLow()
Set all objects to level 0
Introduced:
EP6R1
Modified:
EP6R1
- setVisibleSUBDToHigh()
Set all visible objects to highest available subdivision
Introduced:
EP6R1
Modified:
EP6R1
- setVisibleSUBDToLow()
Set all visible objects to level 0
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.addDefaultObject(asObjectVersion=True)
Launches the "Add Default Objects" dialog
where you can add a number of primitive objects to your Mari scene (plane, tiling plane, cube etc.)
Arguments:
asObjectVersion (bool): determines if the AS OBJECT VERSION Checkbox is ticked on startup
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportGeometry()
Launches a full Export dialog where you can export your Geometry from your project
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportGeometry_selectionOnly()
Launches a Export dialog where you can export your SELECTED object
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportUVMasks()
Launches a full Export UV Mask dialog where you can export UV Masks from
multiple objects
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.exportUVMasks_selectionOnly()
Launches a Export UV Mask dialog where you can export UV Masks from the SELECTED Object
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.subdivide()
Launches the subdivide dialog, where you can batch subdivide multiple objects
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addDefaultObjectsToRecentMeshes()
Adds the Extension Pack Default Objects
to the list of recent meshes in the CREATE NEW PROJECT
Dialog
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addGeoRenamePreference()
Adds the Preference "Geo Vesion Naming" to the Misc Preference Tab
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.createGeoRenameSignals()
called on project open, this creates signal connections to
mari.geo.entityAdded and geometryVersionAdded.
Depending on the Preference setting "Geo Version Naming" in Prefs/Misc/ added Object Versions are
auto-renamed.
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.saveGeoRenamePreference()
Saves the Preference "Geo Vesion Naming" from the Misc Preference Tab
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Colorspace Methods
- getAvailableColorspaces(ocio_filepath, colorspace_defaults)
Returns two separate lists, one with Colorspace Roles, one with Colorspaces
Arguments:
ocio_filepath (str): Path to an ocio file
colorspace_defaults (mari.ColorspaceDefaults): An instance of the Project's Colorspace Defaults
Returns:
roles (list): A list of colorspace colors as nested lists
[RoleName, Rssolved colorspaceName, Colorspace Pretty Name]
spaces (list): A list of colorspaces as nested lists
[colorspaceName, pretty Name]
Introduced:
EP6R2
Modified:
EP6R2
- getOCIOandDefaults()
Returns the OCIO Filepath as well as the project colorspace defaults
Returns:
ocio_filename (str): The fully resolved filepath to the OCIO config file
colorspace_defaults (mari.ColorspaceDefaults) The projects colorspace defaults
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Patch related tools
- applyPatchResolutionTemplate(geo=None, channel=None, node=None, forceModeTo=None)
Restores the configuration / resolutions of the UDIMs from a saved template
If geo is None, the current geo will be used (mari.current.geo())
if chan is None and/or Node is None, a dialog will ask the user which
to save from (if both channel and a paint node are selected)
Arguments:
geo (mari.Geo): A mari geo to save against. If None, current geo is used
channel (mari.Channel): A mari channel to save from. If None, current Channel is used
node (mari.Node): A mari node with an imageSet (e.g. Paint Node). If None, currently selected node is used
forceModeTo (string): Allows you to force the Mode the method is run in to a certain way, either 'Channel' or 'Node'
This will circumvent dialog popups and allows using this method via API Calls. Defaults to None
Introduced:
EP6R1
Modified:
EP6R1
- patchBake_to_imagemanager()
Launches Patch Bake to Image Manager
Introduced:
EP6R1
Modified:
EP6R1
- resizePatches_onChannelsOrNodes(size)
Resizes selected patches on either channels or nodes
Arguments:
size (string or integer): An integer for a fixed size 256,512,1024,2048,4096,8192 etc.
A string for double,half size or null size double, half, null
Introduced:
EP6R1
Modified:
EP6R1
- savePatchResolutionTemplate(geo=None, channel=None, node=None, forceModeTo=None)
Saves the configuration / resolutions of the UDIMs to a template
that can be applied to other patches.
If geo is None, the current geo will be used (mari.current.geo())
if chan is None and/or Node is None, a dialog will ask the user which
to save from (if both channel and a paint node are selected)
Arguments:
geo (mari.Geo): A mari geo to save against. If None, current geo is used
channel (mari.Channel): A mari channel to save from. If None, current Channel is used
node (mari.Node): A mari node with an imageSet (e.g. Paint Node). If None, currently selected node is used
forceModeTo (string): Allows you to force the Mode the method is run in to a certain way, either 'Channel' or 'Node'
This will circumvent dialog popups and allows using this method via API Calls.Defaults to None
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Pinned Layers/Channels System
- collectionPin(mode)
Adds a collection Pin
Arguments:
mode (str): "0" for layers, "1" for channel layers
Introduced:
EP6R1
Modified:
EP6R1
- emptyPin()
Executed if no layer has been pinned but user triggers quick pin
Introduced:
EP6R1
Modified:
EP6R1
- quickPin(mode)
Adds a Layer selection to the Quick Pin
Arguments:
mode (str): 'channel' wil add a pinned Channel, else automatically use layers
Introduced:
EP6R1
Modified:
EP6R1
- triggerCollectionPin(layerType, layerName, project_uuid, layer_uuid)
Adds shared layers from a collection pin
Arguments:
layerType (str): "0" for layers, "1" for channel layers
layerName (str): The Name of the Layer the Pin references
project (str): The Project Name the Quick Pin was added
project_uuid (str): The Project UUID the Quick pin was added
layer_uuid (str): The UUID of the Layer(s) the Quick Pin should add
Introduced:
EP6R1
Modified:
EP6R1
- triggerQuickPin(layerType, layerName, project_uuid, layer_uuid)
Adds shared layers from the Quick Pin
Arguments:
layerType (str): "0" for layers, "1" for channel layers
layerName (str): The Name of the Layer the Pin references
project (str): The Project Name the Quick Pin was added
project_uuid (str): The Project UUID the Quick pin was added
layer_uuid (str): The UUID of the Layer(s) the Quick Pin should add
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.manageCollectionPins()
Launches Manage Collection Pins UI
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.clearCollectionPins()
Removes all Collection Pins in a Project
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.restoreProjectPins()
Used to restore any Pins stored in a project, so they appear in the UI
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Preset Browser Methods
- closeSmartMaskShelfInstance()
Closes any Preset Browser running in the Background
Introduced:
EP6R1
Modified:
EP6R1
- resetSmartMaskShelfPositionAndSize()
Closes any currently active instance of the Preset Browser
then resets the size and position to default
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.launchSmartMaskShelf(mode)
Opens the Preset Browser shelf
Arguments:
mode (str): 'Layer' or 'Nodegraph'
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createMaskShelfPreferences()
Creates Preferences inside the Mari Preferences
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveMaskShelfPreference()
Saves Preset Browser Specific Preferences
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
project related tools such as cleanup tools
- cleanUpData()
Runs a Garbage Collect in a way that Mari force collects garbage data, which is different from
normal garbage collect which needs a few project open and saves to start collecting
Introduced:
EP6R1
Modified:
EP6R1
- getCurrentProjectFolder()
Returns the Mari Project Folder for the current Project
Returns:
(string): Path to the project specific Folder
Introduced:
EP6R1
Modified:
EP6R1
- getEPProjectDataFolder(create_if_not_exist=True)
Returns the Folder where Extension Pack stores Project specific
JSON Files
Arguments:
create_if_not_exist (bool): If True (default) the folder will be auto-created if it does not exist
Returns:
(string): Path to the project specific Folder where Extension Pack
stores JSON Data
Introduced:
EP6R2
Modified:
EP6R2
- mariProjectIsOpen()
A utility function that returns if a project is fully open.
Mari fires many signals on project open that might produce
unintended results when processed by 3rd party scripts
if the project is not yet fully opened.
This method can be used to check if the project is fully open
Returns:
(bool): True if a Project is opened, False otherwise
Introduced:
EP6R3
Modified:
EP6R3
- openCurrentProjectFolder()
Opens your Project Directoy (currently open project) in a File Browser
Introduced:
EP6R1
Modified:
EP6R1
- removeAllSnapshots()
Remove all Layer and Channel Snapshots
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_project_open_tracking()
A utility function that returns if a project is fully open.
Mari fires many signals on project open that might produce
unintended results when processed by 3rd party scripts
if the project is not yet fully opened.
This method initializes signal connections to track
the project open state
Introduced:
EP6R3
Modified:
EP6R3
- __epSystem__.loadAdditionalProjectSettings()
Certain states are not automatically saved by mari
with your project, e.g. the current Selection Mode,
Mirror Painting Mode chosen etc.
This will read the states of those actions from a saved
json file in your project directory
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.projectOpenNodeProcesing()
Combines multiple actions that need to happen on
project open into one loop
This will iterate over all nodes in a project and perform
certain actions required by Extension Pack
This is called on project open and serves as a "one stop"
function for every action that needs to happen on project open.
Some examples of actions run are:
- Locking of Backdrop Colors so they don't get re-randomized
- Updating of Radio Nodes
- Updating of Bake Point Image Port Data
- Updating of Visual Notes Files
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.projectSaveNodeProcesing()
Combines multiple actions that need to happen on
project close into one loop
This will iterate over all nodes in a project and perform
certain actions required by Extension Pack
This is called on project close and serves as a "one stop"
function for every action that needs to happen on project close.
Some examples of actions run are:
- Cleaning of unused Image Annotation files in project directory
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveAdditionalProjectSettings()
Certain states are not automatically saved by mari
with your project, e.g. the current Selection Mode,
Mirror Painting Mode chosen etc.
This will write the states of those actions into a json
file into your project directory
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Set Project Path Tool
- get_projectPath_jsonFile()
Returns the per project path to the json file
Used to store project path settings such as export paths etc.
Returns:
dict: A Dictionary containing the Project paths
Introduced:
EP6R1
Modified:
EP6R1
- setProjectPathVariable(variable_name, variable_data, set_active=True)
Sets a variable "variable_name" to "variable_data" on the current project.
The Variables being set are default variables such as mari.resources.DEFAULT_IMPORT
which determines what Folder a Browse Dialog should open in by default.
Different Variables are available.
This function is an API call for what usually can be done via the Extension Pack Tool
"Set Project Path" found in the File Menu. A set Project Path is restored on Project Open.
The following variable names are available:
'MARI_DEFAULT_IMPORT_PATH' - sets the default Path for Texture Importing
'MARI_DEFAULT_EXPORT_PATH' - sets the default Path for Texture Exporting
'MARI_DEFAULT_GEOMETRY_PATH' - sets the default path for Geometry Importing and Exporting
'MARI_DEFAULT_IMAGE_PATH' - sets the default path when using "Open" in the image manager
'MARI_DEFAULT_RENDER_PATH' - sets the default path when rendering a turntable or screenshot
'MARI_DEFAULT_ARCHIVE_PATH' - sets the default path when archiving
'MARI_DEFAULT_SHELF_PATH' - sets the default path when importing an item into the shelf
'MARI_DEFAULT_CAMERA_PATH' - sets the default path when loading cameras or projectors
'Sequence_Flat' - sets the default file template for flattened textures e.g. $CHANNEL.$UDIM.tif
'Sequence' - sets the default file template for non-flattened textures e.g. $CHANNEL.$LAYER.$UDIM.tif
'PTEXSequence_Flat' - sets the default file template for flattened ptex textures e.g. $CHANNEL.$UDIM.ptex
'PTEXSequence' - sets the default file template for non-flattened textures e.g. $CHANNEL.$LAYER.$UDIM.tif
Variable Data is written into a file called 'MEP_ProjectPaths_' + EPVersion + '.json' inside the
Project Cache Folder in a subfolder EP_Project_Data.
Arguments:
variable_name (str): The Variable to set
variable_data (str): The Variable data to set, either a path or file template.
set_active (bool): If True (default), the new Path or file template will be immediately
activated. If False it will only be activated when the project is reopened.
Introduced:
EP6R2
Modified:
EP6R2
- __epGUI__.set_project_paths()
Launches the Set Project Path Dialog
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.checkProjectPaths()
Returns:
bool: true or false depending if valid
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.restore_project_paths()
Restores set project paths on Project Load
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Project Template Tools
- applyLightInfoFromTemplate(templateFilePath)
Applies Light info to your project from a template
Arguments:
templatePath (string): A path to a template json
Introduced:
EP6R1
Modified:
EP6R1
- applyPrefsFromTemplate(templateFilePath, excludeList=[], includeList=[])
Applies Preferences to a project from a template
Arguments:
templatePath (string): A path to a template json
excludeList (list): A list of preference paths to ignore
includelist (list): A list of preference paths to include.
Ignored if empty.Partial matches are allows
since it searches for each item in the list
if a preference path starts with it.
Introduced:
EP6R1
Modified:
EP6R1
- applyProjectorInfoFromTemplate(templatePathFile, projectorFolderLocation)
Applies Projector info to your project from a template
Arguments:
templatePathFile (string): A path to a template Json
projectorFolderLocation (string): A path to a folder containing projector files
Introduced:
EP6R1
Modified:
EP6R1
- applyViewportInfoFromTemplate(templateFilePath)
Applies Viewport info to your project from a template
Arguments:
templateFilePath (string): A path to a template JSON
Introduced:
EP6R1
Modified:
EP6R1
- importLastLightInfoTemplate()
Reimports the last used Light Info Template again
This is a temporary method to work around a mari issue
on new projects where mari changes the lights AFTER the project
has already been setup and saved after creation
Introduced:
EP6R1
Modified:
EP6R1
- importNodesFromTemplate(templateFolderPath, clearExisting=True, currentGeoOnly=True)
Imports Nodes from a Template
Arguments:
templateFolderPath (string): A path to a template directory
clearExisting (bool): if True, all channels and nodes from the geo will be removed before importing
currentGeoOnly (bool): Specify if nodes should only be imported onto current geo
Returns:
bool: True or False if Successful
Introduced:
EP6R1
Modified:
EP6R1
- saveLightInfoAsTemplate(templateName)
Saves a light info template json
Arguments:
templateName (string): A Name of a Template to Save
Returns:
string: The path of the saved light template file
Introduced:
EP6R1
Modified:
EP6R1
- saveNodesFromCurrentGraph(templateName, selectedOnly=False, skipImageData=False)
Saves Nodes from the current Graph to an archive
Arguments:
templateName: The template Name to store the archive under
selectedOnly: If you only want to include selected nodes
skipImageData: If Image Data should be exported as well
Returns:
bool: Returns if export was a success
string Returns a export status message
string Returns the export path
Introduced:
EP6R1
Modified:
EP6R1
- savePrefsAsTemplate(templateName)
Saves a prefs info template json
Arguments:
templateName (string): A Name of a Template to Save
Returns:
string: The path of the saved light template file
Introduced:
EP6R1
Modified:
EP6R1
- saveProjectInfoAsTemplate(templateName)
Saves a projector info template json and projector files
Arguments:
templateName (string): A Name of a Template to Save
Returns:
bool (string): If Successfull,the path of the saved light template file
Introduced:
EP6R1
Modified:
EP6R1
- saveViewportInfoAsTemplate(templateName)
Saves a viewport info template json
Arguments:
templateName (string): A Name of a Template to Save
Returns:
string The path of the saved light template file
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.createTemplateUI()
Opens the createTemplate UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.importTemplateUI()
Opens the importTemplate UI
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.manageTemplateUI()
Opens the manageTemplate UI
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addTemplateFolderPreference()
Adds Preferences to the Mari Preference Dialog
to set a Path where Templates should be stored
/Preferences/Paths/Project Templates
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.autoImportTemplateOnNewProject()
Automatically imports a template into a newly created project
The process never is called when in Terminal Mode (on purpose)
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadTemplateFolderPreference()
Load the Project Template Preference Path from the config
and set it in the /Preferences/Paths/Project Templates
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveTemplateFolderPreference()
Saves the Project Template Preference to the config
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.setTemplateFolderPreference(path)
Sets the Project Template Folder in the Preference.
This is the location where templates are loaded from.
You can also add templates via Environment Variables
Arguments:
path (string): A path
Returns:
bool: True if path could be set
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Projector related tools
- moveScanProjectionBlock_left()
Part of the Projection Wizard Toolset.
With a Mix Node from a 3D Scan Projection Group selected,
will move the entire block to the left
- moveScanProjectionBlock_right()
Part of the Projection Wizard Toolset.
With a Mix Node from a 3D Scan Projection Group selected,
will move the entire block to the right
- removeAllProjectors(silent=False)
removes all Projectors
Arguments:
silent (bool): if True, no confirmation dialog will be shown
Introduced:
EP6R1
Modified:
EP6R1
- toggleCameraType()
toggles the selected projector between Orthographic and Perspective
Introduced:
EP6R1
Modified:
EP6R1
- updateProjectorCamera()
updates the currently active projector with the camera settings from the active viewport
Introduced:
EP6R1
Modified:
EP6R1
- updateProjectorClippingPlanes(projector=None, geo=None)
Adjusts the given Projector's near and far clipping planes to the
given geo's bounding sphere
Arguments:
projector (mari.projector): If a projector is provided, this will
be the projector that will be adjusted.
If no projector is provided (None), which is the default
the method will fall back to the currently selected projector
geo (mari.geoEntity): If a geometry is provided, its bounding sphere will
be the source of the near and far cliping plane for the projector.
If no geometry is provided (None), which is the default
the method will fall back to the currently selected object
Returns:
None: This method does not return a value
Introduced:
EP6R2
Modified:
EP6R2
- __epGUI__.multiRenameProjectors()
Launches a UI to rename Projectors
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.projectionWizard()
Launches the 3D Scan Projection Wizard UI
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.revertCameraClippingPlaneSettings()
A method called by the mari.projectors.projectorMadeCurrent() signal.
It will check the new, current projector for the existence of metdata
oldNearClip & oldFarClip.
If the metadata exists, the current view camera will be reverted back to these
clipping plane settings and the metadata will be removed from the projector
- __epSystem__.setClippingPlaneMetadataOnProjector(projector)
When a Pojector is created directly from a node via the + button in
the node properties (for example via a Camera Projection Node),
this will auto-trigger an adjustment of the clipping plane on the
newly created projector.
To not interfer with the actual view, the view clipping plane will
immediately revert back to the original after and just the Projector
clipping plane will remain changed.
This particular method is a signal connection called by
mari.projectors.projectorAdded(). It will receive the newly created
projector as an argument. The method will then add the current clipping
plane data onto the projector as metadata, then adjust the metadata on
the actual camera of the projector to be a tight fit to the current object.
This is done via mari.ExtensionPack.projectors.updateProjectorClippingPlanes().
A secondary method "revertCameraClippingPlaneSettings" is called by the
mari.projectors.projectorMadeCurrent() signal. That method then takes care
of reverting the active view camera back.
Arguments:
projector (mari.projector): If a projector is provided, this will
be the projector that will be adjusted.
Returns:
None: This method does not return a value
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Nodegraph quickmark related tools
- loadQuickMark(ID)
Load a Nodegraph Quickmark
Arguments:
ID (int): The Number of the Quickmark to load
Introduced:
EP6R1
Modified:
EP6R1
- removeQuickMark(ID)
Remove a Nodegraph Quickmark
Arguments:
ID (int): The Number of the Quickmark to delete
Introduced:
EP6R1
Modified:
EP6R1
- setQuickMark(ID)
Define a new Nodegraph Quickmark
Arguments:
ID (int): The Number to which to assign the quickmark to
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addQuickMarksToGUI()
Adds Quickmark Buttons to top of Nodegraph
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.checkQuickMarks()
Remove unused quickmarks that point to a non-existent location (geo or graph)
and update Button state
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.deactivateQuickMarkButtons()
Sets all Quickmark Buttons to disabled
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
radio Node and transmitter related Methods
- cycleRadioNodeConnections()
This is a special way to cycle through the modes of radio nodes
1) If any Radio Nodes are selected it will toggle them
2) If no Radio Nodes are selected it will toggle ALL of them first
to show, then hide
Introduced:
EP6R1
Modified:
EP6R1
- hideAllRadioNodeConnections()
Hides all Radio Connections in the current Graph Tab
Introduced:
EP6R1
Modified:
EP6R1
- jumpViewToRadioNodeConnection()
Focuses your Nodegraph on connected Nodes from the currently selected Radio Node or
Radio Transmitter Node
Introduced:
EP6R1
Modified:
EP6R1
- showAllRadioNodeConnections()
Shows all Radio Connections in the current Graph Tab
Introduced:
EP6R1
Modified:
EP6R1
- toggleRadioNodes(node, Force=False, ForceMode='')
A Python API method to toggle a Radio node, so it doesn't require UI interaction like
selections.
By using Force and Force Mode "Show" or "Hide" you can show all or hide all
Arguments:
node (mari.Node): The node to set
Force (bool): By setting a Force Boolean you can force a mode such as Hide or show otherwise it just toggles
ForceMode (string): 'Show' or 'Hide to show or hide a connection
Introduced:
EP6R1
Modified:
EP6R1
- toggleSelectedRadioNodesConnection()
Toggle Selected Radio Nodes between "Show Connection" and "Hide Connection"
Introduced:
EP6R1
Modified:
EP6R1
- updateRadioNodes(portName, node)
Updates the Label of the Radio node and Radio Transmtiters based on the current connections
Arguments:
portName (string): Unused: An optional portname. This is here to work with nodeInputChanged signal payloads
node (mari.Node): A Mari Node.
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.connectRadioNodeToTransmitter()
Launches the "Connect to Transmitter" dialog
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.connectRadioNodeCreationSignal()
EP DEPRECATION WARNING: This method is deprecated and will be removed in a future version.
Monitors if a created Node is a Radio Node
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createRadioNodePreference()
Adds Radio Node Preferences to the Mari Preferences
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.disconnectRadioNodeCreationSignal()
EP DEPRECATION WARNING: This method is deprecated and will be removed in a future version.
Turns off monitoring of Nodecreation in your project for Radio Nodes
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.reconnectRadioNodeToTransmitter(radionode)
This reconnects a Radio Node to a Transmitter based on previously
connected Radio Node Connection.
Given a Radio Node this method will search your nodegraph
for a Transmitter Node matching the name of a Transmitter Node
that was previously connected to that radio node and reconnect it.
Part of a system of reconnecting parts of your nodenetwork on import
to project specific parts of your graph such as Ambient occlusion etc.
Arguments:
radionode (mari.Node): The Radio Node to sample.
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveRadioNodePreference()
Saves the On/Off State of Radio Node Preferences in the Mari Preferences
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.updateAllRadioNodes()
Builds a signal connection to update all Radio Nodes and Radio Transmitter names, if the input changes
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Path resources such as extension pack icon paths and extension pack
default object paths
- extPacK_3rdParty_path()
Path to 3rd Party Modules
Introduced:
EP6R2v2
Modified:
EP6R2v2
- extPack_archives_path()
The path to Extension Pack Archives
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_baseShapes_path()
The path to Extension Pack Shape Textures
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_gradients_path()
Path to Gradient presets for the Gradient Editor
Returns:
string: The resolved path
Introduced:
EP6R2
Modified:
EP6R2
- extPack_grunges_path()
The path to Extension Pack Grunge Textures
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_hdris_path()
The path to Extension Pack HDRI Textures
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_hotboxes_path()
The path to Extension Pack Hotboxes inside of the Resources Folder
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_icon_path()
The path to Extension Pack Icons
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_imageNotes_anatomy_path()
Path to icons for the "Image Notes" Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_imageNotes_materials_path()
Path to icons for the "Image Notes" Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_imageNotes_path()
Path to icons for the "Image Notes" Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_imageNotes_shaderStreams_path()
Path to icons for the "Image Notes" Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_imageNotes_utilities_path()
Path to icons for the "Image Notes" Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_materialpreset_path()
The path to Extension Pack Material Presets
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_modoBakePresets_path()
The path to Extension Pack Modo Bake Presets
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_object_path()
The path to Extension Pack Default Objects
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_offlineSplashContent_path()
returns the folder where content is stored that is used in te splash screen
if the internet cannot be accessed
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_procedurals_path()
The path to Extension Pack Procedural Masks for the Mask shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_resource_locator(alwaysReturnAPath=False)
Returns the custom paths specified via the 'Resources.json' file
The Resources Json File can be used to move the large Extension Pack
Resources out of the Mari Script Folder
Arguments:
alwaysReturnAsPath (bool): If true, the method will always return a string, never None
Returns:
string or None: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_settings_path()
The path to Extension Pack Settings inside of the Resources folder
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_shelf_data_path()
Path to Extension Pack's shared Image Data Folder
Returns:
string: The resolved path
Introduced:
EP6R2v2
Modified:
EP6R2v2
- extPack_smartmasks_path()
The path to Extension Pack Smart Masks for the Mask Shelf
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_textures_path()
The path to Extension Pack Textures
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- extPack_tools_path()
Returns the Base Path of the Tools Directory
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
- mari_settings_locator()
Returns the Mari Settings directory setting:
Auto-Detect means EP will auto-detect based on common Settings Files
A Full Path
or a Mari Variable mari.resources.path( mari.resources.settingsPathKey() )
Returns:
string: The resolved path
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Selection related tools
- isolateSelect()
Isolates visibility of the selection
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
selection group related methods
- combineSelectionGroups(groupList, newName, removeOld=False)
Combines given selection groups into a combined one.
SPECIAL GROUP REQUIREMENTS:
Please note you cannot freely mix Selection Group Types for
Combining. You can mix:
- Face & Object Selection Groups
- Patch & Object Selection Groups
However you cannot mix:
- Face & Patch Selection Groups
Arguments:
groupList (tuple): a list of mari.SelectionGroups to combine
newName (string): the new name of the combined selection group
removeOld (bool): Optional. If True,the original groups from the groupList will
be deleted after combining. Defaults to False.
Returns:
mari.SelectionGroup: returns the newly created, combined selection group
Introduced:
EP6R2
Modified:
EP6R2
- complexSearch(search, group_list, default_groupmode_list=None, default_visibility_modelist=None, limit_visibility_modifier=None, default_active_modelist=None, setData=None, forceInPathSearch=False, forceInObjectSearch=False, emptySearchReturnsTrue=False)
The search algorithm parses a given list of Selection Groups
against a search string with complex filtering options.
It returns a dictionary in format {SelectioGroupUUID : boolean},
with True, if the Search produces a matching result.
The search string offers a variety of operators:
SIMPLE WORD FILTER OPERATORS
+ (plus) , (comma) and ! (except) act as modifiers for words and
can be combined e.g. "wheel+cart+!horse" or "wheel+cart+!horse,car"
Both produce True for Selection Group Names containing "wheel" and "cart"
but not "horse", while the second option also produces True for elements
containing "car"
SUBTRACTIVE SETS
You can subtract word or word groups by prefixing them with a minus (-)
.E.g. roof-top of
The subtract operation will first run the quick visibility based on the other search terms, then as a last step'
turn off visibility for all Selection Groups matching the subtractive Word Group.
'
GLOBAL VARIABLES VS LOCAL VARIABLES
The search offers a variety of variables to further fine tune the search,
e.g. $vis filters only for visible selection groups.
Variables can exist in a global scope or a local scope.
$vis,wheel,cart,horse
applies the visibility filter to all search words - wheel, cart and horse.
$vis,wheel,cart+$invis,horse
applies the global visibility filter to "wheel" and horse, while "cart" has its
own local variable, filtering for Invisible groups instead.
AVAILABLE VARIABLES
Selection Group Types filter for the type of Selection Group e.g. a Face Group.
The inverse (!) excludes this one Type:
$face,!$face,$patch,!$patch,$obj,!$obj
The visibility Types filter for the visibility state of a selection group.
The inverted option (!) act like their counterpart e.g. !$vis == $invis
$vis,!$vis,$invis,!$invis
Set Filters filter against visible groups in a given "Visibility Set"
(defined in the Quick vis toolbar in the Selection Group Palette)
$inset:SETNAME,!$inset:SETNAME
"Active" Filters are a special Argument that can be fed in as part of the
provided selection group list. If instead of a list with Selection groups
e.g. [grp1,grp2,grp3] you feed in a nested list [[grp1,True],[grp2,False]]
the boolean argument is tested against with the "Active" Filter.
$act,!$act
Path Filters allow for precise positioning of a Filter within a selection
group name that has a hierarchy e.g. /Carriage/Cart/Wheel/spoke
By specifying the number of forward slashes in the Variable, you will limit
the search to parts of the selection group name that appear after the specified
slash number. E.g. for "/Carriage/Cart/Wheel/spoke", $/// will evaluate the Group
Name as "/Wheel/spoke"
$/,$//,$///,$//// etc.
You can invert the search by counting the slashes backwards.
E.g. for "/Carriage/Cart/Wheel/spoke", !$/ will evaluate the Group name as "spoke"
All variables can be mixed and matched, in local and global scope.
GENERIC VARIABLES
Generic variables can only be used in isolation. No other characters can appear in search string
* -- The star character (*) will show all Selection Groups'
!* -- The exclamation mark (!) followed by a star character (*) will hide all Selection Groups
| or ` -- The Pipe Character (|) or Backtick Character (`) will invert the visibility states of selection groups.
Arguments:
search (str):
The Search String to test group names from the Group list against
group_list (list):
A list of mari.SelectionGroups.
(GroupA,GroupB,GroupC)
If you sublist groups with an additional Boolean Argument
( (GroupA,True),(GroupB,False),(GroupC,True))
you can test against the boolean using the $act and !$act variables
default_groupmode_list (list):
Optional. Defaults to ['Face','Patch','Object'].
The defaults are used when no specific Type Variable
was supplied in the search string. You can use this
to limit the search to certain Types of Selection Groups
even when no Type Argument was given
default_visibility_modelist (list):
Optional. Defaults to ['visible','hidden'].
The defaults are used when no specific Visibility Variable
was supplied in the search string. You can use this
to limit the search to visibilities of Selection Groups
even when no Visibility Argument was given
limit_visibility_modifier (bool):
Optional. Defaults to False.
If True any visibility query works as a limiter to
what selection groups are processed.
When True and an invisible Group is encountered,
further processing of Group arguments stops.
This can work like an 'additive mode'.
default_active_modelist (list):
Optional. Defaults to ['active','disabled'].
The defaults are used when no specific Active State Variable
was supplied in the search string. You can use this
to limit the search to Active States of Selection Groups
even when no Active Argument was given.
The Active States can be supplied as part of the group_list
argument. Refer to that one for more information.
default_materialID_list (tuple):
Optional. e.g. ( (0.0,0.0,0.0,1.0), (1.0,0.0,0.0,1.0) )
The default Material ID list allows you to specify one or multiple sets of Material ID Colors
to search for. All other search operations will still be in effect however the end result
will only return true if the "ID_Override_Color" Metadata matches at least one of the
provided colors.
setData (dict):
Optional.Defaults to None
The setData is necessary if you want to use any of the $inset:SETNAME variables.
In order to not read Visibility Set Data in on any search, you need to provide
the set data through this argument.
You can fetch Visibility Set Data for your Project by calling
mari.ExtensionPack.selection_group.getVisibilitySets()
forceInPathSearch (bool):
Optional.Defaults to False.
If turned on a Selection Group Name containing a hierarchy (e.g /car/wheel/rims)
will be split for processing to contain only the "groups".
With this option turned on the selection group name that will be processed
for searching in this example is /car/wheel
forceInObjectSearch (bool):
Optional.Defaults to False.
If turned on a Selection Group Name containing a hierarchy (e.g /car/wheel/rims)
will be split for processing to the last part.
With this option turned on the selection group name that will be processed
for searching is /rims
emptySearchReturnsTrue (bool):
Optional. Defaults to False
If the user provides an empty string, usually this automatically returns False
Which this flag set, the return Value is True (if other flags such as Selection Mode
etc. also match)
Returns:
dict: Returns a dictionary in format {SelGroup_UUID:Boolean}
The dictionary contains two additonal Keys
"Subtractive":
It's value being a list of UUIDs that are matched by the
minus (-) operator
"Globals":
Globals contains a dictionary of modified global default values.
Global default values are for example the arguments,
default_groupmode_list,default_visibility_modelist,
default_active_modelist and default_materialID_list.
As these defaults can be modified by search strings,
for additional processing the new defaults are returned as well.
Introduced:
EP6R2
Modified:
EP6R2
- deleteAll()
Delete All Selection Groups matching type (object, patch etc.)
Introduced:
EP6R1
Modified:
EP6R1
- deleteUnused()
Will delete any Face Selection Group that does not belong to any
Object or Object Version in your Project (greyed out selection group).
If the parent object exists anywhere iny our scene (e.g. as an object version)
the Selection Group will be kept
Introduced:
EP6R1
Modified:
EP6R1
- getVisibilitySets()
Retuns a dictionary with defined Visibility Sets in the
current project
Returns:
dict: Returns a Dictionary with all Visibility Sets (lowercase)
Each Dictionary Key contains the Pretty Name and
a List with all Selection Groups of the Visibility Set.
Each Selection Group has a list with [Name,GroupType,Visibility]
Introduced:
EP6R2
Modified:
EP6R2
- hideAll()
Hide All Selection Groups
Introduced:
EP6R1
Modified:
EP6R1
- hideUnselected()
Hide unselected Selection Groups
Introduced:
EP6R1
Modified:
EP6R1
- invertVisibility()
Inverts the visibility of selection groups
Introduced:
EP6R1
Modified:
EP6R1
- lockAll()
Lock All Selection Groups
Introduced:
EP6R1
Modified:
EP6R1
- removeMaterialIDOverride(SelectionGroups)
Removes a Material ID Override on the provided Selection Group(s)
Arguments:
SelectionGroups (list): A list of selection Groups to apply the override to
Introduced:
EP6R1
Modified:
EP6R1
- setMaterialIDOverride(SelectionGroups, color)
Sets a Material ID Override on the provided Selection Group(s)
Other than setMaterialIDColorByDialog this works via API
Arguments:
SelectionGroups (list): A list of selection Groups to apply the override to
color (list): A list of 4 values - [R,G,B,A] - from 0 to 1
Introduced:
EP6R1
Modified:
EP6R1
- showAll()
Show All Selection Groups
Introduced:
EP6R1
Modified:
EP6R1
- unlockAll()
Unlock All Selection Groups
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.combineSelectionGroups()
Launches the "Combine Selection Groups" Dialog
Introduced:
EP6R2
Modified:
EP6R2
- __epGUI__.deleteAll_containingName()
Delete All Selection Groups matching or containing a string
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.materialID()
Launches the "Material ID from Selection Groups" Dialog
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.multiRenameSelectionGroups()
Opens a Dialog to rename Selection Groups with multiple options
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.searchAndReplaceNames()
Rename selection groups with a search and replace
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.setMaterialIDColorByDialog(selGroups=None)
Spawns a dialog that lets the user set custom ID Colors for Selection Groups
Arguments:
selGroups (list): A list of optional selection Groups, otherwise the current selected one is used
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.deleteQuickVisibilityToolbar()
Removes the Quick Visibility Toolbar from the Selection Group Palette
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.disableQuickVisToolbar()
Disable all UI Elements of the Quick Vis Toolbar
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.enableQuickVisToolbar()
Enable all UI Elements of the Quick Vis Toolbar
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.initializeQuickVisToolbar()
Reinitializes the Quick Visibility Toolbar.
with Project specific Search History and Visibility Sets.
Get's called on Project open
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.installQuickVisibilityToolbar()
Adds a Quick Visibility Toolbar to the Selection Group Palette
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.quickVisibilityWidget()
Returns the Main Widget of the Quick Visibility Toolbar in the Selection
Group Palette
Returns:
QHBoxLayout: the main Layout of the new Quick Vis Toolbar
or None.
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.saveQuickVisSettings()
Saves the settings of the Quick Vis Toolbar e.g.
Combobox History, Material ID Filters, Visibility Sets
Triggered usually on Project save
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.updateMaterialIDFilters()
Updates the Material ID Filter List
in the Quick Vis Toolbar based on existing
Material ID Overrides on Selection Groups
Introduced:
EP6R2
Modified:
EP6R2
Class Description:
Shader related methods
- selectLastShader()
Tries to toggle to the last used shader
Introduced:
EP6R1
Modified:
EP6R1
- syncObjectShaderSelection()
Syncs all shader selections on all objects in a project to the current shader name
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.selectLastShader_monitorShaderChangesOnGeoAdded()
Sets up a signal to monitor shader changes when a new piece of geo is added
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.selectLastShader_monitorShaderChangesOnProjectOpen()
Sets up a signal to monitor shader changes when a project is oppened
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Methods related to the Shader Preset system
- removeShaderPreset()
Removes a shader preset based on the selected shader.
This removes any prese that is saved for the current shader type
Introduced:
EP6R1
Modified:
EP6R1
- restoreShaderChannelInputsFromPreset()
If a preset matching the type of the selected shader is found, this will restore
all shader inputs to the saved preset based on channel names
If a channel matching the channel name in the preset is found, it will be assigned to the
corresponding shader input
Introduced:
EP6R1
Modified:
EP6R1
- restoreShaderDefaultInputs()
With a shader selected in the Shader Palette, this will restore the shader to the state
it was before "setNodesToShader" method was first used
Introduced:
EP6R1
Modified:
EP6R1
- restoreShaderParametersFromPreset()
If a preset matching the type of the selected shader is found, this will restore
all shader attributes to the saved preset
Introduced:
EP6R1
Modified:
EP6R1
- saveShaderPreset()
Stores a shader preset from the selected shader
Shader presets contain all settings and channel input assingments of the selected shader.
The preset is saved based on the currently selected shader type (e.g. arnold, vray etc.)
Introduced:
EP6R1
Modified:
EP6R1
- setNodesToShader()
With a shader selected in the Shader Palette, selected Nodes in the Nodegraph will be checked
if they contain any names of channels that have been previously saved in a shader preset.
If a channel name is part of the Nodename the Node will be assigned to the corresponding channel input
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.monitorShadersOnGeoAdded()
Adds a signal monitoring to a new object in a project so we can detect if a new shader is added
and compare it on creation if a preset needs to be applied
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.monitorShadersOnProjectOpened()
Adds a signal monitoring to each object in a project so we can detect if a new shader is added
and compare it on creation if a preset needs to be applied
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Shading related methods
- disableViewport(mode)
Turns the spinning wheel on in the Mari viewport to pause viewport updates
Arguments:
mode (str): "iconOnly" will only set the action icon to enabed/disabled (toggle) without actually launching anything.
This is to handle any python action that doesn't directly call the disableViewport Action.
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Shelf methods for standard Mari Shelf System
- createItem(shelf, item_type, item, ForceImmediateLoad=False)
Wrapper for Mari's createItem and createItemType Functions
Mari 6 overloaded the shelf.createItem() function and going forward
Mari will use shelf.createItemType() instead.
This Wrapper deals with the differences for one single function call within
tools
Arguments:
shelf (mari.shelf): The Shelf to create the Item in
item_type (ShelfManager.ItemType): The type of the item to create a shelf item for.
Valid Items currently are:
- mari.shelves.SHELF_ITEM_MATERIAL
- mari.shelves.SHELF_ITEM_IMAGE
- mari.shelves.SHELF_ITEM_COLOR
- mari.shelves.SHELF_ITEM_BRUSH
- mari.shelves.SHELF_ITEM_COLOR_PROCEDURAL
- mari.shelves.SHELF_ITEM_PROCEDURAL_MASK
- mari.shelves.SHELF_ITEM_SCALAR_PROCEDURAL
- mari.shelves.SHELF_ITEM_SCRIPT
- mari.shelves.SHELF_ITEM_UNKNOWN
Please see Mari Python Documentation as more item types
might have been added in the meantime.
item (variant): A valid path to a file, a mari.Image Object,a mriColor, Script or
Brush XML. Depending on Type different file extensions
are supported. See Python Help createShelfItemType() for more info
forceImmediateLoad (bool): Force loading custom procedural and material items in a foreground
process. Defaults to False.
Returns:
ShelfItem: The newly created shelf item or None
Introduced:
EP6R2
Modified:
EP6R2
- deleteAllUserMariShelves()
Deletes all custom Shelf Tabs inside the Standard Mari Shelf System
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.createShelfFromFolder_UI()
Launches a UI to create Shelves from Folders
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createAdditionalShelfUIElements()
Modifies the standard Mari Shelves UI and adds new buttons
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Splash Screen
- splashScreenConnectionTimeOut()
Returns the Connection Timeout for loading Splash Screen Content
from the Mari Preferences (Misc/Internet)
This can be overwritten with the Environment Variable
MARI_EP_SPLASHSCREEN_CONNECTION_TIMEOUT
The value is set to 0.5 by default
This setting controls the timeout before Extension Pack
a) forces the Splash Screen to Offline Content Mode
b) how long it waits to retrieve content if not in offline mode
Returns:
(float): A float value for the timeout
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.showSplashScreen()
Launches the Splash Screen
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.showSplashScreen_ifAllowed(Force=False)
Launches the Splash Screen if the user allows it / checkbox is set
Arguments:
Force (bool): If True the Splash Screen will always be shown,
even if the user deactivated the "Show On Startup" Option
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addSplashScreenTimeoutPreference()
Adds a Connection Timeout Preference to
the Mari Preferences Misc Tab.
This setting controls the timeout before Extension Pack
a) forces the Splash Screen to Offline Content Mode
b) how long it waits to retrieve content if not in offline mode
- __epSystem__.changeSplashScreenTimeoutPreference()
Updates stored settings for the Connection Time Out Preference in
the Mari Preferences Misc Tab.
This setting controls the timeout before Extension Pack
a) forces the Splash Screen to Offline Content Mode
b) how long it waits to retrieve content if not in offline mode
- __epSystem__.createOfflineThumbnailsFromJson()
Will download Thumbnails into Resources/Spash
for use with the Splash Screen if no internet is available
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Symmetry related methods
EP DEPRECATION WARNING: This class is deprecated and will be removed in the future
- activateSymmetryX()
EP DEPRECATION WARNING: This method is deprecated and will be removed in the future
Activates Symmetry Bake in Mari X Axis
Introduced:
EP6R1
Modified:
EP6R1
- activateSymmetryY()
EP DEPRECATION WARNING: This method is deprecated and will be removed in the future
Activates Symmetry Bake in Mari Y Axis
Introduced:
EP6R1
Modified:
EP6R1
- activateSymmetryZ()
EP DEPRECATION WARNING: This method is deprecated and will be removed in the future
Activates Symmetry Bake in Mari Z Axis
Introduced:
EP6R1
Modified:
EP6R1
- setSymmetryMode()
EP DEPRECATION WARNING: This method is deprecated and will be removed in the future
Toggles between different Symmetry Modes
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Text Tool related methods
- __epGUI__.textGenerator()
Launch the EP Text Generator
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
methods that get called from toolbars
- alignLocatorToView()
aligns a locator to the current camera view
Introduced:
EP6R1
Modified:
EP6R1
- flipPaintThroughImage_Horizontally()
Flips a PaintThrough Image Horizontally
Introduced:
EP6R1
Modified:
EP6R1
- flipPaintThroughImage_Vertically()
Flips a PaintThrough Image Horizontally
Introduced:
EP6R1
Modified:
EP6R1
- forceActivateTransformTool()
Activates the "Transform Selected Objects" Tool in a way that it skips any potential dialog pop-ups
Introduced:
EP6R2
Modified:
EP6R2
- scaleAndCenterLocator()
Scales the current locator to fit the object it belongs to and center on object
Introduced:
EP6R2
Modified:
EP6R2
- __epSystem__.addOptionsToPaintThroughToolbar()
Adds Extension Pack Options to the Paint Through Toolbar.
This is not building signal connections and is safe for repeated
execution.
This method is mostly called by drag and drop events where the
classic tool switch signal is not fired.
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.addProjectionModeOptions(addSeparator=True)
Adds UI elements for Projection Mode and Target
Arguments:
addSeparator (bool): if to separate the new UI elements with a separator line
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.changeProjectionModePreference()
Executes a change in Preferences from the Painting Tab of the Preferences to display Projection Modes
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.changeToolsToolbarPreference()
Launches an operation to edit the DefaultToolbars.conf file when the setting is changed
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createProjectionModePreference()
Adds Preferences to the Painting Tab of the Preferences to display Projection Modes
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.createToolsToolbarPreference()
Adds Settings to the Preferences to control the appearance of the Mari Tools Toolbar
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_Locator()
If a Node or Layer supporting Locators is selected while the Transform Object Tool
is activated, I jump to a locator. If none exists a new one is created with the existing
transforms of the Locator List
This method sets up the necessary Signals
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_PaintThroughToolbar()
Adds Extension Pack Options to the Paint Through Toolbar when
Paint Through Tool is activated. It buils a signal connection, so should
not be executed repeatedly
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_SyncedBufferDepth()
Turns on Buffer BitDepth Syncing on a new session if it was active on previous session close
Buffer BitDepth Syncinc will constantly switch the paint buffer bit depth to the
bit depth of the currently selected paint target.
It buils a signal connection, so should
not be executed repeatedly
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_TransformPaintToolbar()
Adds Extension Pack Options to the Transform Paint Toolbar.
It buils a signal connection, so should
not be executed repeatedly
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.initialize_transformObjectToolbar()
Adds Extension Pack Options to the Transform Object Toolbar.
It buils a signal connection, so should
not be executed repeatedly
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.loadProjectionModePreference()
Loads Preferences from the Painting Tab of the Preferences to display Projection Modes
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveProjectionModePreference()
Saves Preferences from the Painting Tab of the Preferences to display Projection Modes
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.saveToolsToolbarPreference()
Saves the State of preferences to control the appearance of the Mari Tools Toolbar
Introduced:
EP6R1
Modified:
EP6R1
- __epSystem__.syncProjectionModeOptions()
Can be called to sync the state of the Projection Mode (Front,Through) and Target (all, selectedOnlu)
to the state of the properties in the Painting Palette
Returns:
None
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Various Python Helper Methods
- TDRCheck()
Runs a TDR Check on windows system and shows a warning to the user if the settings are not recommended
Doesn't do anything if settings are ok or on Linux or Mac
Returns:
(bool): Returns True if the Dialog was accepted or False if the Dialog was rejected
Introduced:
EP6R1
Modified:
EP6R1
- changeFileOwnership(path)
Linux Only: changes a file ownership to the current user
Arguments:
path (str): A path to a file or folder
Introduced:
EP6R1
Modified:
EP6R1
- closeAllOpenProgressDialogs()
Closes any open progress Dialogs from the utils.progressDialog() method
Introduced:
EP6R1
Modified:
EP6R1
- copytree(src, dst, symlinks=False, ignore=None, copy_function=, ignore_dangling_symlinks=False)
Recursively copy a directory tree.
Reimplementation due to permission copy issue
The destination directory must not already exist.
If exception(s) occur, an Error is raised with a list of reasons.
If the optional symlinks flag is true, symbolic links in the
source tree result in symbolic links in the destination tree; if
it is false, the contents of the files pointed to by symbolic
links are copied. If the file pointed by the symlink doesn't
exist, an exception will be added in the list of errors raised in
an Error exception at the end of the copy process.
You can set the optional ignore_dangling_symlinks flag to true if you
want to silence this exception. Notice that this has no effect on
platforms that don't support os.symlink.
The optional ignore argument is a callable. If given, it
is called with the `src` parameter, which is the directory
being visited by copytree(), and `names` which is the list of
`src` contents, as returned by os.listdir():
callable(src, names) -> ignored_names
Since copytree() is called recursively, the callable will be
called once for each directory that is copied. It returns a
list of names relative to the `src` directory that should
not be copied.
The optional copy_function argument is a callable that will be used
to copy each file. It will be called with the source path and the
destination path as arguments. By default, copy2() is used, but any
function that supports the same signature (like copy()) can be used.
Introduced:
EP6R1
Modified:
EP6R1
- correctPath(path)
fixes common path slash issues.
Also accounts for server paths.
Arguments:
path (str): the path to fix
Returns:
string: the corrected path
Introduced:
EP6R2:
Modified:
EP6R2
- findTriggerAction(actionpath)
Given a Mari Action path, this command will find and trigger the action
Arguments:
actionpath (string): a mari action path to trigger
Introduced:
EP6R1
Modified:
EP6R1
- forceFocusReturn()
Returns the Focus to Mari and the Widget the Cursor is over
Other than standard qt setFocus(), this also ensures that the correct
Hotkey Context is set, so Mari is accepting shortcuts again without delay.
This is useful if you have launched a modal dialog and after it closes Mari is not
accepting Key Presses until a second or so later the focus system returns the focus
and activates correct contexts.
By calling this method you save the 1 second delay
Introduced:
EP6R2v2
Modified:
EP6R2v2
- getChildren(obj)
Returns all children of a given object recursively
Arguments:
obj (dict): a parent object
Returns:
list: a list of all children
Introduced:
EP6R2
Modified:
EP6R2
- getImageAttributeNames()
Returns a list of Image Attributes used in Mari Nodes.
Useful if you need to check for Images on Nodes
Returns:
(list): a list of attribute names for nodes that use those names for image attributes
Introduced:
EP6R1
Modified:
EP6R1
- getMariSettingsFolder()
Returns the Location of the Mari config file.
The path is detected based on the existence of the unpremultiplyAlpha file
in the settings folder, since mari by default does not have an option to
detect that setting folder via API
Returns:
(string): Path the the Mari User Settings Folder
Introduced:
EP6R1
Modified:
EP6R1
- getUIScaleFactor()
returns a scale factor for UIs based on Maris Custom Font Size Setting
Returns:
(float): A Scale Factor
Introduced:
EP6R1
Modified:
EP6R1
- mariIsShuttingDown()
Returns True or False if Mari has entered its shutdown procedure.
This can be useful to prevent "patched on" widgets that are not native to Mari's UI from having their functions
called (e.g. size hints) during the shutdown procedure which has caused non-clean mari exits
(python errors on exit) before
Returns:
bool: True if mari.app.exiting has been initiated
Introduced:
EP6R2v2
Modified:
EP6R2v2
- mariMainWindowObject()
This returns the Mari Main Window Object or None if not found
Returns:
(QDialog): Returns the Mari Main Window Object if found
or None if not found
Introduced:
EP6R1
Modified:
EP6R1
- mariViewport()
This returns the current Mari Viewport
Returns:
(QOpenGlWidget): Returns the Mari Viewport Widget if found
or None if not found
Introduced:
EP6R2v2
Modified:
EP6R2v2
- message(text, title='[EP] ', buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, icon=PySide2.QtWidgets.QMessageBox.Icon.Information, details=None, defaultButton=None, parent=None)
Wrapper for mari.ExtensionPack.utils.message that prefixes [EP] to the Title Bar
- messageResult(text, title='[EP] ', buttons=PySide2.QtWidgets.QMessageBox.StandardButton.Ok, icon=PySide2.QtWidgets.QMessageBox.Icon.Information, details=None, defaultButton=None, parent=None)
Wrapper for mari.ExtensionPack.utils.messageResult that prefixes [EP] to the Title Bar
- openFileBrowser(path, directoryOnly=True, iteratePathUntilFound=True)
open file browser in path location or run file if path is a file name
Arguments:
path (string): A path to a file or folder
directoryOnly (bool): If True,only allows to open paths that are directories
iteratePathUntilFound (bool): If true, the method will step up the file folder structure if
the provided path does not exist, until a valid path is found
Introduced:
EP6R1
Modified:
EP6R1
- progressDialog(maxStepsPrimary, showSecondaryBar=False, maxStepsSecondary=0, windowTitle='Progress', initialInfoMsg='', initialStatusMsg='', autoClose=True, showAbortMessage=False, AbortMsg='', AbortTitle='', MinWidth=400, parent=None)
Returns a progress Dialog than can be shown with object.exec_() or object.show().
Arguments:
maxStepsPrimary (int): The Maximum Number of Steps of the Primary Progress bar
showSecondaryBar (bool): Optional: If True, a secondary Progress Bar will be shown
maxStepsSecondary (int): Optional: The Maximum Number of Steps of the Secondary Progress bar
windowTitle (str): Optional: The Title of the Progress Bar Window
initialInfoMsg (str): Optional: The Info Message set when the dialog starts
initialStatusMsg (str): Optional: The Status Message set when the dialog starts
autoClose (bool): Optional: If True, when the Max steps are reached, the dialog will close
showAbortMessage (bool): Optional: If True, if the dialog is aborted a message will be displayed
AbortMsg (string): Optional: The Message in the Abort Dialog
AbortTitle (string): Optional: the title of the Abort Dialog
MinWidth (int): Optional: Dialog Width
parent : Optional: Window Parent
Returns:
QDialog: Returns the Progress Dialog Window
------------------------------------------------------------------------------------------
Related Methods:
dialog.evaluatePrimaryProgress(): checks if current Progess Bar Steps are equivalent to max steps
If they are the progress bar is closed if autoClose parameter is set
dialog.evaluateSecondaryProgress(): checks if current Progess Bar Steps are equivalent to max steps
If they are the progress bar is closed if autoClose parameter is set
dialog.closeProgressBar(): Will close the Progress Bar
dialog.nextPrimaryStep(): Adds +1 to the Progress Bar Steps processed
dialog.nextSecondaryStep(): Adds +1 to the Progress Bar Steps processed
dialog.setNewMaxPrimaryStep(value): Sets a new Maximum Range for the dialog
dialog.setNewMaxSecondaryStep(value): Sets a new Maximum Range for the dialog
dialog.setPrimaryStepsTaken(value): Sets the current Steps Taken Value. You can also use nextStep()
dialog.setSecondaryStepsTaken(value): Sets the current Steps Taken Value. You can also use nextStep()
dialog.updateStatusMessage(msg): Changes the Status Message
dialog.updateInfoMessage(msg): Changes the Info Message
dialog.updateAbortMessage(msg): Change the Abort Message
dialog.updateAbortWindowTitle(msg): Update the title of the Abort Message
dialog.isAborted(): Returns if the Dialog has been aborted by the user
dialog.cancelDialog(): Closes the Progress Bar.
Introduced:
EP6R1
Modified:
EP6R1
- sanitizeText(text, sanitizeSlashes=False, removeWhiteSpace=True)
Removes invalid characters from given text.
Invalid Characters are by default: #$%^&*{|}:!?
If sanitizeSlashes Argument is given this also includes \/
Arguments:
text (str): a string to sanitize
sanitizeSlashes (bool): Defaults to false.
if True, \/ will also be removed.
removeWhiteSpace (bool): Defaults to True.
If True, trailing and leading white spaces
are removed
Returns:
string: Returns the sanitized text
Introduced:
EP6R2
Modified:
EP6R2
- searchInString(search_for, search_in)
The search algorithm parses a given string
against a search string with complex filtering options.
The search string offers a variety of operators:
SIMPLE WORD FILTER OPERATORS
+ (plus) , (comma) and ! (except) act as modifiers for words and
can be combined e.g. "wheel+cart+!horse" or "wheel+cart+!horse,car"
Both produce True for Selection Group Names containing "wheel" and "cart"
but not "horse", while the second option also produces True for elements
containing "car"
SUBTRACTION:
- (minus) acts like a global subtraction. E.g. -blue,yellow,green will be the same
as yellow+!blue,green+!blue
Arguments:
search_for (str): The Search String to search the tags against
search_in (str): the string to search in
emptySearchReturnsTrue (bool): Optional. Defaults to False
If the user provides an empty string, usually this automatically returns False
With this flag set, the return Value is True
Returns:
bool: False for no match, True for match
Introduced:
EP6R2
Modified:
EP6R2
- setting_str_to_bool(settings_value, invalid_defaults_to=False)
Converts a value from the Mari Settings from a String to a boolean value
Arguments:
settings_value (str): The string read out from an init or config file
invalid_defaults_to (bool): Optional. Defaults to False. Determines what the "invalid"
or None value should be converted to
Returns:
bool Returns True or False
Introduced:
EP6R2v2
Modified:
EP6R2v2
- shortenText(text, characterLimit=50, shortenStart=False, short=' ... ')
Shortens a given text so it doesn't exceed the specified characterLimit.
Excess characters are replaced by three dots e.g. "this is a ..." or
"... long text" (if shortStart is True)
Arguments:
text (str): the text you want to shorten
characterLimit (int): Optional. The maximum number of characters in the given text
after which the shortening should kick in
shortStart (bool): Optional. By default the shortening happens at the end of the text
e.g. "this is a very long text" becomes "this is a very ...".
If this argument is True, instead the shortening happens at the
start e.g. "this is a very long text" becomes "... very long text"
short (str): Optional. The string to substitude excess characters with.
Defaults to " ... ".
Returns:
(string): Returns the shortened text
Introduced:
EP6R2:
Modified:
EP6R2
- windowOffsetPosition(useSafeMargin=True, paddingList=None, offsetList=None)
Returns positional coordinates to move a window to the cursor to.
By default with a safe area from the corners of the application,
as to prevent dialog opening half off screen.
Arguments:
useSafeMargin (bool): if true, a safe margin is used to move the window away from
paddingList (List): A list of 4 float values to define the pading
around the corners if useSafeMargin in on.
If the cursor is within the Padding, the Offset from
the OffsetList will kick in.
[fromLeft,fromTop,fromRight,fromBottom]
If NONE, will default to [200.0,150.0,150.0,150.0]
offsetList (List): A list of 4 int values to define the offset
from the corners if useSafeMargin in on.
If NONE, will default to [200,150,-200,-150]
offsetlist = [fromLeft,fromTop,fromRight,fromBottom]
Returns:
tuple (int,int): The Offset Coordinates
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.shortcutResolveDialog(mode='help')
Opens a Dialog to resolve Mari vs EP Shortcut conflicts.
Mari 7.1 or higher only.
Arguments:
mode (str): Determines the mode this dialog is launched in.
"startup" : This is for when the dialog is called after Mari Launch.
A series of checks is run if and what do display in the Dialog.
"help": This (or any other string) triggers the dialog to launch in "full"
mode displaying all possible options. This is called when launching
it from the help menu.
Introduced:
EP6R2v2
Modified:
EP6R2v2
Class Description:
Methods to determine Extension Pack Versions
- buildVersion()
returns the build Version
Returns:
(int): The Build Version of the current EP Version
Introduced:
EP6R1
Modified:
EP6R1
- checkResourceVersion()
Checks if the currently loaded Resources are the right ones to use with this EP Version
Introduced:
EP6R1
Modified:
EP6R1
- devToolsVisible()
Returns if the current Version should show Dev Tools
Returns:
(bool): True if Dev Tools should be shown
Introduced:
EP6R2
Modified:
EP6R2
- isAlphaVersion()
Returns if the current Version is marked as an Alpha Version
Returns:
(bool): True if it is an Alpha Version
Introduced:
EP6R1
Modified:
EP6R1
- isBetaVersion()
Returns if the current Version is marked as a Beta Version
Returns:
(bool): True if it is a Beta Version
Introduced:
EP6R1
Modified:
EP6R1
- isDevVersion()
Returns if the current Version is marked as a Dev Version
Returns:
(bool): True if it is a Dev Version
Introduced:
EP6R1
Modified:
EP6R1
- isNewVersionAvailable(debugMode=False)
Runs an online check if a new version is available
Arguments:
debugMode (bool): Ability to Locally test a Version File under Tools/Dev/Splash_Dev_Content/
Returns:
(dict): A Dictionary containing the following info:
versionDict['newVersionAvailable'] (bool)
versionDict['patchAvailable'] (bool)
versionDict['CurrentVersion']
versionDict['CurrentVersionAsInt']
versionDict['CurrentVersionPretty']
versionDict['RichText_Release_Notes_Link']
versionDict['HelpFile_ReleaseNotes_Link']
versionDict['ReleaseVideo_Link']
versionDict['IsPaidVersionUpgrade'] (bool)
versionDict['UpgradeInfo_HelpLink']
versionDict['ExtraInfo']
Introduced:
EP6R1
Modified:
EP6R1
- isReleaseCandidateVersion()
Returns if the current Version is marked as a Release Candidate Version
Returns:
(bool): True if it is a Release Candidate Version
Introduced:
EP6R1
Modified:
EP6R1
- launchVersionCheck()
Checks if a new Version of Extension Pack is available
and returns a message
Introduced:
EP6R1
Modified:
EP6R1
- majorVersion()
returns the Major Version
Returns:
(int): The Major Version of the current EP Version
Introduced:
EP6R1
Modified:
EP6R1
- mari45OrAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.5 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari46OrAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.6 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari46v4orAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.6v4 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari47OrAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.7 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari47Ov2rAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.7 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari48OrAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.8 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari48v2OrAbove(invert=False)
EP DEPRECATION WARNING: This method will be deprecated in a future version.
Returns true if Mari 4.8 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R1
Modified:
EP6R1
- mari70v1orAbove(invert=False)
Returns true if Mari 7.0 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R2
Modified:
EP6R2
- mari70v2orAbove(invert=False)
Returns true if Mari 7.0v2 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R2
Modified:
EP6R2
- mari71v1orAbove(invert=False)
Returns true if Mari 7.1v1 or higher
Arguments:
invert (bool): Inverts the result
Returns:
bool: True or False if version is higher
Introduced:
EP6R2v2
Modified:
EP6R2v2
- minorVersion()
returns the Minor Version
Returns:
(int): The minor Version of the current EP Version
Introduced:
EP6R1
Modified:
EP6R1
- patchVersion()
returns the patch Version
Returns:
(int): The patch Version of the current EP Version
Introduced:
EP6R1
Modified:
EP6R1
- recommendedEPResourceVersion()
Returns the Resource Version associated to this Install of Extension Pack
Returns:
(int): The Version Number of the Resources that neds to correspond
to the Version Number of the Resources found in Resources/ResourceVersion.ep
Introduced:
EP6R1
Modified:
EP6R1
- version()
returns the full version consisting of major,minor and patch
Returns:
(int): A full version number of EP as integer e.g. 6001
Introduced:
EP6R1
Modified:
EP6R1
- versionAsJson(jsonfile=None)
returns Path to Json file containing current Version Info
Arguments:
jsonfile (string): A custom file name to search for,
otherwise (if None) it defaults to the
predefined version json name in use by EP
Returns:
(string): The path to the Json File
Introduced:
EP6R1
Modified:
EP6R1
- versionPrettyName()
returns the Pretty Version Name
Returns:
(string): The full written out, nice version of EP
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
View related methods
- setViewBackgroundTheme(theme='Default')
Set a View Background Preset
Arguments:
theme (string): the name of the preset.
Available options are:
"Default"
"NeutralGray"
"NeutralGray_Gradient"
"DarkGray"
"Dark"
"Dark_Gradient"
"HighContrast_Gradient"
Introduced:
EP6R1
Modified:
EP6R1
- __epGUI__.screenshot_all_channels()
Screenshot all channels
Introduced:
EP6R1
Modified:
EP6R1
Class Description:
Internet related methods
- downloadImageFromWeb(url)
Downloads an image from the web, saves it as a temporary file,
and returns the filepath
Arguments:
url (string) a path to an image file on the web
Returns:
path (string) a path on disc to the downloaded file
Introduced:
EP6R1
Modified:
EP6R1
- getYouTubeThumbnail(url)
Downloads a thumbnail from youtube, saves it as a temporary file,
and returns the filepath
Arguments:
url (string): a path to a youtube video
Returns:
path (string): a path on disc to the downloaded thumbnail image
Introduced:
EP6R1
Modified:
EP6R1