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()


Offline Version:


You can find an offline version of this help inside Mari under the Python/Documentation Submenu


Available Change Tags:






"Introduced" and "Modified" Tags


From Extension Pack 6R1 on wards, a new Doc String Tag "Introduced" and "Modified" has been added, that can help
track API changes. At the moment most methods are marked as EP6R1, however going forwards this can help identify changes to the API



EP6R1, EP6R1v2

EP6R2, EP6R2v2

EPRR3

Classes


mari.ExtensionPack.appstyle()

Class Description:

Mari UI Style related methods
mari.ep.appstyle.getApplicationStyleSheet(custom_theme=None, prefix_with_qdialog=True)

Convenience method to get the currently set Application Stylesheet.
By default it checks the currently active theme in Mari's Preferences / Misc Tab / Style.
So even though usually a theme change requires a Mari Restart, using this method you
already get the full application stylesheet that will be applied after the Mari restart.

You can use this to rapid test your dialogs during development with different styles.

If you provide the custom_theme argument you can also test different styles without having to switch them
via Mari's Preferences. E.g. custom_theme="Mari Default" will show you the vanilla style sheet,
"Extension Pack Steel" will show you the EP Steel Theme etc.


Arguments:

custom_theme (str or None):  Optional. Defaults to None. A Theme to get the stylesheet for.

prefix_with_qdialog (bool):  Optional. Defaults to True. If True, prefixes all Q... widget selectors with
                             "QDialog " so when applied to your Dialog, it takes precedence over the
                             application stylesheet

Returns:

(str):               A CSS Stylesheet

Raises:

ValueError:          Raises a Value Error if the specified color name doesn't exist in the Appearance.conf file

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.appstyle.getCurrentTheme()

Method to figure out what UI theme is currently active in Mari.
This is done by checking the existence of the DefaultStyleSheet.qss in the Mari User Settings.

Valid returns are:
- Mari Default
- Extension Pack Steel
- Extension Pack Steel (Desaturated)

Themes can be switched in Mari's Preferences Misc Tab.

Returns:

(string):        A string description of the theme that is currently active.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.getWidgetColorDefinition(color_name, fallback_color_name=None)

Returns a Widget Color defined in the Mari "Appearance.conf" file which can be either
found in the Mari User Settings ..

- C:/Users/../.mari/TheFoundry

or in the Mari Install Directory.

- C:/Program Files/Mari../Bundle/Media/Settings


Arguments:

color_name (str): A valid Widget Color name found in the Appearance.conf file

fallback_color_name (str): Optional. A second Color Name to look for if the first one doesn't exist.
                           You can also specify a rgba() or hex (#) color directly

Returns:

(str):               A color string like rgba(255,255,255,255)

Raises:

ValueError:          Raises a Value Error if the specified color name doesn't exist in the Appearance.conf file

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.appstyle.themeBasedOnDefault()

Returns True or False depending on if the current theme is based on Mari's Default stylesheet (True)
or Extension Pack's Custom Stylesheets (False)

As Users can configure their own stylesheet via the Preferences, it is sometimes important to know
what the original theme was that was modified (e.g. to se widget sizes)

Returns:

(bool):        True if the current theme is or is based on Mari's Default stylesheet.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.__epGUI__.applicationStyleEditor()
GUI

Launches a dialog to customize the Mari Appearance

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.__epSystem__.createMariStylePreference()
SYSTEM

Adds Mari Style (brightness) Settings to the Preferences

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.__epSystem__.pauseThemeTriggers(state)
SYSTEM

Pauses or unpauses any Dialog Triggering (e.g. the Style Editor)
when the UI Theme Preference is changed

Arguments:
state (bool): True to Pause, False to Unpause


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.__epSystem__.saveMariStylePreference(preview=False)
SYSTEM

Saves the Mari Style (brightness) settings in the Preferences

Arguments:
preview (bool): Previews the current Style


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.appstyle.__epSystem__.updateThemePreference()
SYSTEM

Updates the Mari Theme settings in the Preferences


Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.archive()

Class Description:

project archiving related tools
mari.ep.archive.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

mari.ep.archive.__epSystem__.archiveUpToDate(cur_project, outOfDate=False)
SYSTEM

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
mari.ep.archive.__epSystem__.markProjectAsArchived(UUID)
SYSTEM

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




mari.ExtensionPack.autosave()

Class Description:

Autosave related methods
mari.ep.autosave.autosavePaused()

Returns True if autosave has been Paused, False otherwise

Returns:

(bool):            True if autosave has been Paused, False otherwise


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.autosave.setPauseAutosave(state)

Pauses or unpauses autosave

Arguments:

state (bool):            True if autosave should be paused, False if it should be unpaused


Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.bake()

Class Description:

Baking related methods
mari.ep.bake.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
mari.ep.bake.__epGUI__.SubstanceAutomationBakeBridgeUI()
GUI

launch the Substance Baker Bridge UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.bake.__epSystem__.addBakePresetsDefaultPaths()
SYSTEM

Appends the Mari Extension Pack Modo Bake Presets
location to the MARI_MODO_BAKE_PRESETS Environment
variable path.

Introduced:
EP6R1

Modified:
EP6R1

mari.ep.bake.__epSystem__.addSubstanceBakerPreference()
SYSTEM

Adds a Preference to the Mari 7 Preferences in the Bakery Tab, allowing you to hide
the Substance Baker Bridge Icon from the UI

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.bake.__epSystem__.resetTemporaryPreferences()
SYSTEM

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:
EP6R3

Modified:
EP6R3

mari.ep.bake.__epSystem__.saveSubstanceBakerPreference()
SYSTEM

Saves a Preference from the Mari 7 Preferences/ Bakery Tab, allowing you to hide
the Substance Baker Bridge Icon from the UI

Introduced:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.bakePoints()

Class Description:

Bake Point related methods
mari.ep.bakePoints.bakeAcrossGeoVersions(node=None)

Baking of Bake Points or Multi Channel Bake Points across geo versions

Arguments:

node (mari.MultiChannelBakePoint | mari.BakePointNode):  Optional. A node to bake. Otherwise selection



Introduced:
EP6R3

Modified:
EP6R3
mari.ep.bakePoints.bakeSelectedBakePoints()

Bakes all selected Bake Points in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.bakePoints.optimizeMultiChannelBakePointStreams(node=None)

Checks the given multi channel bake point node's downstream connections (spanning
nodegraphs e.g. also works inside groups) for channel nodes.

Any stream with a connected channel node will be enabled, any stream without disabled.

Mari does this usually automatically when you create a new MCBP and attach it to a
network however this function allows you to trigger it manually.

Arguments:

node (mari.MultiChannelBakePoint):           Optional. The Node to optimize. 
                                             If None (default), the current Node
                                             selection will be used


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.bakePoints.removeAllBakes()

Removes all Bake Point Bakes from your Project

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.bakePoints.smartBakeAndUpdateAcrossGeoVersions()

Baking of all out of date or unbaked Bake Points or Multi Channel Bake Points across geo versions,
in a hierarchical manner


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.bakePoints.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
mari.ep.bakePoints.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




mari.ExtensionPack.benchmark()

Class Description:

Performance Optimization and Test Methods
mari.ep.benchmark.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

mari.ep.benchmark.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
mari.ep.benchmark.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 re-added 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:
EP6R3

Modified:
EP6R3

mari.ep.benchmark.ramMemoryUsage()

Returns the total and free RAM memory.

Returns:

(list):                           [Total Memory in MB, Free Memory in MB]

Introduced:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.brush()

Class Description:

Brush related methods
mari.ep.brush.getDynamicBrushSize(tool=None)

Gets the set dynamic brushsize for a given tool to a state (on/off)
If no tool argument is given, the current tool is used.


Arguments:

tool (mari.Tool):     The Tool object e.g. mari.tools.currentTool()
                        If no tool is given, the current tool is used.


Returns:
bool:                 True if it is on, False if it is off

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.brush.setDynamicBrushSize(state, tool=None)

Sets the dynamic brushsize for a given tool to a state (on/off)
If no tool argument is given, the current tool is used.


Arguments:

state (bool):         True or False to de/activate dynamic brushsize

tool (mari.Tool):     The Tool object e.g. mari.tools.currentTool()
                        If no tool is given, the current tool is used.


Returns:
None:

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.brush.toggleDynamicBrushSize(tool=None)

Toggles the dynamic brushsize for a given tool on if it is off,
and off if it is on.
If no tool argument is given, the current tool is used.


Arguments:
tool (mari.Tool):     The Tool object e.g. mari.tools.currentTool()
                        If no tool is given, the current tool is used.

Returns:
None:

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.brush.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
mari.ep.brush.__epSystem__.setup_dynamic_brushsize(action_path=None)
SYSTEM

Utility Function to setup the dynamic brushsize system
on Mari Startup




mari.ExtensionPack.camera()

Class Description:

Camera/View related tools
mari.ep.camera.switch_to_ortho_view()

Switch the active tab to the Ortho View

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.switch_to_persp_view()

Switch the active tab to the Perspective View

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.switch_to_split_view()

Switch the active tab to the Split View

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.switch_to_uv_view()

Switch the active tab to the UV View

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.unproject_channel_to_imagemanager()

Unproject Channel to Image Manager tool

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.unproject_layer_to_imagemanager()

Unproject Layer to Image Manager tool

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.camera.unproject_view_to_imagemanager()

Unproject View to Image Manager tool

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.channel()

Class Description:

Channel related tools
mari.ep.channel.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
mari.ep.channel.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
mari.ep.channel.duplicate_channel()

Duplicate selected channel with all sharing intact

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.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
mari.ep.channel.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
mari.ep.channel.focusChannelInGraph()

Selects the corresponding Node of a Channel in the Nodegraph and focuses the view on it

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.lockAllChannels()

Lock all Channels

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.lockChannel()

Lock a Channel

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.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
mari.ep.channel.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
mari.ep.channel.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
mari.ep.channel.unlockAllChannels()

unlock all channels

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.unlockChannel()

Unlock a channel

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.__epGUI__.channelsFromNode_UI()
GUI

Create Channels from a selected Node

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.__epGUI__.create_packed_channel()
GUI

Launch Pack Channel UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channel.__epGUI__.duplicateFlattenChannels()
GUI

Launches Duplicate/Flatten Channel Dialog

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.channelLayer()

Class Description:

Channel Layer related methods
mari.ep.channelLayer.__epGUI__.channelLayer_AddLayer()
GUI

Launches the "Add Channel Layer" UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channelLayer.__epGUI__.channelLayer_AddLayerMask()
GUI

Launches the "Add Channel Mask" UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.channelLayer.__epGUI__.channelLayer_AddMaskGroup()
GUI

Launches the "Add grouped Channel Mask" UI

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.content()

Class Description:

Install Content
mari.ep.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
mari.ep.content.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
mari.ep.content.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
mari.ep.content.rendermanForMariInstalled()

Check if Renderman for Mari is installed

Returns:

(bool)            True if Renderman for Mari is installed


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.content.__epSystem__.addMaterialTemplatePreferences()
SYSTEM

Add Template Preferences to the Mari Preferences

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.content.__epSystem__.loadMaterialTemplatePreference()
SYSTEM

load the Material Template Preferences from the Config file

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.content.__epSystem__.loadMaterialTemplatePreferenceFromEnvVar()
SYSTEM

load the material template preferences from Env Variables

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.content.__epSystem__.saveMaterialTemplatePreference()
SYSTEM

Save the Material Template Preferences to the Config file

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.dev()

Class Description:

A number of tools and dialogs to
easily find classes, methods, actions and menu paths
mari.ep.dev.__epGUI__.action_finder()
GUI

Launches Dialog to search through Mari Actions

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dev.__epGUI__.class_method_finder()
GUI

Launches Dialog to search through available classes and methods

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dev.__epGUI__.menu_path_finder()
GUI

Launches Dialog to search through Mari Menu Paths

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dev.__epGUI__.mimeTypeInspector()
GUI

A simpel dialog accepting Drag and Drop events and returning the Mime Type

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dev.__epGUI__.node_path_finder()
GUI

Launches Dialog to search through available node paths. Requires open Project

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.dragAndDrop()

Class Description:

Drag and Drop Callback Related methods
mari.ep.dragAndDrop.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
mari.ep.dragAndDrop.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
mari.ep.dragAndDrop.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
mari.ep.dragAndDrop.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
mari.ep.dragAndDrop.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
mari.ep.dragAndDrop.__epSystem__.add_DragAndDrop_Callback_Preferences()
SYSTEM

Adds Preferences to Mari Misc Preferences to turn Callbacks on and off

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dragAndDrop.__epSystem__.load_DragAndDrop_Callback_Preferences()
SYSTEM

Loads Callback Preferences in Mari Misc Preferences from the config file

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dragAndDrop.__epSystem__.register_DragAndDrop_Callbacks()
SYSTEM

Registers Extension Pack Callbacks for Drag and Drop
Mari 4.7 and higher only

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dragAndDrop.__epSystem__.register_PresetBrowser_DragAndDrop_Callbacks()
SYSTEM

Registers Preset Browser Drag and Drop Actions

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.dragAndDrop.__epSystem__.save_DragAndDrop_Callback_Preferences()
SYSTEM

Saves Callback Preferences in Mari Misc Preferences to the config file

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.exceptions()

Class Description:

Handles Extension Pack's Global Exception Logger
mari.ep.exceptions.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
mari.ep.exceptions.log_error(message)

Logs an error to extension packs own error logs
This can be used to log "hidden exceptions" or unusual application behavior

Arguments:
message (str):            Error Message

Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.exportChannel()

Class Description:

Export related tools
mari.ep.exportChannel.exportLast()

Runs the last Export from Export Custom Channel Selection

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.exportChannel.__epGUI__.exportSelectedChannels()
GUI

Launches Export Custom Channel Selection Dialog with the
"Flattened" CHeckbox turned off

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.exportChannel.__epGUI__.exportSelectedChannelsFlattened()
GUI

Launches Export Custom Channel Selection Dialog with the
"Flattened" CHeckbox turned on

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.exportChannel.__epSystem__.restoreExportLastBehavior()
SYSTEM

Sets the Checkbox for "Export Last" Patch Selection Behavior
back to the way it was when Mari was last opened

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.exportChannel.__epSystem__.setExportLastBehavior()
SYSTEM

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




mari.ExtensionPack.gizmo()

Class Description:

Gizmo methods
mari.ep.gizmo.__epGUI__.lauchMaskPresetUI(nodelist, ReplaceExisting=False, ForceConnectionDialog=False, parent=None)
GUI

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
mari.ep.gizmo.__epGUI__.launchMaskPresetUIPreferences()
GUI

Launches the Mask Preset Setup Preferences UI.
This is the system used to auto setup Smart Masks.


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.gizmo.__epGUI__.launchMaskPresetUI_BakingMode(parent=None)
GUI

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
mari.ep.gizmo.__epGUI__.launchMaskPresetUI_RefreshMode(nodelist, parent=None)
GUI

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
mari.ep.gizmo.__epGUI__.launchMaskPresetUI_SelectedNodes(ReplaceExisting=False, ForceConnectionDialog=False, parent=None)
GUI

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




mari.ExtensionPack.help()

Class Description:

Access to Help and Tutorials
mari.ep.help.contactFoundrySupport()

Opens a webbrowser to the Foundry Support Portal

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.createSmartMaskProject()

Creates a Project with the Smart Mask Icon Geo and some Bakes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_LogFile()

Opens the Mari Log File

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_MariUserSettingsFolder()

Opens the Mari User Settings Folder

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_online_help()

Launch Extension Pack Online Help

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_pyAPI_help()

Launch Extension Pack Local Py API Help

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_releaseNotes()

Launch the Release Notes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.open_shortcut_help()

Generates a on-the fly overview of the current shortcut mappings as html
and opens the page in a browser

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.help.open_tutorials()

Launch Youtube Extension Pack Tutorials

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.send_bug_report()

Opens an email form to report an Extension Pack Issue

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.__epGUI__.documentationEditor(noDialog=False)
GUI

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
mari.ep.help.__epSystem__.PyAPIHelpURL()
SYSTEM

returns the local python help path

Returns:
string


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.help.__epSystem__.PythonAPI_HelpBuilder(TargetFolder='', CustomMarkerTargetUrl='extPack_PythonAPI_Doc.html', OnePagePerClass=False)
SYSTEM

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




mari.ExtensionPack.history()

Class Description:

Undo Related Methods
mari.ep.history.clearHistory()

Saves project and clears the history after a dialog asking to confirm

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.history.resumeHistory()

closes any active macro in case the history recordng has been interrupted due to a bug

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.hotbox()

Class Description:

Hotbox related methods
mari.ep.hotbox.closeHotboxInstances()

Force closes any open hotbox instance

Returns:
None:

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.hotbox.currentHotboxInstance()

Returns the currently open Hotbox Instance

Returns:
HotboxInstance or None:         Gives the currently open Hotbox Instance.

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.hotbox.showHotbox(path='', SubmenuBackLink=None, force=False, resetPosition=True, parent_widget=None, isNodeContextMenu=False)

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):             Reset the Cursor Position (Hotbox Center on Launch) to cursor position

parent_widget (QWidget | None):   Optional. The widget to parent the Hotbox to

isNodeContextMenu (bool):          If True, the hotbox will be treated as a node
                                   context menu. Node Context Menu appear over a node
                                   if CTRL+SPACE is pressed in the Nodegraph.
                                   The boolean flag ignores the cursor position and
                                   places the menu over the selected node.
                                   The size of the menu is dynamically adjusted based
                                   on nodegraph zoom level


Introduced:
EP6R1

Modified:
EP6R3
mari.ep.hotbox.__epGUI__.hotboxManagerUI()
GUI

Launches the Hotbox Designer UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.hotbox.__epSystem__.installEPHotboxes()
SYSTEM

Installs Extension Pack Hotboxes into the Hotbox Folder
if they don't exist yet/are the same version

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.hotbox.__epSystem__.setupEPHotboxesOnStartup()
SYSTEM

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
mari.ep.hotbox.__epSystem__.setupHotboxesOnStartup()
SYSTEM

Sets up existing User Hotboxes on Mari startup

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.imageAnnotation()

Class Description:

Class to handle all aspects of sticky notes with images
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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 6R3. Defaults to None.

Introduced:
EP6R1

Modified:
EP6R3
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.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
mari.ep.imageAnnotation.__epGUI__.closeIconShelfInstance()
GUI

Closes any Icon Shelf running in the Background


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageAnnotation.__epGUI__.imageNoteFromCustomView()
GUI

Opens a snapshot dialog showing the current view and allowing
cropping and default scale factor

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageAnnotation.__epGUI__.launchIconShelf()
GUI

Opens the icon shelf

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageAnnotation.__epGUI__.resetIconShelfPositionAndSize()
GUI

Closes any currently active instance of the Icon Shelf
then resets the size and position to default


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageAnnotation.__epGUI__.stickerDesigner()
GUI

Opens the Sticker Designer in the Nodegraph


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageAnnotation.__epSystem__.imageSizeChanged(name, value, node)
SYSTEM

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
mari.ep.imageAnnotation.__epSystem__.inherit_image_from_backup(node)
SYSTEM

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:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.imageManager()

Class Description:

Image Manager related methods
mari.ep.imageManager.activateAutoReloadingOnSelectedImages()

Sets the Auto Reloading on selected images in the image manager
to on

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.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
mari.ep.imageManager.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
mari.ep.imageManager.deactivateAutoReloadingOnSelectedImages()

Sets the Auto Reloading on selected images in the image manager
to off

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.disableReferenceImage_onSelectedImages()

Disables the IsReferenceImage Checkbox on selected images

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.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
mari.ep.imageManager.enableReferenceImage_onSelectedImages()

Enables the IsReferenceImage Checkbox on selected images

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.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:
EP6R3

Modified:
EP6R3
mari.ep.imageManager.imagesInUse()

Returns a list of all mari.Image Objects currently in use anywhere in the project (any node)


Returns:

list:                                   Returns a list of mari.Image Objects


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.imageManager.openImageInApplication(applicationExecutable)

Opens the last selected image in the application provided

Arguments:

applicationExecutable (str):    A path to an executable appliction


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.openImageInDefaultApplication()

Opens the last selected image in the default application
associated with the image format

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.openImageInFileBrowser()

Opens the last selected image in your OS Filebrowser

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.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
mari.ep.imageManager.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
mari.ep.imageManager.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
mari.ep.imageManager.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
mari.ep.imageManager.removeEmptyImageManagerGroups()

Removes any empty Groups from the Image Manager

Mari 7.5 and above only.


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.imageManager.removeEmptyImageManagerTabs()

EP DEPRECATION WARNING:

This method will be deprecated in a future version.
Mari 7.5 removes Image Manager Tabs as a feature and replaces it with Groups

Removes any empty Categories/Tabs from the Image Manager


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.imageManager.removeImageManagerTabs()

EP DEPRECATION WARNING:

This method will be deprecated in a future version.
Mari 7.5 removes Image Manager Tabs as a feature and replaces it with Groups

Removes all User created Image Manager Tabs

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.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
mari.ep.imageManager.useImageAsBrushtip()

Uses the currently selecte image as the brushtip on the current tool

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.__epGUI__.configureApplications()
GUI

Launch UI to configure Applications to open images in

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.__epGUI__.exportSelected()
GUI

Export the selected images in the image manager to a folder

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.__epGUI__.svgRasterizer(filePath, originalImage=None, noCancel=False)
GUI

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
mari.ep.imageManager.__epSystem__.addImageManagerDefaultApplications()
SYSTEM

Adds some standard applications (Photoshop,Krita) to the list of application
available in "Open with" if found on your sytem

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.imageManager.__epSystem__.connectSVGLoader()
SYSTEM

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
mari.ep.imageManager.__epSystem__.disableAllImageAutoReloadingOnProjectClose()
SYSTEM

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
mari.ep.imageManager.__epSystem__.disconnectSVGLoader()
SYSTEM

Disconnects Signal Connection to mari.images.imageLoaded(),
testing the file format of loaded images for .svg files

Introduced:
EP6R2

Modified:
EP6R2




mari.ExtensionPack.imageUtils()

Class Description:

Various Python Helper Methods to deal with QIcons, QPixmaps etc.
mari.ep.imageUtils.darken_image(pathImageIconOrPixmap, factor=100, desaturate=False, return_QImage=False)

Darkens or brightens an Image

Arguments:
pathImageIconOrPixmap (str,QImage,QIcon or QPixmap): A object to darken or brighten

factor (int):                Determines if to brighten or darken the image.Defaults to 100, which means
                             no change. Values above 100 darken, values below 100 brighten

desaturate (bool):           Defaults to False. If True, the input image is desaturated first.

return_QImage (bool):        By default the same format as the pathImageIconOrPixmap input
                             is returned. However if this argument is a string (path), then
                             by default a pixmap is returned unless the return_QImage is set to True.

Returns:
varying:                     By default the same object type is returned as the input argument
                             pathImageIconOrPixmap. However if this argument is a string (path)
                             then by default a pixmap is returned unless the return_QImage Argument
                             is set to True


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageUtils.desaturate_pixmap(original_pixmap)

Returns a desaturated QPixmap object fron a Input QPixmap object

Arguments:
original_pixmap (QPixmap): The original QPixmap object

Returns:
QPixmap:                  The desaturated QPixmap

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageUtils.desaturate_qimage(original_qimage)

Returns a desaturated QImage object fron a Input QImage object

Arguments:
original_qimage (QImage): The original QImage object

Returns:
QImage:                    The desaturated QImage

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.imageUtils.get_ep_icon(icon_name, scaledTo=None, stateAware=False)

Returns a QIcon from an Extension Pack Image located in its resources/icon folder

Arguments:
icon_name (str):        The filename of the icon with or without an extension. If no extension is given
                        the filename is case-insensitive.

scaledTo (list):        [width, height] to scale the icon to. Optional. Leave at default None to ignore

stateAware (bool):      If True, the Icon is aware of checked and unchecked states and will desaturate when
                        unchecked. Defaults to False

Returns:
QIcon:                 The resulting QIcon

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageUtils.get_ep_pixmap(icon_name, scaledTo=None)

Returns a QPixmap from an Extension Pack Image located in its resources/icon folder

Arguments:
icon_name (str):        The filename of the icon with or without an extension. If no extension is given
                        the filename is case-insensitive.

scaledTo (list):        [width, height] to scale the icon to. Optional. Leave at default None to ignore


Returns:
QPixmap:                 The resulting pixmap

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageUtils.get_mari_icon(icon_name, scaledTo=None, stateAware=False)

Returns a QIcon from an Image located in the mari icon folder

Arguments:
icon_name (str):        The filename of the icon with or without an extension. If no extension is given
                        the filename is case-insensitive.

scaledTo (list):        [width, height] to scale the icon to. Optional. Leave at default None to ignore

stateAware (bool):      If True, the Icon is aware of checked and unchecked states and will desaturate when
                        unchecked. Defaults to False

Returns:
QIcon:                 The resulting QIcon

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.imageUtils.get_mari_pixmap(icon_name, scaledTo=None)

Returns a QPixmap from an Image located in the mari icon folder

Arguments:
icon_name (str):        The filename of the icon with or without an extension. If no extension is given
                        the filename is case-insensitive.

scaledTo (list):        [width, height] to scale the icon to. Optional. Leave at default None to ignore


Returns:
QPixmap:                 The resulting pixmap

Introduced:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.layer()

Class Description:

Layer related methods
mari.ep.layer.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
mari.ep.layer.cloneMergeSelectedLayers()

Executes layer Clone & Merge

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.convertToPaintable()

Extension Pack Version of standard Mari Layer Convert to Paintable
Supports multi selection and channel layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.copyLayerAttributes()

Copies selected Layer Attributes to a Clipboard

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.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
mari.ep.layer.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
mari.ep.layer.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
mari.ep.layer.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
mari.ep.layer.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
mari.ep.layer.pasteLayerAttributes()

paste Layer Attributes onto selected layer from  a Clipboard

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.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
mari.ep.layer.toggleSelectionLock()

toggles the locking of selected layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.toggleSelectionVisibility()

toggles the visibility of selected layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.toggleUnselectedLock()

toggles the locking of unselected layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.toggleUnselectedVisibility()

toggles the visibility of unselected layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layer.__epGUI__.swapLayerType()
GUI

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




mari.ExtensionPack.layout()

Class Description:

View Layout related methods
mari.ep.layout.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
mari.ep.layout.restoreDefaultLayout()

Restore the Mar Default Layout

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.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
mari.ep.layout.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
mari.ep.layout.setPaletteOrientationHorizontal()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.setPaletteOrientationSplitBottom()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.setPaletteOrientationSplitLeft()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.setPaletteOrientationSplitRight()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.setPaletteOrientationSplitTop()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.setPaletteOrientationVertical()

Set the Preference Window Corner Dock Areas to a value

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epGUI__.exportLayout()
GUI

Export a Layout to Disc via a File Dialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epGUI__.importLayout()
GUI

Import a Layout from Disc via a fileDialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epGUI__.layoutManager()
GUI

Open the Layout Manager UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epGUI__.saveLayoutUI()
GUI

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
mari.ep.layout.__epSystem__.addLayoutFolderPreference()
SYSTEM

Adds Preferences to the Mari Preference Dialog
to set a Path where Layouts should be stored
/Preferences/Paths/Layouts

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epSystem__.getLayoutDebugInfo()
SYSTEM

Utility method returning the current mws layout info
which can be useful to find edge cases where EP utility functions such as "findNodegraphTabwidget"
are not working

Returns:
str:          Returns a string, representing the contents of a mws layout file

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.layout.__epSystem__.loadLayoutFolderPreference()
SYSTEM

Load theLayout Preference Path from the config
and set it in the /Preferences/Paths/Layouts

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epSystem__.reinstallCustomUIElements()
SYSTEM

Readds custom UI Elements previously added by EP on Startup
(View / extPack_layoutChange)

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epSystem__.restoreSavedLayouts()
SYSTEM

Restores all previously saved layouts to Menu
View / Saved Layouts. This is called on Mari Open

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.layout.__epSystem__.saveLayoutFolderPreference()
SYSTEM

Saves the layout Folder to the config

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.lights()

Class Description:

Light related methods
mari.ep.lights.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
mari.ep.lights.rotateLightsByAngle(angle=1)

Rotate all lights byt he given angle

Arguments:

angle (int)     angle to rotate by

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.lights.__epSystem__.createEnvLightPreference()
SYSTEM

Adds ENV Light Rotation Settings to the Preferences

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.lights.__epSystem__.saveEnvLightPreference()
SYSTEM

Saves the Setting of the ENV Light Rotation in the Preferences

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.materialIngest()

Class Description:

Methods to deal with Material Ingestion from Images
mari.ep.materialIngest.__epGUI__.ingestImageManagerImagesIntoLayer()
GUI

Ingests the currently selected image manager images into the active layer

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.materialIngest.__epGUI__.ingestImageManagerImagesIntoNode(nodelist=None, imagelist=None)
GUI

Ingests the currently selected image manager images into the active node

By default this will use your selected node and selected images in the image manager.
However you can overwrite this via arguments

Arguments:

nodelist (list):                List of mari.Nodes

imagelist (list):               List of mari.Images

Introduced:
EP6R1

Modified:
EP6R3
mari.ep.materialIngest.__epGUI__.launchMaterialIngester()
GUI

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
mari.ep.materialIngest.__epSystem__.addEPNodes_to_MaterialIngester()
SYSTEM

Adds Extension Pack Nodes with Image Attributes to the list of compatible nodes in
the Mari Material Ingester

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.materialIngest.__epSystem__.addEPPresets_to_MaterialIngester()
SYSTEM

Adds Material Preset to the Material Template History Dropdown

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.materialIngest.__epSystem__.extendMaterialIngestPresets()
SYSTEM

Adds Unreal Advanced to MaterialIngest Presets
and extends aliases for material ingest presets

Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.matrix()

Class Description:

Matrix related methods
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.matrixFromVectors(rotation=(0, 0, 0), translation=(0, 0, 0), scale=(1, 1, 1))

EP DEPRECATION WARNING:

This method will be deprecated in a future version.
Use toScaleEulerAnglesTranslationMatrix() instead

Creates a 4x4 Matrix from given Vectors


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
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3
mari.ep.matrix.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:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.node()

Class Description:

Node methods contain all methods that make changes to a node or sample info
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.getAllNodesDownstream(targetNode, includeTargetNode=False, traverse_groups=True)

Returns a list of all nodes connected to the given targetNode downstream (to the right)

Arguments:
targetNode (mari.Node):      The Node to querry

includeTargetNode (bool):    Optional. Defaults to False
                             If True, the given Target Node will be part of the
                             returned list

traverse_groups (bool):      Optional. Defaults to True.
                             If True, the connections are tracked even if it exits
                             a subgraph meaning that if you give it a node inside
                             a group as targetNode, you will even get connected nodes
                             outsisde that groupnode


Returns:

(list):                       Returns a list of mari.Nodes


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.node.getMaterialStreamNamesConnectedToChannels(node)

Returns a list of Material Stream Names the given (multi channel)node is connected to via
channel nodes.

E.g. if a Material's Streams "Base" and "Rgh" are connected to channel nodes (e.g. DIF
and Roughness), and all other material outputs are not connected to channels, the returned
list will be ["Base", "Rgh']

Arguments:

node (mari.Node):                    The Node to test for a stream

Returns:

(list):                             List of stream names

Raises:

TypeError:                          Raised if the given node is not a MultiChannel Node


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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
mari.ep.node.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




mari.ExtensionPack.nodeLayout()

Class Description:

Nodegraph Node Layout and Distribution Methods
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.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
mari.ep.nodeLayout.__epGUI__.distributeNodeUI()
GUI

Opens a UI to distribute ndoes

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodeNavigation()

Class Description:

Methods to jump from and to nodes
mari.ep.nodeNavigation.cycleBookmarkNodesBackwards()

Cycle backwards through the available node graph bookmark nodes in the current graph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeNavigation.cycleBookmarkNodesForward()

Cycle forward through the available node graph bookmark nodes in the current graph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeNavigation.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
mari.ep.nodeNavigation.jumpToNextSimilarInStream()

jump to the next downstream node in the stream that is matching
the current noe selection type

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeNavigation.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
mari.ep.nodeNavigation.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
mari.ep.nodeNavigation.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
mari.ep.nodeNavigation.jumpToPreviousSimilarInStream()

jump to the next upstream node in the stream that is matching
the current noe selection type

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeNavigation.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
mari.ep.nodeNavigation.__epGUI__.jumpToBookmark()
GUI

Launches the "Jump to Bookmark" UI

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodeProperties()

Class Description:

Node Properties methods to handle single click node properties viewing
mari.ep.nodeProperties.clearNodePropertiesOnSingleClick_Connections()

removes all connections previously made to enable single click node properties

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeProperties.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
mari.ep.nodeProperties.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
mari.ep.nodeProperties.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
mari.ep.nodeProperties.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
mari.ep.nodeProperties.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
mari.ep.nodeProperties.__epSystem__.addNodePropertiesPreference()
SYSTEM

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
mari.ep.nodeProperties.__epSystem__.loadNodePropertiesPreference()
SYSTEM

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
mari.ep.nodeProperties.__epSystem__.saveNodePropertiesPreference()
SYSTEM

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




mari.ExtensionPack.nodeStyle()

Class Description:

Methods related to look and style of Nodes
mari.ep.nodeStyle.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
mari.ep.nodeStyle.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
mari.ep.nodeStyle.__epGUI__.showNodeStyles()
GUI

Direct action to launch the Nodestyle UI Hotbox

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodeUtilities()

Class Description:

Node Utility methods
mari.ep.nodeUtilities.autoDotInputConnections(graph=None, nodelist=None)

Creates dot nodes automatically for the input ports of the selected nodes.
Several rules determine if or where the dot nodes are placed

Arguments:

graph (mari.Nodegraph) (optional):            The Mari Nodegraph to process auto-dot nodes in.
                                              Defaults to None, in which case the currently open Graph
                                              is used.

nodelist (list of mari.Nodes) (optional):     A list of mari nodes to process Inputs for Auto-dots.
                                              Defaults to None in which case the selected nodes of the 
                                              current graph are used.
                                              If a list is supplied, a graph also needs to be supplied with
                                              the graph argument.


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.createMaskFromSelection()

Creates a Black and White Mask from the current viewport selection as a Paint Node.
The Resolution can be set in a popup dialog.

The new paint node will be created in the currently active graph tab and created at cursor position

Returns:
(mari.PaintNode):         Returns the newly created Mari Paint Node

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.createSmartCompareMask()

Creates a AB Compare Mask node and hooks it up to the selection

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.createSmartHeightBlend()

Creates a Height Blend node and hooks it up to the selection

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeUtilities.createSmartMergeNode()

Creates a Multi Channel Merge Node if the selected Nodes contain Materials
or a regular Merge Node otherwise

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeUtilities.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
mari.ep.nodeUtilities.deregisterNodeContextMenu(nodeTypeID)

Removes a Node Context Menu from a specific Node Type
Node Context Menus appear when a node is selected and CTRL is pressed.


Arguments:

nodeTypeID (str):         a valid Mari Node typeID, class name or tagname that should
                          have its context menu removed.


Returns:

bool:                    Returns True if the nodeTypeID was deregistered.
                         Returns False if the nodeTypeID didn't exist


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.disableBlendColorspaceOnNode(node)

Ensures that the given node (regardless if merge node or multi channel) has its Blend Mode Colorspace
disabled
            
Arguments:

node (mari.Node):              the node to modify the setting on

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.getRegisteredNodeContextMenus()

Returns a dictionary containing {NodeTypeID : [Path to Context Menu, class instance}.
Node Context Menus appear when a node is selected and CTRL is pressed.

Returns:

dict:                     A dictionary of registered Node Context Menus against 
                          node.typeIDs, classes or tags



Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.optimizeMultiChannelNodes(nodelist=None)

Disconnects or reconnects MultiChannel Node Connections based on assigned channels to a shader.
With any node upstream from a shader selected, the tool will detect the shader, then check what ports
a channel is assigned to.
Any port that has no channel assigned will be added to an exclusion list, any port with a channel node
to an inclusion list.

Multi Channel Nodes (Materials, Multi Channel Merge, Multi Channel Bake Points) of the same shader model
as the shader will then be processed and have any connection severed that is on the exclusion list, while
any non-existent connection that is part of the inclusion list will be rebuild

Arguments:

nodelist (list of mari.Node):         Optional. A list of shader nodes to use as base for optimization.
                                      If not provided, the currently selected shader will be used


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.registerNodeContextMenu(target, contextMenuPath, classInstance=None)

Registers a Node Context Menu to a specific Node Type
Node Context Menus appear when a node is selected and CTRL is pressed.

For detailed step by step help please consult the online help at
https://www.mariextensionpack.org/docs/6R3v1/CreatingyourownContextMenus.html

Arguments:

target (str):
The target is usually a Mari Node typeID, which can be retrieved using node.typeID().
There are however several special cases that can be used to target specific Nodes:

Targeting Classes:
If you are supplying a classInstance Argument the given target arg should be a
stringified version of the class name e.g. "mari.MultiChannelBakePointNode".

Targeting Tags:
Some Mari nodes cannot be identified via ids or class.
You can try and identify them using tags. Currently the following tags are supported
which should be given as such into the target argument:
"_shader" , "_material", "_group", "_channel", "_bakepoint", "_multiChannelMerge"

Targeting TypeIDs via Startswith:
Node Type IDs can also be identified by a matching "startswith".
For example "MRI_" as a type  argument would catch ANY Mari Node with a type ID
"MRI_Something"

Targeting Metadata:
Sometimes it may be necessary to target nodes via their Metadata, for example if you
wish to add context menus to specific material templates.
To do so prefix the Metadata Name with a "$" and pass it as a target.
E.g. "$EP_MaterialTemplate" would target any node with the EP_MaterialTemplate Metadata.
The Metadata test runs before any other test so it would supercede for example any
context menu assignment done via the _material tag.

Targeting Metadata Dictionary Entries:
A special case of Node Metadata are Dictionaries. You can compare directly a dictionary
value by giving the something like the following into the target argument:
"$EP_MaterialTemplate{key:value}". This will spawn the Context menu only if:
- The node has the Metadata "EP_MaterialTemplate"
- The Value of the Metadata is a dictionary with one key/value pair being 
"key" and "value" (only strings are supported.



contextMenuPath (str):

A path to a directory containing a Ext.Pack Hotbox. Use TIE_TO_NODEGRAPH_ZOOM setting 
to let the hotbox scale up and down dynamically based on zoom level.

classInstance (mari.Class)

Some Mari nodes do not have a clear type ID.
An example of this is a multi Channel Bake Point which is just a mari.groupNode().
To still reliably access them specificially, you can provide a class instance to
compare against.
It is necessary in this case to set the target argument to a "stringified" version of
the class e.g."mari.MultiChannelBakePoint" to keep consistency.||.
If the target starts with "mari." we will automatically assume that you wish
to compare against a Class instance.



Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.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
mari.ep.nodeUtilities.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
mari.ep.nodeUtilities.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
mari.ep.nodeUtilities.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
mari.ep.nodeUtilities.__epGUI__.replaceMergeNodesWithBlendNodesUI()
GUI

Opens a dialog to allow you to replace Merge Nodes with Blend Mode Nodes
mari.ep.nodeUtilities.__epSystem__.addNodeSlidePreference()
SYSTEM

Adds a preference in the Nodegraph Tab to activate and deactive the Node SLide Widget
that shows when pressing and holding CTRL+SHIFT

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.__epSystem__.autoUpdateBakeLookupOnExistingNodes()
SYSTEM

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
mari.ep.nodeUtilities.__epSystem__.getNodeGraphEventFilter()
SYSTEM

Returns a Event Filter on the QGraphicsView that is the Nodegraph

Returns:
(class):            The Nodegraph Event Filter Class.

Useful Class Attributes:

self.ctrl_pressed (bool)        - returns if CTRL is Pressed
self.shift_pressed (bool)       - returns if SHIFT is Pressed
self.alt_pressed (bool)         - returns if ALT is Pressed
self.set_ctrl_pressed (bool)    - Allows setting the state of CTRL pressed
self.set_shift_pressed (bool)   - Allows setting the state of SHIFT pressed
self.set_alt_pressed (bool)     - Allows setting the state of ALT pressed
self.graph (QGraphicsView)      - The Graphics View of the Nodegraph
self.cursor_position (QPos)     - The Position of a click event

Useful Class Signals:

CTRL_key(bool) (SIGNAL)         - Emits if CTRL Key is Pressed/Released
SHIFT_key(bool) (SIGNAL)        - Emits if SHIFT Key is Pressed/Released
ALT_key(bool)  (SIGNAL)         - Emits if ALT Key is Pressed/Released
resized(QSize) (SIGNAL)         - Emitted if the Nodegraph is being resized.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.__epSystem__.installNodeGraphEventFilter()
SYSTEM

Installs a Event Filter on the QGraphicsView that is the Nodegraph

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.__epSystem__.lockBackdropColorsInProject()
SYSTEM

This method gets called on project launch and locks the backdrop colors so they don't get randomized by mistake


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeUtilities.__epSystem__.nodeChangesToStickyNoteConnections(stickynote)
SYSTEM

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

mari.ep.nodeUtilities.__epSystem__.nodeCreatedConnect()
SYSTEM

Builds Signal connect to mari.nodes.nodeCreated collecting all method executions when this is called

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeUtilities.__epSystem__.nodeCreatedDisconnect()
SYSTEM

Kills Signal connect to mari.nodes.nodeCreated collecting all method executions when this is called

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodeUtilities.__epSystem__.pauseNodeCreatedProcessing(pause)
SYSTEM

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
mari.ep.nodeUtilities.__epSystem__.receiverCreated(node)
SYSTEM

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
mari.ep.nodeUtilities.__epSystem__.registerEPNodeContextMenus()
SYSTEM

Registers the standard Extension Pack Node Context Menus
Node context menus can be brought up by selecting a supported Node type
and pressing CTRL+SPACE.

Some examples of supported nodes are:
- Tiled
- Multi Channel Merge
- Bake Points and Multi Channel Bake Points
and many more
mari.ep.nodeUtilities.__epSystem__.saveNodeSlidePreference()
SYSTEM

Saves a preference in the Nodegraph Tab to activate and deactive the Node SLide Widget
that shows when pressing and holding CTRL+SHIFT

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.__epSystem__.setAllowNodeGraphEventFilterInstall(state)
SYSTEM

Set if the Nodegraph Event Filter is allowed to be installed or reinstalled

Arguments:
state (bool):         True to allow (default), False to not allow

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodeUtilities.__epSystem__.setDynamicNodeGraphTabManager()
SYSTEM

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
mari.ep.nodeUtilities.__epSystem__.setMergeNodeColorspace_PreferenceChanged(saveSetting=True)
SYSTEM

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
mari.ep.nodeUtilities.__epSystem__.setMergeNodeColorspace_createPreference()
SYSTEM

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




mari.ExtensionPack.nodegraph()

Class Description:

Nodegraph methods contain all methods that add or change the nodegraph or run over entire graphs
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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

mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.repeatLastNodeCreation()

repeats the creation of the last node at the current cursor position

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.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
mari.ep.nodegraph.__epGUI__.importNodes()
GUI

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
mari.ep.nodegraph.__epGUI__.nodeMetaDataEditor(Force=False)
GUI

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
mari.ep.nodegraph.__epGUI__.rampEditor()
GUI

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
mari.ep.nodegraph.__epGUI__.renameNodesUI()
GUI

Launch the "Multi Rename Nodes" Tool UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraph.__epGUI__.swapNodeType()
GUI

Allows you to swap out any node type for another node type.
If possible, settings are transfered between nodes

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodegraphGrid()

Class Description:

Controls for the Nodegraph Background Grid
mari.ep.nodegraphGrid.decreaseGridHeight()

Decrease the Height of grid cells in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.decreaseGridLineOpacity()

Decrease the Opacity of Grid Lines in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.decreaseGridLineWidth()

Decrease the Width of Grid Lines in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.decreaseGridWidth()

Decrease the Width of grid cells in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.increaseGridHeight()

Increases the Height of grid cells in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.increaseGridLineOpacity()

Increase the Opacity of Grid Lines in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.increaseGridLineWidth()

Increase the Width of Grid Lines in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.increaseGridWidth()

Increases the Width of grid cells in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.toggleGridSnap()

Toggles Grid Snap on and off

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.toggleShowGrid()

Toggles the showing of the Grid in the Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.__epSystem__.setNodegraphGridDefaults()
SYSTEM

Sets new defaults for the Nodegraph Grid Colors

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphGrid.__epSystem__.syncGridSnapStates()
SYSTEM

Gets run on project open to sync the action triggered states to the state of the prefs

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodegraphPalette()

Class Description:

Methods relaed to the Nodegraph Palette and Palette Tabs
mari.ep.nodegraphPalette.closeCurrentGraphNotification()

Closes the currently active graph notification

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.cursorPositionInNodegraphSpace()

returns the user cursor position in nodegraph space

Returns:

(QPointF):       the position of the cursor in nodegraph space

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphPalette.cycleNodegraphTabs()

Cycle through the open Nodegraph Tabs

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphPalette.enterSubgraph()

'
Opens a subgraph (e.g. selected roupnode)

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphPalette.findNodeAbstractGraphicsView()

this method returns the QGraphicsView of the Nodegraph

Returns:

(QGraphicsView):          The Graphical View Widget of the Nodegraph


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphPalette.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
mari.ep.nodegraphPalette.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
mari.ep.nodegraphPalette.getCurrentGraphNotification()

Returns the currently active Graph Notificaion or None

Returns:

QWidget | None:

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.getNodeGraphEventFilter()

Returns a Event Filter on the QGraphicsView that is the Nodegraph

Returns:
(class):            Returns the Nodeegraph Event filter class for the current Nodegraph

Useful Class Attributes:

self.ctrl_pressed (bool)
self.shift_pressed (bool)
self.alt_pressed (bool)
self.graph (QGraphicsView)
self.cursor_position (QPos)

Useful Class Signals:

CTRL_key(bool) (SIGNAL)
SHIFT_key(bool) (SIGNAL)
ALT_key(bool)  (SIGNAL)


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.get_alt_pressed()

Returns True or False depending if the ALT Key is pressed in the Nodegraph

If instead of a static function you want to attach to a Signal for the Key Press Event,
use mari.ExtensionPack.nodegraphPalette.getNodeGraphEventFilter() to get the event Filter Class,
then attach to the ALT_key(bool) signal

Returns:
(bool):             True if the ALT Key is Pressed, False otherwise

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.get_ctrl_pressed()

Returns True or False depending if the CTRL Key is pressed in the Nodegraph

If instead of a static function you want to attach to a Signal for the Key Press Event,
use mari.ExtensionPack.nodegraphPalette.getNodeGraphEventFilter() to get the event Filter Class,
then attach to the CTRL_key(bool) signal

Returns:
(bool):             True if the CTRL Key is Pressed, False otherwise

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.get_shift_pressed()

Returns True or False depending if the SHIFT Key is pressed in the Nodegraph

If instead of a static function you want to attach to a Signal for the Key Press Event,
use mari.ExtensionPack.nodegraphPalette.getNodeGraphEventFilter() to get the event Filter Class,
then attach to the SHIFT_key(bool) signal

Returns:
(bool):             True if the Shift Key is Pressed, False otherwise

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.graphNotification(text='Graph Notification', auto_close_seconds=2, width=None, height=None, background_color='rgba(100, 100, 100, 200)', border='2px solid orange', font_size=12)

Notification Widget to display info to the user directly in the nodegraph without blocking Mari.
Only one Notification can at any time be shown. If a new Notification is triggered, the previously
shown one will first be hidden.

Arguments:

text (str):                                   The notification text to display

auto_close_seconds (int | float):             The time the notification stays open before closing.
                                              Defaults to 2 seconds

width (int | None):                           The width of the Notification in Pixels. Defaults to 350.
If None the size is auto adjusted to its contents

height (int | None):                          The height of the notificaiton in Pixels. If None (default),
                                              the size if auto adjusted to its contents

background_color (str):                       The Stylesheet for the background color of the frame.
                                              Defaults to "rgba(0, 0, 0, 200)"

border (str):                                 The Stylesheet for the border of the frame.
                                              Defaults to "2px solid orange"

font_size (int):                              The font size of the Text in the notification in px.
                                              Defaults to 12


Returns:

QWidget:                                      Returns the Nodegraph Notification Widget


Related Methods:


getCurrentGraphNotification():                  Get currently open Notification widget
closeCurrentGraphNotification():                Close currently open Notification widget



Introduced:
EP6R3

Modified:
EP6R3
mari.ep.nodegraphPalette.leaveSubgraph()

'
Leaves a subgraph (e.g. selected groupnode)

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphPalette.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
mari.ep.nodegraphPalette.setNodegraphTabIndex(index)

set the active open Nodegraph Tab

Arguments:

index (int):                  The Index Number of the Tab


Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.nodegraphSelection()

Class Description:

Controls for the Nodegraph Selection
mari.ep.nodegraphSelection.deselectAllNodes()

deselect all Nodes in the current Graph Tab

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.deselectAllNodesExceptBackdrops()

deselect all Nodes except backdrops in the current Graph Tab

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.getPreviousNodeSelection()

Returns the last made node selection before the current one.

Returns:

(list):         a list of nodes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.selectAllNodes()

Select all Nodes in the current Graph Tab

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.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
mari.ep.nodegraphSelection.__epSystem__.clearNodeGraphSelectionTrackingData()
SYSTEM

Clears the cache for Nodegraph Selections

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.__epSystem__.discontinueNodeGraphSelectionTracking()
SYSTEM

disconnects nodegraph selectiont racking

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.__epSystem__.initializeNodeGraphSelectionTracking()
SYSTEM

a method called on Mari Project startup to create signal connections
to track nodegraph selection changes on all geos

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphSelection.__epSystem__.initializeNodeGraphSelectionTracking_onSpecificGeo(entity='')
SYSTEM

Generates a signal connection from nodegraph.nodeSelectionChanged()
to the Selection Tracking Cache for a newly added Geometry

Args:
entity (mari.geoEntity):            The Entity added

Introduced:
EP6R1

Modified:
EP6R3




mari.ExtensionPack.nodegraphStyle()

Class Description:

Handles custom Nodegraph Stylesheet edits
mari.ep.nodegraphStyle.toggleAllowAutoInsert()

Toggles on/off if Auto Insert it allowed
if dragging a Node onto a wire

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.nodegraphStyle.toggleAllowShakeToExtract()

Toggles on/off if Nodes can be extracted via a Mouse Shake
Requires Mari 7.0v1 or higher.

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.nodegraphStyle.__epSystem__.addStyleSheetPreferences()
SYSTEM

Adds preferences to control the Mari internal Nodegraph Stylesheet to Nodegraph Tab of Prefs
mari.ep.nodegraphStyle.__epSystem__.getStyleData(group, key, value, fromTempFile=True)
SYSTEM

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
mari.ep.nodegraphStyle.__epSystem__.syncAutoInsert()
SYSTEM

Syncs the state of Auto Insert on / off
(if dragging a Node onto a wire) to the
UI option in the Nodegraph / Connection Menu
mari.ep.nodegraphStyle.__epSystem__.updateStylesheetFromPref(group, key, asTempFile=True)
SYSTEM

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
mari.ep.nodegraphStyle.__epSystem__.writeMemoryStylesheetToDisc()
SYSTEM

Mari keeps a stylesheet for the nodegraph in memory.
This methods writes the stylesheet values from memory to disc
mari.ep.nodegraphStyle.__epSystem__.writeStyleData(group, key, value, asTempFile=True)
SYSTEM

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




mari.ExtensionPack.object()

Class Description:

Object related methods
mari.ep.object.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
mari.ep.object.list(include_2D_objects=False)

Returns a list of Mari geos.
This is similar to mari.geo.list() however includes an argument to filter out 2D Paint Objects.
2D Paint Objects were included in Mari 7.1 as part of the 2D Canvas. Unfortunately mari's default
geo.list() also includes those 2D Objects.
This wrapper function allows you to get the old functionality of the the api call in Mari 7.1+

Arguments:

include_2D_objects (bool):        If to include 2D Objects in the list. Defaults to False

Returns:

list:                             A list of mari.geoEntity objects

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.object.removeAllGeoChannels(geo=None, silent=False)

Removes Geo Channels from a given geo

Arguments:

geo (mari.geoEntity):          Optional.The Mari Geo to remove Geo Channels from.
                               If None (default), the current selection is used

silent (bool):                 Optional. If a pop up will appear to let the user confirm

Returns:

None:

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.object.removeObjectVersion()

Remove the currently set object version on the geo in the object palette

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.object.setAllSUBDToHigh()

Set all objects to highest available subdivision

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.setAllSUBDToLow()

Set all objects to level 0

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.setVisibleSUBDToHigh()

Set all visible objects to highest available subdivision

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.setVisibleSUBDToLow()

Set all visible objects to level 0

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.unsubdiveGeo(geo=None)

Remove the subdivision from a given geometry, which can make a scene lighter

Arguments:
geo (mari.Geo):         Optional. The Geo to unsubdive. If None (default) the current geo
                      (mari.current.geo()) is used

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.object.__epGUI__.addDefaultObject(asObjectVersion=True)
GUI

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
mari.ep.object.__epGUI__.exportGeometry()
GUI

Launches a full Export dialog where you can export your Geometry from your project

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epGUI__.exportGeometry_selectionOnly()
GUI

Launches a Export dialog where you can export your SELECTED object

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epGUI__.exportUVMasks()
GUI

Launches a full Export UV Mask dialog where you can export UV Masks from
multiple objects

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epGUI__.exportUVMasks_selectionOnly()
GUI

Launches a Export UV Mask dialog where you can export UV Masks from the SELECTED Object

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epGUI__.subdivide()
GUI

Launches the subdivide dialog, where you can batch subdivide multiple objects

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epSystem__.addDefaultObjectsToRecentMeshes()
SYSTEM

Adds the Extension Pack Default Objects
to the list of recent meshes in the CREATE NEW PROJECT
Dialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.object.__epSystem__.addGeoRenamePreference()
SYSTEM

Adds the Preference "Geo Vesion Naming" to the Misc Preference Tab

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.object.__epSystem__.createGeoRenameSignals()
SYSTEM

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
mari.ep.object.__epSystem__.saveGeoRenamePreference()
SYSTEM

Saves the Preference "Geo Vesion Naming" from the Misc Preference Tab

Introduced:
EP6R2

Modified:
EP6R2




mari.ExtensionPack.ocio()

Class Description:

Colorspace Methods
mari.ep.ocio.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
mari.ep.ocio.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




mari.ExtensionPack.patch()

Class Description:

Patch related tools
mari.ep.patch.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
mari.ep.patch.patchBake_to_imagemanager()

Launches Patch Bake to Image Manager

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.patch.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
mari.ep.patch.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




mari.ExtensionPack.pinnedLayers()

Class Description:

Pinned Layers/Channels System
mari.ep.pinnedLayers.collectionPin(mode)

Adds a collection Pin

Arguments:

mode (str):             "0" for layers, "1" for channel layers

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.pinnedLayers.emptyPin()

Executed if no layer has been pinned but user triggers quick pin

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.pinnedLayers.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
mari.ep.pinnedLayers.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
mari.ep.pinnedLayers.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
mari.ep.pinnedLayers.__epGUI__.manageCollectionPins()
GUI

Launches Manage Collection Pins UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.pinnedLayers.__epSystem__.clearCollectionPins()
SYSTEM

Removes all Collection Pins in a Project

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.pinnedLayers.__epSystem__.restoreProjectPins()
SYSTEM

Used to restore any Pins stored in a project, so they appear in the UI

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.presetBrowser()

Class Description:

Preset Browser Methods
mari.ep.presetBrowser.closeSmartMaskShelfInstance()

Closes any Preset Browser running in the Background


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.presetBrowser.resetSmartMaskShelfPositionAndSize()

Closes any currently active instance of the Preset Browser
then resets the size and position to default


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.presetBrowser.__epGUI__.launchSmartMaskShelf(mode)
GUI

Opens the Preset Browser shelf

Arguments:

mode (str):         'Layer' or 'Nodegraph'

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.presetBrowser.__epSystem__.createMaskShelfPreferences()
SYSTEM

Creates Preferences inside the Mari Preferences

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.presetBrowser.__epSystem__.saveMaskShelfPreference()
SYSTEM

Saves Preset Browser  Specific Preferences

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.project()

Class Description:

project related tools such as cleanup tools
mari.ep.project.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
mari.ep.project.getCurrentProjectFolder()

Returns the Mari Project Folder for the current Project

Returns:

(string):                     Path to the project specific Folder

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project.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

mari.ep.project.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
mari.ep.project.openCurrentProjectFolder()

Opens your Project Directoy (currently open project) in a File Browser

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project.removeAllSnapshots()

Remove all Layer and Channel Snapshots

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project.__epSystem__.initialize_project_open_tracking()
SYSTEM

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:
EP6R2v2

Modified:
EP6R2v2
mari.ep.project.__epSystem__.loadAdditionalProjectSettings()
SYSTEM

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
mari.ep.project.__epSystem__.projectOpenNodeProcesing()
SYSTEM

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
mari.ep.project.__epSystem__.projectSaveNodeProcesing()
SYSTEM

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
mari.ep.project.__epSystem__.saveAdditionalProjectSettings()
SYSTEM

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




mari.ExtensionPack.projectCollections()

Class Description:

project collection related tools allowing you to filter the Project Tab
mari.ep.projectCollections.activateCollection(name, hideOthers=True, filter_text=None)

- Also see "setCurrentCollection()"

This method triggers the evaluation of what projects should be visible in the Mari Projects Tab List Widget.
This is mostly an internal function call but exposed here for convenience.

The method does NOT set the active collection name in the Dropdown menu. You can use setCurrentCollection()
for this one. Instead this method only compares the given name (collection name) with all projects
in the Mari Projects Tab and hides any project that doesn't have the specified Collection Name set.



Arguments:
name (str):               The name of the collection to show items for

hideOther(bool):          If True (default), projects not assigned to the given collection "name" will be
                          hidden

filter_text (str|None):   A optional, additional text filter or None (default).
                          Text Filters can run on Project Names or Project Metadata and support basic
                          expressions:
                          
                          Basic: ProjectName - matches project names
                          OR: ProjectA,ProjectB - matches either project A or B
                          AND: Project+Final - matches both terms
                          NOT: Project+!Draft - matches Project but not Draft
                          
                          Metadata Search:
$Value - searches all metadata for "Value"
$Name:Value - searches specific Metadata (Name) for Value
                          !$Draft - excludes projects with Draft in metadata
          


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.addCollection(name, color=None)

Adds a new collection to the Project Collections dropdown in the
Project Tab

Note that empty Collections without any projects assigned will be auto removed on each Mari Restart.

Arguments:

name (str):           The Name of the new collection

color (str|None):     Optional. The Color coding for the new collection as a hex color string 
                      (e.g. "#ffffff").
                      If None (default), a "random" color will be chosen. The "random" color will be
                      consistent though every time, based on the given name of the collection. 
                      A collection name "My Collection" will therefore always generate the exact same 
                      "random" color if the color arg is None.

Raises:

ValueError:          Raises a Value Error if the specified name already exists
RunTimeError:        Raises a RunTimeError if the Collections widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.assignProjectsToCollection(name, projects=None)

Assigns the provided projects to a collection specified with "name".
If the collection name doesn't exist, it will be created.

If no projects argument is given or None, the current Project Selection is used.

A project can belong to multiple collections. If you want to remove a project from a collection
you need to remove it via removeProjectsFromCollection()


Arguments:

name (str):                                The name of the collection to assign projects to.

projects (list[mari.ProjectInfo] | None):  A list of mari projects or None.
                                           If None (default), the currently selected projects are used.


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.batchAddCollections(collections_definitions)

Convenience method to batch add multiple collection names
Note that empty Collections without any projects assigned will be auto removed on each Mari Restart.

Arguments:

collections_definitions (dict):           Dictionary defining collections. The key should be the collection
                                          name. Value can be None or a string representing the color code
                                          of the collection e.g. '#ffffff'||.
If the collection name already exists, it will be ignored


Raises:

ValueError:         Raises a Value Error if the specified name already exists
RunTimeError:        Raises a RunTimeError if the Collections widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.clearFilter()

Convenience method to clear the contents of the Filter Lineedit

Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.collectionNameExists(name)

Checks if a given collection name already exists

Arguments:

name (str):           The Name of the new collection you want to test if it already exists

Returns:
(bool):               Returns True if the name already exists, False otherwise


Raises:

RunTimeError:         Raises a RunTimeError if the Collections widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.filterEnabled()

Returns if the filter is enabled or not

Returns:
(bool):   True if filter on, False otherwise

Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.filterText()

Returns the currently set filter text

Returns:

(str):   The currentlys set string

Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getAllProjectCollections()

Returns a dictionary of {"CollectionName" : [mari.project.uuid(),mari.project.uuid()] } for all
Collections that currently exists. This covers all Projects in the Project Tab (mari.projects.list())
Projects without any assigned Collection are listed in the "No Collection" key of the dict.


Returns:
(dict{str:[str]):                        A dictionary with each collection name as a key, and a list
                                         of project uuids as values.
                                         {"CollectionName" : [mari.project.uuid(),mari.project.uuid()] }


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getCollectionMetadataID()

Returns the name of the Metadata we use to store Project Collections on a Mari Project.
You can use this to directly query Project Collections on mari.Project Objects.

e.g. mari.Project.metadata(getCollectionMetadataID())

Returns:
str:                  Returns the name of the Metadata used for storing Project Collections

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getCollectionsComboBox()

Returns the QComboBox Widget of the Collections Widget for low level QT access

Returns:
QComboBox:                An instance of QtWidgets.QComboBox

Raises:
RuntimeError:             Raises a runtime error if the Collection Widget is inaccessible

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getCollectionsWidget()

Returns the Collections Widget for low level QT access
The dropdown menu is called "category_dropdown".

Returns:
QWidget:                  The QWidget housing the Project Collections controls in the Project Tab of Mari


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getCurrentCollection()

Returns the name of the currently set collection

Returns:
(str):                 The name of the collection currently chosen in the Collections dropdown



Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.getProjectCollections(projects, includeWithoutAssignment=False)

Returns a list of all Project Collections the given mari projects belong to

Arguments:

projects (list[mari.ProjectInfo]):  A list of Mari Project Objects (e.g. mari.projects.selected())

includeWithoutAssignment (bool):   Optional. Defaults to False. If True, projects without any collection
                                   assignments will be included in the returned list with a Collection Name
"No Collection"

Returns:
(list[str]):                        Returns a list of Project Collection names


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.projectIsPartOfCollection(project, name)

Checks if a given project is part of the collection specified via "name"

Arguments:

project (mari.ProjectInfo):       the Mari Project to check

name (str):                       the name of the collection to test.

Returns:

(bool):                           Returns True if the given Project is part of the collection specified
                                  with "name"


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.refreshCollectionsComboBox()

Convenience Method to reinitialize the QComboBox used to switch between Project Collections

This can be useful to call if you want to enforce alphabetical sorting of the ComboBox at runtime
after a new collection has been added.
Usually the combobox is only sorted on Mari Start and after that new collections are appended as items.
Using this method you can resort the AbstractView of the combobox even while Mari already is open

Please note that during the refresh, empty collections without any projects assigned will be removed.

Raises:
RuntimeError:             Raises a runtime error if the Collection Widget is inaccessible

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.projectCollections.removeCollection(name)

Removes the collection with the given name.
Projects assigned to that collection will have the name from their ProjectGroups Metadata removed

Arguments:

name (str):           The Name of the collection to remove


Raises:

ValueError:         Raises a Value Error if the specified name does not exist
RunTimeError:       Raises a RunTimeError if the Collections widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.removeProjectsFromCollection(name, projects=None)

Removes the provided projects from a collection specified with "name".
If a project isn't part of the provided collection name, it will be ignored

If no projects argument is given or None, the current Project Selection is used.

Arguments:

name (str):                                The name of the collection to remove projects from

projects (list[mari.ProjectInfo] | None):  A list of mari projects or None.
                                           If None (default), the currently selected projects are used.


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.setAllowDefaultChange(state)

Determines if users are allowed to set their own default collection that is shown when mari starts.
Using this method you can prevent users from changing the default for example for the purpose of
enforcing a default collection in a pipeline.

Please note in the end all this method is doing is setting the Mari Preference
'/Misc./Project/AllowDefaultCollection' so users can change it afterwards if they are inclined to.



Arguments:
state (bool):             If True users can change the default collection via a "Pin" Button next to the
                          dropdown menu. If False, the Button is hidden


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.setCollectionColor(name, color)

Adds a new collection to the Project Collections dropdown in the
Project Tab

Arguments:

name (str):           The Name of the collection to update

color (str):          The Color coding for collection as a hex color string (e.g. "#ffffff").

Raises:

ValueError:         Raises a Value Error if the specified name already exists
RunTimeError:        Raises a RunTimeError if the Collections widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.setCurrentCollection(name)

Convenience Function to set the collection dropdown menu to a given collection name

Arguments:

name (str):           The name of the collection to set as active

Raises:
ValueError:           Raises a Value error if the given collection name does not exist
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.setFilterEnabled(state)

Toggles the Filtering on or off

Arguments:

state (bool):   True to toggle filter on, False to toggle it off

Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.setFilterText(filter_text)

Set a filter text.

Arguments:

filter_text (str):        Text Filters can run on Project Names or Project Metadata and support basic
                          expressions:
                          
                          Basic: ProjectName - matches project names
                          OR: ProjectA,ProjectB - matches either project A or B
                          AND: Project+Final - matches both terms
                          NOT: Project+!Draft - matches Project but not Draft
                          
                          Metadata Search:
$Value - searches all metadata for "Value"
$Name:Value - searches specific Metadata (Name) for Value
                          !$Draft - excludes projects with Draft in metadata

Raises:
RunTimeError:         Raises a Runtime error if the Collection Widget is inaccessible



Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.showAllProjects(filter_text=None)

Convenience Function to set the current Collection to "All Projects"

Arguments:

filter_text (str|None):    A optional, additional text filter or None (default).
                          Text Filters can run on Project Names or Project Metadata and support basic
                          expressions:
                          
                          Basic: ProjectName - matches project names
                          OR: ProjectA,ProjectB - matches either project A or B
                          AND: Project+Final - matches both terms
                          NOT: Project+!Draft - matches Project but not Draft
                          
                          Metadata Search:
$Value - searches all metadata for "Value"
$Name:Value - searches specific Metadata (Name) for Value
                          !$Draft - excludes projects with Draft in metadata


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.__epSystem__.addCollectionWidget()
SYSTEM

Adds a Project Collection Widget to the top of the Mari Projects Tab


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.__epSystem__.createCollectionPreference()
SYSTEM

Add preferences to configure display and behavior of the Project collections
to the Mari preference dialog under /Misc./Project


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.__epSystem__.deleteCollectionWidget()
SYSTEM

Removes the Project Collection Widget from the UI


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.__epSystem__.saveCollectionPreference()
SYSTEM

Saves preferences to configure display and behavior of the Project collections
from the Mari preference dialog under /Misc./Project


Introduced:
EP6R3

Modified:
EP6R3

mari.ep.projectCollections.__epSystem__.setAllowDefaultCollectionIcon()
SYSTEM

Internal method to update the "Pin default collection" display of the button at runtime.
Called by the AllowDefaultCollection preference in the Misc Tab.

Introduced:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.project_paths()

Class Description:

Set Project Path Tool
mari.ep.project_paths.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
mari.ep.project_paths.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
mari.ep.project_paths.__epGUI__.set_project_paths()
GUI

Launches the Set Project Path Dialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_paths.__epSystem__.checkProjectPaths()
SYSTEM

Returns:
bool:           true or false depending if valid

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_paths.__epSystem__.restore_project_paths()
SYSTEM

Restores set project paths on Project Load

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.project_template()

Class Description:

Project Template Tools
mari.ep.project_template.applyLightInfoFromTemplate(templateFilePath)

Applies Light info to your project from a template

Arguments:

templatePath (string):            A path to a template json

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.applyViewportInfoFromTemplate(templateFilePath)

Applies Viewport info to your project from a template

Arguments:

templateFilePath (string):            A path to a template JSON

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.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
mari.ep.project_template.__epGUI__.createTemplateUI()
GUI

Opens the createTemplate UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epGUI__.importTemplateUI()
GUI

Opens the importTemplate UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epGUI__.manageTemplateUI()
GUI

Opens the manageTemplate UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epSystem__.addTemplateFolderPreference()
SYSTEM

Adds Preferences to the Mari Preference Dialog
to set a Path where Templates should be stored
/Preferences/Paths/Project Templates

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epSystem__.autoImportTemplateOnNewProject()
SYSTEM

Automatically imports a template into a newly created project

The process never is called when in Terminal Mode (on purpose)

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epSystem__.loadTemplateFolderPreference()
SYSTEM

Load the Project Template Preference Path from the config
and set it in the /Preferences/Paths/Project Templates

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epSystem__.saveTemplateFolderPreference()
SYSTEM

Saves the Project Template Preference to the config

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.project_template.__epSystem__.setTemplateFolderPreference(path)
SYSTEM

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




mari.ExtensionPack.projectors()

Class Description:

Projector related tools
mari.ep.projectors.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
mari.ep.projectors.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
mari.ep.projectors.removeAllProjectors(silent=False)

removes all Projectors

Arguments:

silent (bool):        if True, no confirmation dialog will be shown

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.projectors.toggleCameraType()

toggles the selected projector between Orthographic and Perspective

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.projectors.updateProjectorCamera()

updates the currently active projector with the camera settings from the active viewport

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.projectors.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
mari.ep.projectors.__epGUI__.multiRenameProjectors()
GUI

Launches a UI to rename Projectors

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.projectors.__epGUI__.projectionWizard()
GUI

Launches the 3D Scan Projection Wizard UI

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.projectors.__epSystem__.revertCameraClippingPlaneSettings()
SYSTEM

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
mari.ep.projectors.__epSystem__.setClippingPlaneMetadataOnProjector(projector)
SYSTEM

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




mari.ExtensionPack.quickmarks()

Class Description:

Nodegraph quickmark related tools
mari.ep.quickmarks.loadQuickMark(ID)

Load a Nodegraph Quickmark

Arguments:

ID (int):    The Number of the Quickmark to load


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.quickmarks.removeQuickMark(ID)

Remove a Nodegraph Quickmark

Arguments:

ID (int):    The Number of the Quickmark to delete


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.quickmarks.setQuickMark(ID)

Define a new Nodegraph Quickmark

Arguments:

ID (int):    The Number to which to assign the quickmark to


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.quickmarks.__epSystem__.addQuickMarksToGUI()
SYSTEM

Adds Quickmark Buttons to top of Nodegraph

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.quickmarks.__epSystem__.checkQuickMarks()
SYSTEM

Remove unused quickmarks that point to a non-existent location (geo or graph)
and update Button state

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.quickmarks.__epSystem__.deactivateQuickMarkButtons()
SYSTEM

Sets all Quickmark Buttons to disabled

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.radioNodes()

Class Description:

radio Node and transmitter related Methods
mari.ep.radioNodes.convertInputConnectionsToRadios(nodelist=None, minimum_node_distance=800)

Auto converts input connections on given nodes to a Radio Transmitter / Radio Node Setup.
If no nodelist is supplied, the current selection will be used.

Arguments:

nodelist (list of mari.Node):         A optional list of mari nodes to process input connections for.
                                      If no nodelist is given (None, default value), the current selection
                                      is used.

minimum_node_distance (int):          An optional integer value defining the minimum distance, the input
                                      nodes need to be away from the source node in order to be converted
                                      to a radio transmitter/radio node connection pair. Defaults to 800.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.radioNodes.convertInputConnectionsToTeleporters(nodelist=None, minimum_node_distance=800)

Auto converts input connections on given nodes to a Teleport Broadcast/Receiver Node Setup.
If no nodelist is supplied, the current selection will be used.

Arguments:

nodelist (list of mari.Node):         A optional list of mari nodes to process input connections for.
                                      If no nodelist is given (None, default value), the current selection
                                      is used.

minimum_node_distance (int):          An optional integer value defining the minimum distance, the input
                                      nodes need to be away from the source node in order to be converted
                                      to a broadcast/receiver node connection pair. Defaults to 800.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.radioNodes.convertOutputConnectionsToRadios(nodelist=None, minimum_node_distance=800)

Auto converts output connections on given nodes to a Radio Transmitter / Radio Node Setup.
If no nodelist is supplied, the current selection will be used.

Arguments:

nodelist (list of mari.Node):         A optional list of mari nodes to process output connections for.
                                      If no nodelist is given (None, default value), the current selection
                                      is used.

minimum_node_distance (int):          An optional integer value defining the minimum distance, the output
                                      nodes need to be away from the source node in order to be converted
                                      to a radio transmitter/radio node connection pair. Defaults to 800.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.radioNodes.convertOutputConnectionsToTeleporters(nodelist=None, minimum_node_distance=800)

Auto converts output connections on given nodes to a Broadcast/Receiver Node Setup.
If no nodelist is supplied, the current selection will be used.

Arguments:

nodelist (list of mari.Node):         A optional list of mari nodes to process output connections for.
                                      If no nodelist is given (None, default value), the current selection
                                      is used.

minimum_node_distance (int):          An optional integer value defining the minimum distance, the output
                                      nodes need to be away from the source node in order to be converted
                                      to a radio broadcast/receiver node connection pair. Defaults to 800.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.radioNodes.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
mari.ep.radioNodes.hideAllRadioNodeConnections()

Hides all Radio Connections in the current Graph Tab

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.jumpViewToRadioNodeConnection()

Focuses your Nodegraph on connected Nodes from the currently selected Radio Node or
Radio Transmitter Node

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.showAllRadioNodeConnections()

Shows all Radio Connections in the current Graph Tab

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.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
mari.ep.radioNodes.toggleSelectedRadioNodesConnection()

Toggle Selected Radio Nodes between "Show Connection" and "Hide Connection"

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.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
mari.ep.radioNodes.__epGUI__.connectRadioNodeToTransmitter()
GUI

Launches the "Connect to Transmitter" dialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.__epGUI__.convertConnection()
GUI

Launches a dialog that allows you to convert the inputs or outputs on selected nodes into a
radio/transmitter connection or a teleport broadcast/receiver connection

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.radioNodes.__epSystem__.connectRadioNodeCreationSignal()
SYSTEM

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
mari.ep.radioNodes.__epSystem__.createRadioNodePreference()
SYSTEM

Adds Radio Node Preferences to the Mari Preferences

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.__epSystem__.disconnectRadioNodeCreationSignal()
SYSTEM

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
mari.ep.radioNodes.__epSystem__.reconnectRadioNodeToTransmitter(radionode)
SYSTEM

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
mari.ep.radioNodes.__epSystem__.saveRadioNodePreference()
SYSTEM

Saves the On/Off State of Radio Node Preferences in the Mari Preferences

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.radioNodes.__epSystem__.updateAllRadioNodes()
SYSTEM

Builds a signal connection to update all Radio Nodes and Radio Transmitter names, if the input changes

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.resources()

Class Description:

Path resources such as extension pack icon paths and extension pack
default object paths
mari.ep.resources.extPack_3rdParty_path()

Path to 3rd Party Modules

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.resources.extPack_archives_path()

The path to Extension Pack Archives

Returns:
string:                  The resolved path


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_baseShapes_path()


The path to Extension Pack Shape Textures

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_contextMenus_path()

Path to extension pack context menus

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.resources.extPack_gradients_path()

Path to Gradient presets for the Gradient Editor

Returns:
string:                  The resolved path

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.resources.extPack_grunges_path()


The path to Extension Pack Grunge Textures

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_hdris_path()


The path to Extension Pack HDRI Textures

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_hotboxes_path()

The path to Extension Pack Hotboxes inside of the Resources Folder

Returns:
string:                  The resolved path


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_icon_path()

The path to Extension Pack Icons

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_imageNotes_anatomy_path()

Path to icons for the "Image Notes" Shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_imageNotes_materials_path()

Path to icons for the "Image Notes" Shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_imageNotes_path()

Path to icons for the "Image Notes" Shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_imageNotes_shaderStreams_path()

Path to icons for the "Image Notes" Shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_imageNotes_utilities_path()

Path to icons for the "Image Notes" Shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_industrySurfaces_path()


The path to Extension Pack Industry Surfaces Textures

Returns:
string:                  The resolved path

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.resources.extPack_materialpreset_path()

The path to Extension Pack Material Presets

Returns:
string:                  The resolved path


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_modoBakePresets_path()

The path to Extension Pack Modo Bake Presets

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_nodeContextMenu_path()

Path to extension pack standard node context menus
Node context menus appear when pressing CTRL+SPACE on a supported Node

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.resources.extPack_object_path()

The path to Extension Pack Default Objects

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.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
mari.ep.resources.extPack_procedurals_path()

The path to Extension Pack Procedural Masks for the Mask shelf

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.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
mari.ep.resources.extPack_settings_path()

The path to Extension Pack Settings inside of the Resources folder

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_shelf_data_path()

Path to Extension Pack's shared Image Data Folder

Returns:
string:                  The resolved path

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.resources.extPack_smartmasks_path()

The path to Extension Pack Smart Masks for the Mask Shelf

Returns:
string:                  The resolved path


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_styles_path()

The path to Extension Pack Styles inside of the Resources Folder

Returns:
string:                  The resolved path


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.resources.extPack_textures_path()

The path to Extension Pack Textures

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.extPack_tools_path()

Returns the Base Path of the Tools Directory

Returns:
string:                  The resolved path

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.resources.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




mari.ExtensionPack.selection()

Class Description:

Selection related tools
mari.ep.selection.isolateSelect()

Isolates visibility of the selection

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection.showLastHidden()

Unhides the last hidden bit of geometry

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.selection.__epSystem__.connect_last_hidden_signals()
SYSTEM

Connects to mari standard actions to record the last component that was hidden

Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.selection_group()

Class Description:

selection group related methods
mari.ep.selection_group.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
mari.ep.selection_group.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
mari.ep.selection_group.deleteAll()

Delete All Selection Groups matching type (object, patch etc.)

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.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
mari.ep.selection_group.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
mari.ep.selection_group.hideAll()

Hide All Selection Groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.hideUnselected()

Hide unselected Selection Groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.invertVisibility()

Inverts the visibility of selection groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.lockAll()

Lock All Selection Groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.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
mari.ep.selection_group.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
mari.ep.selection_group.showAll()

Show All Selection Groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.unlockAll()

Unlock All Selection Groups

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.__epGUI__.combineSelectionGroups()
GUI

Launches the "Combine Selection Groups" Dialog

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.selection_group.__epGUI__.deleteAll_containingName()
GUI

Delete All Selection Groups matching or containing a string

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.__epGUI__.materialID()
GUI

Launches the "Material ID from Selection Groups" Dialog

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.__epGUI__.multiRenameSelectionGroups()
GUI

Opens a Dialog to rename Selection Groups with multiple options

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.__epGUI__.searchAndReplaceNames()
GUI

Rename selection groups with a search and replace

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.selection_group.__epGUI__.setMaterialIDColorByDialog(selGroups=None)
GUI

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
mari.ep.selection_group.__epSystem__.deleteQuickVisibilityToolbar()
SYSTEM

Removes the Quick Visibility Toolbar from the Selection Group Palette

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.selection_group.__epSystem__.disableQuickVisToolbar()
SYSTEM

Disable all UI Elements of the Quick Vis Toolbar

Introduced:
EP6R2

Modified:
EP6R2

mari.ep.selection_group.__epSystem__.enableQuickVisToolbar()
SYSTEM

Enable all UI Elements of the Quick Vis Toolbar

Introduced:
EP6R2

Modified:
EP6R2

mari.ep.selection_group.__epSystem__.initializeQuickVisToolbar()
SYSTEM

Reinitializes the Quick Visibility Toolbar.
with Project specific Search History and Visibility Sets.
Get's called on Project open

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.selection_group.__epSystem__.installQuickVisibilityToolbar()
SYSTEM

Adds a Quick Visibility Toolbar to the Selection Group Palette

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.selection_group.__epSystem__.quickVisibilityWidget()
SYSTEM

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
mari.ep.selection_group.__epSystem__.saveQuickVisSettings()
SYSTEM

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

mari.ep.selection_group.__epSystem__.updateMaterialIDFilters()
SYSTEM

Updates the Material ID Filter List
in the Quick Vis Toolbar based on existing
Material ID Overrides on Selection Groups

Introduced:
EP6R2

Modified:
EP6R2





mari.ExtensionPack.shader()

Class Description:

Shader related methods
mari.ep.shader.selectLastShader()

Tries to toggle to the last used shader

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.shader.syncObjectShaderSelection()

Syncs all shader selections on all objects in a project to the current shader name

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.shader.__epSystem__.selectLastShader_monitorShaderChangesOnGeoAdded()
SYSTEM

Sets up a signal to monitor shader changes when a new piece of geo is added

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.shader.__epSystem__.selectLastShader_monitorShaderChangesOnProjectOpen()
SYSTEM

Sets up a signal to monitor shader changes when a project is oppened

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.shaderPreset()

Class Description:

Methods related to the Shader Preset system
mari.ep.shaderPreset.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
mari.ep.shaderPreset.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
mari.ep.shaderPreset.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
mari.ep.shaderPreset.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
mari.ep.shaderPreset.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
mari.ep.shaderPreset.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
mari.ep.shaderPreset.__epSystem__.monitorShadersOnGeoAdded()
SYSTEM

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
mari.ep.shaderPreset.__epSystem__.monitorShadersOnProjectOpened()
SYSTEM

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




mari.ExtensionPack.shading()

Class Description:

Shading related methods
mari.ep.shading.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




mari.ExtensionPack.shelf()

Class Description:

Shelf methods for standard Mari Shelf System
mari.ep.shelf.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
mari.ep.shelf.deleteAllUserMariShelves()

Deletes all custom Shelf Tabs inside the Standard Mari Shelf System

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.shelf.groupShelf(shelf, groupname)

EP DEPRECATION WARNING:

This method will be deprecated in a future version.
It is a temporary wrapper to restore support for Mari 7.5 Beta 1 which has issues
with grouping shelves

Wrapper for mari.shelves.groupShelf()

Arguments:
shelf (mari.Shelf):           The Mari Shelf to Group
groupname (str):              The Name of the Group to put the shelf under

Returns:
None:

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.shelf.__epGUI__.createShelfFromFolder_UI()
GUI

Launches a UI to create Shelves from Folders

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.shelf.__epSystem__.createAdditionalShelfUIElements()
SYSTEM

Modifies the standard Mari Shelves UI and adds new buttons

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.splashScreen()

Class Description:

Splash Screen
mari.ep.splashScreen.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
mari.ep.splashScreen.__epGUI__.showSplashScreen()
GUI

Launches the Splash Screen

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.splashScreen.__epGUI__.showSplashScreen_ifAllowed(Force=False)
GUI

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
mari.ep.splashScreen.__epSystem__.addSplashScreenTimeoutPreference()
SYSTEM

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

mari.ep.splashScreen.__epSystem__.changeSplashScreenTimeoutPreference()
SYSTEM

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

mari.ep.splashScreen.__epSystem__.createOfflineThumbnailsFromJson()
SYSTEM

Will download Thumbnails into Resources/Spash
for use with the Splash Screen if no internet is available

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.symmetry()

Class Description:

EP DEPRECATION WARNING:

This class is deprecated and will be removed in the future

Symmetry related methods

mari.ep.symmetry.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
mari.ep.symmetry.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
mari.ep.symmetry.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
mari.ep.symmetry.setSymmetryMode()

EP DEPRECATION WARNING:

This method is deprecated and will be removed in the future

Toggles between different Symmetry Modes

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.text()

Class Description:

Text Tool related methods
mari.ep.text.__epGUI__.textGenerator()
GUI

Launch the EP Text Generator

Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.textureSet()

Class Description:

Texture Set Palette related tools
mari.ep.textureSet.__epSystem__.createHardRef()
SYSTEM

This fixes a bug in the Mari own texture set palette

Inside the MegascanWidget() class that can be found at

..puppetshare/software/Mari/extracted/$VERSION/Media/Scripts/Mari/system
/megascans.py

is a variable defined:
controlLayout = FlowingVerticalLayout()

The variable is not defined as a class variable (self.controlLayout).

Sometimes when resizing palettes, mari "looses" the top layout controlling
Filterelements and Categories, because elements of the FlowingVerticalLayout()
are being garbage collected.

We grab it directly from the MegascanWidget Layout (it's at position 0),
then reassign it to a class variable inside the MegascanWidget.
This in theory should be enough to establish a proper parent relationship,
preventing it from being garbage collected

Another issue is the __del__ function inside the FlowingVerticalLayout() class
which recursively deletes items from
an internal class variable (item_list).
Instead of the takeAt() method applied at the moment we directly assign an empty
list to the class variable

Introduced:
EP6R3

Modified:
EP6R3





mari.ExtensionPack.toolbar()

Class Description:

methods that get called from toolbars
mari.ep.toolbar.alignLocatorToView()

aligns a locator to the current camera view

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.flipPaintThroughImage_Horizontally()

Flips a PaintThrough Image Horizontally

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.flipPaintThroughImage_Vertically()

Flips a PaintThrough Image Horizontally

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.forceActivateTransformTool()

Activates the "Transform Selected Objects" Tool in a way that it skips any potential dialog pop-ups

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.toolbar.scaleAndCenterLocator()

Scales the current locator to fit the object it belongs to and center on object

Introduced:
EP6R2

Modified:
EP6R2
mari.ep.toolbar.__epSystem__.addOptionsToPaintThroughToolbar()
SYSTEM

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
mari.ep.toolbar.__epSystem__.addProjectionModeOptions(addSeparator=True)
SYSTEM

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
mari.ep.toolbar.__epSystem__.changeProjectionModePreference()
SYSTEM

Executes a change in Preferences from the Painting Tab of the Preferences to display Projection Modes


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.changeToolsToolbarPreference()
SYSTEM

Launches an operation to edit the DefaultToolbars.conf file when the setting is changed

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.createProjectionModePreference()
SYSTEM

Adds Preferences to the Painting Tab of the Preferences to display Projection Modes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.createToolsToolbarPreference()
SYSTEM

Adds Settings to the Preferences to control the appearance of the Mari Tools Toolbar

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.delete_quick_transform()
SYSTEM

Force deletes any open quick transform tool

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.toolbar.__epSystem__.force_update_quick_transform_ui()
SYSTEM

Can be used to force update the "Quick Transform" Widget
with current Object or Locator Transformations.

The Quick Transform Widget is shown while the "Transform Selected Object" Tool is active.

The Method should be called from any external tool that applies python based transforms to
tools, in order to keep the Widget Data shown to the user (Translation,Scale,Rotation) in sync
with what the user sees.

If you use mari.ExtensionPack.matrix.setTransform() or setTransformFast(), this is called automatically

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.toolbar.__epSystem__.hideProjectThroughWarning()
SYSTEM

Forces the Projection "Through" Warning (a red box around the viewport) to off


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.toolbar.__epSystem__.initialize_Locator()
SYSTEM

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
mari.ep.toolbar.__epSystem__.initialize_PaintThroughToolbar()
SYSTEM

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
mari.ep.toolbar.__epSystem__.initialize_SyncedBufferDepth()
SYSTEM

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
mari.ep.toolbar.__epSystem__.initialize_TransformPaintToolbar()
SYSTEM

Adds Extension Pack Options to the Transform Paint Toolbar.
It buils a signal connection, so should
not be executed repeatedly

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.initialize_quicktransform_signals()
SYSTEM

Creates Signal Connections to Tools
to trigger hide/show of the quick transform widget in the viewport depending on which tool is active

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.toolbar.__epSystem__.initialize_transformObjectToolbar()
SYSTEM

Adds Extension Pack Options to the Transform Object Toolbar.
It buils a signal connection, so should
not be executed repeatedly

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.loadProjectionModePreference()
SYSTEM

Loads Preferences from the Painting Tab of the Preferences to display Projection Modes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.loadTransformObjectToolbar()
SYSTEM

Manually load Extension Pack Items into the transform object toolbar
without building additional signal connections.

Useful in caes where the toolbar is opened without having been the result
of an action trigger

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.toolbar.__epSystem__.saveProjectionModePreference()
SYSTEM

Saves Preferences from the Painting Tab of the Preferences to display Projection Modes

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.saveToolsToolbarPreference()
SYSTEM

Saves the State of preferences to control the appearance of the Mari Tools Toolbar

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.toolbar.__epSystem__.setup_object_transform_reset_signal()
SYSTEM

Creates a signal connection to mari's "Reset Object Transformation" Action.
If called the "Quick Transform UI" is (Visible when the Transform Selected Objects Tool is active)
gets refreshed

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.toolbar.__epSystem__.syncProjectionModeOptions()
SYSTEM

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:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.utils()

Class Description:

Various Python Helper Methods
mari.ep.utils.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
mari.ep.utils.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
mari.ep.utils.closeAllOpenProgressDialogs()

Closes any open progress Dialogs from the utils.progressDialog() method

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.utils.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
mari.ep.utils.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
mari.ep.utils.current_notification()

Retrieves the current notification widget or None

Returns:

QFrame                             Returns the Notification Class or None


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.utils.delete_current_notification(do_not_animate=False)

Deletes the currently open notification

Arguments:

do_not_animate                      Optional,defaults to False. 
                                    If True, the open Notification will be deleted immediately
                                    instead of sliding out of view


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.utils.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
mari.ep.utils.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:
EP6R3

Modified:
EP6R3
mari.ep.utils.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

mari.ep.utils.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
mari.ep.utils.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
mari.ep.utils.getStyle(stylefile_name, **style_options)

Returns a stylesheet from a specified filename.
It adds support for tokenreplacement while allowing for specifying default values
inside the loaded qss file.

Example:
>> border: {border_width:2}px solid {border_color:#3498db};

tokens are border_width and border_color.

>>  getStyle("qss_name", border_width=10)

will return the stylesheet as

>>   border: 10px solid #3498db;

-------------------------------------
Usage:

checkable_button = mari.ep.utils.getStyle(
"QPushButton",
border_style="solid",
border_color="#5f636a",
font_size="11",
font_weight="bold",
border_width="1",
border_radius="10",
background_color="#333333",
hover_background="#666666",
hover_border_color="#a3aab6",
pressed_background="#333333",
pressed_border_color="#5f636a",
checked_background="rgba(180,0,0,255)",
checked_hover_background="rgba(200,30,0,255)",
)

Arguments:

stylefile_name (str):       The pure name of the style file, without extension
style_options:              Override default styling parameters

Returns:

(string):                  The stylesheet from the file with tokens replaced

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.utils.getUIScaleFactor()

returns a scale factor for UIs based on Maris Custom Font Size Setting

Returns:

(float):          A Scale Factor


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.utils.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:
EP6R3

Modified:
EP6R3
mari.ep.utils.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:
EP6R3
mari.ep.utils.mariViewport()

This returns the current Mari Viewport

WARNING: You MUST call stopViewportTracking() when you are done with the viewport
to prevent garbage Collect issues !



Returns:

(QOpenGlWidget):              Returns the Mari Viewport Widget if found
                              or None if not found


Introduced:
EP6R3

Modified:
EP6R3
mari.ep.utils.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
mari.ep.utils.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
mari.ep.utils.notification(buttons=None, header_text='Header', info_text='Info', detail_text='Detail', min_notifier_width=400, min_notifier_height=170, allow_dynamic_notifier_size=True, header_pointsize=10, info_pointsize=9, detail_pointsize=9, btn_pointsize=8, notification_type='message', custom_notification_color=None, custom_text_color=None, custom_button_color=None, notification_color_width=24, notification_position='bottom left', notification_animation_type='horizontal', animation_show_duration=300, animation_hide_duration=300, timeout_notification=False, notification_timeout_length=5000, timeout_progress_color=None, background_color='rgba(60, 60, 60, 80%)', distance_from_edge=5, always_remove_previous_notification=True)

Notification Widget to display info to the user directly in the viewport without blocking Mari.
The Notification Widget allows adding QPushButtons with Callback Functions to execute operations.
Only one Notification can at any time be shown. If a new Notification is triggered, the previously
shown one will first be hidden.

Please refer to /Extension Pack/Resources/PythonExamples/Notification.py for a full example

Arguments:

buttons (dict):                               Optional. Defaults to None
                                              Allows you to add buttons to the Notification that can
                                              execute callback functions.
                                              Below is an example Dictionary:
                                              
                                              {"Btn with callback+tooltip" : ["print(
                                              'test')", "Load new Model Version"],
                                              "Stretch" : [],
                                              "Btn with tooltip+icon" : ["None",
                                              "iconToolTip","iconPath"],
                                              "SpacerItem01" : [],
                                              "SpacerItem02" : [],
                                              "Ignore": ["Close"] }
                                              
                                              The dictionary entries are formatted as:
                                              
                                              BUTTON_NAME : 
                                              [stringified_callback,tooltip,icon]
                                              
                                              Instead of a callback functions you can also provide one of the
                                              following words (case-insensitive to execute a "Notification close":
                                              close, abort, cancel
                                              To give an empty callback pass in
                                              "None" (as string)
                                              
                                              A tooltip is optional.
                                              However if you provide an icon path, a
                                              tooltip is expected (even if empty string)

header_text (str):                            Optional. Defaults to None. The Header Text is displayed as a bold
                                              headline on the Notification. If None, no Header is displayed

info_text (str):                              Optional. Defaults to None. The Info Text is displayed as normal
                                              text below the headline.If None, it is not displayed

detail_text (str):                            Optional. Defaults to None. The Detail Text is displayed as italic
                                              text below the info_text.If None, it is not displayed

min_notifier_width (int):                     Optional.Defines the minimum width in pixels of the Notification
                                              widget. Defaults to 400.


min_notifier_height (int):                    Optional. Defines the minimum height in pixels of the Notification
                                              widget. Defaults to 170


allow_dynamic_notifier_size (bool):           Optional. Defaults to True. If False, then the size of the widget
                                              is 100% determined by the min_notifier_width and height arguments.
                                              If True (Default), then the widget is allowed to upscale past
                                              these minimum values. The amount of horizontal and vertical scaling
                                              is determined by the Font Metrics of the supplied text (e.g.
                                              Header, info text and detail text)

header_pointsize (int):                       Optional. The Font Pointsize of the Header. Defaults to 10

info_pointsize (int):                         Optional. The Font Pointsize of the Info Text. Defaults to 9

detail_pointsize (int):                       Optional. The Font Pointsize of the Detail Text. Defaults to 9

btn_pointsize (int):                          Optional. The Font Pointsize of any button Text. Defaults to 8

notification_type (str or None):              Optional.The notification type adds a color coded vertical bar
                                              on the left side of the widget. The color can be overwritten with
                                              the custom_notification_color argument still. Defaults to "message"
                                              
                                              We have three presets by default:
                                              "info:      a yellow vertical bar
                                              "error:     a red vertical bar
                                              "message:   a blue vertical bar
                                              None:       The vertical bar is not displayed


custom_notification_color (str or None):       Optional. Defaults to None. If not None and the notification_type
                                              argument is something different than None, then this argument
                                              allows you to define a custom color for the vertical color bar
                                              of th widget. The color is supplied as a stylesheet value e.g
                                              "#2d64e0" or "rgba(0,0,0,255)"

custom_text_color (str or None):               Optional. Defaults to None. If not None then this argument
                                              allows you to define a custom color for the text
                                              (header,info,detail) of the widget.
                                              The color is supplied as a stylesheet value e.g
                                              "#2d64e0" or "rgba(0,0,0,255)". If None,then a neutral gray is used.


custom_button_color (str or None):             Optional. Defaults to None. If not None then this argument
                                              allows you to define a custom color for the callback buttons
                                              of the widget.
                                              The color is supplied as a stylesheet value e.g
                                              "#2d64e0" or "rgba(0,0,0,255)". If None,then a neutral gray is used.


notification_color_width (int):               Optional. Determines the width of the vertical color bar indicating
                                              the type of Notification (e.g error, info etc.). Defaults to 24.


notification_position (str):                  The position where the Notification should appear. Valid options are
                                              "top left","top right","bottom left","bottom right","top center",
                                              "bottom center"



notification_animation_type (str):            Optional. Determines the way the notification appears e.g.
                                              sliding into the view vertically or horizontally.
                                              The two options are "horizontal" or "vertical". Defaults to
                                              "horizontal"

animation_show_duration (int):                Optional.The time in ms it takes for the animation of the Widget
                                              show process to complete. Defaults to 300.

animation_hide_duration (int):                Optional. The time in ms it takes for the animation of the Widget
                                              hide process to complete. Defaults to 300.

timeout_notification (bool):                  Optional. If True, the notification will auto-hide after the time
                                              specified in the notification_timeout_length argument.
                                              A circular progress bar will be displayed around the "X" close btn.
                                              If False (default), the notification will not auto-disappear unless
                                              a second notification is triggered somewhere.

notification_timeout_length (int):            Optional. If timeout_notification is True, this specifies the time
                                              in ms until the Notification auto-disappears. Defaults to 5000


timeout_progress_color (tuple):               Optional. Color of the timeout progress wheel.
                                              Defaults to None, which will result in a default
                                              Value (45, 100, 224)


background_color (str):                       Optional. The Stylesheet Background color of the Widget
                                              Defaults to "rgba(60, 60, 60, 80%)"

distance_from_edge (int):                     Optional. The distance of the notification from the viewport edge.
                                              Defaults to 5.

always_remove_previous_notification (bool):   Optional. If to delete any previously open notifcation first
                                              before showing a new one.
                                              Defaults to True.



Returns:

QFrame:                                       Returns the Notification Widget

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.utils.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
mari.ep.utils.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
mari.ep.utils.sanitizeText(text, sanitizeSlashes=False, removeWhiteSpace=True, customCharacters=None)

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

customCharacters (str|None):  If not None, the given characters will be used to clean
                              the text, instead of the internally defined ones.



Returns:

string:                       Returns the sanitized text


Introduced:
EP6R2

Modified:
EP6R3

mari.ep.utils.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
mari.ep.utils.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:
EP6R3

Modified:
EP6R3
mari.ep.utils.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
mari.ep.utils.stopViewportTracking()

Releases an instance of the Mari Viewport aquired my mariViewport()
so it can be properly garbageCollected.

WARNING: This method MUST be called when you are done with the Mari Viewport

mari.ep.utils.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
mari.ep.utils.__epGUI__.quickCommandLauncher()
GUI

Opens a Maya style Quick Launcher dialog allowing you to execute
any mari action

Introduced:
EP6R3

Modified:
EP6R3

mari.ep.utils.__epGUI__.shortcutResolveDialog(mode='help')
GUI

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:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.version()

Class Description:

Methods to determine Extension Pack Versions
mari.ep.version.buildVersion()

returns the build Version

Returns:

(int):              The Build Version of the current EP Version


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.checkResourceVersion()

Checks if the currently loaded Resources are the right ones to use with this EP Version

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.devToolsVisible()

Returns if the current Version should show Dev Tools

Returns:

(bool):       True if Dev Tools should be shown


Introduced:
EP6R2

Modified:
EP6R2
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.launchVersionCheck()

Checks if a new Version of Extension Pack is available
and returns a message

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.majorVersion()

returns the Major Version

Returns:

(int):              The Major Version of the current EP Version


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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:
EP6R2

Modified:
EP6R2
mari.ep.version.mari75v1orAbove(invert=False)

        Returns true if Mari 7.5v1 or higher

        
Arguments:

        invert (bool):    Inverts the result

        
Returns:

        bool:     True or False if version is higher


        
Introduced:
        EP6R2

        
Modified:
        EP6R2
        
mari.ep.version.minorVersion()

returns the Minor Version

Returns:

(int):              The minor Version of the current EP Version


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.patchVersion()

returns the patch Version

Returns:

(int):              The patch Version of the current EP Version


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.version.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
mari.ep.version.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
mari.ep.version.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
mari.ep.version.versionPrettyName()

returns the Pretty Version Name

Returns:

(string):              The full written out, nice version of EP


Introduced:
EP6R1

Modified:
EP6R1




mari.ExtensionPack.view()

Class Description:

View related methods
mari.ep.view.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"
                    "Steel"


Introduced:
EP6R1

Modified:
EP6R1
mari.ep.view.__epGUI__.checkProjectionLocks(ignore_settings=False)
GUI

Runs a check if
- No Object is selected
- An Object is selected but it is locked
- Selection Groups on the current Object are locked
- Patches on the current Object are locked
- Current Layer is locked

If any of those return True, a notification will be shown in the viewport
allowing the user to unlock.

The checks can be disabled one by one or all together via the Mari Preferences /
Painting Tab / Projection Warnings Group.

If the ignore_settings argument is True , those settings will be ignored
and all checks are run. If False (default), only the checks are run that are turned on in the
preferences


Arguments:
ignore_settings (bool):       Optional. If True all checks are run,
                              regardless if they are enabled in the Mari Preferences.
                              If False (Default), then only checks are run that are 
                              enabled in the Preferences.

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.view.__epGUI__.screenshot_all_channels()
GUI

Screenshot all channels

Introduced:
EP6R1

Modified:
EP6R1
mari.ep.view.__epSystem__.createViewportNotifierPreferences()
SYSTEM

We add adjustable Preferences to the Mari Preferences / Painting Tab / Projection Warning
where users can adjust what kind of warnings they wish to see.
These warnings pop up in the Viewport if Paint cannot be projected because of a lock state
being present on the Geo (Object, Patches, Selection Groups, Layers etc.)

This method creates those Preference settings on Mari start

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.view.__epSystem__.disconnectProjectionWarnings()
SYSTEM

Breaks signal connections for the Projection Warning system

These warnings pop up in the Viewport if Paint cannot be projected because of a lock state
being present on the Geo (Object, Patches, Selection Groups, Layers etc.)

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.view.__epSystem__.resetProjectionWarnings()
SYSTEM

Resets any temporarily paused Projection Warnings.

These warnings pop up in the Viewport if Paint cannot be projected because of a lock state
being present on the Geo (Object, Patches, Selection Groups, Layers etc.)

Users have the choice to "pause" a Projection Warning for the duration of their Mari
Session

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.view.__epSystem__.saveViewportNotifierPreferences()
SYSTEM

Saves the current settings of the Viewport Notification Warnings
e.g "Object is locked", "Selection Group is locked" etc.

These warnings pop up in the Viewport if Paint cannot be projected because of a lock state
being present on the Geo (Object, Patches, Selection Groups, Layers etc.)

We add adjustable Preferences to the Mari Preferences / Painting Tab / Projection Warning
where users can adjust what kind of warnings they wish to see.

This method saves the current state of those settings so they can be restored on the
next mari start

Introduced:
EP6R3

Modified:
EP6R3
mari.ep.view.__epSystem__.setupProjectionWarnings()
SYSTEM

Setup signal connections for the Projection Warning system

These warnings pop up in the Viewport if Paint cannot be projected because of a lock state
being present on the Geo (Object, Patches, Selection Groups, Layers etc.)

Introduced:
EP6R3

Modified:
EP6R3




mari.ExtensionPack.web()

Class Description:

Internet related methods
mari.ep.web.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
mari.ep.web.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