Class / Method Overview


The following subclasses have been exposed as part of the mari.ExtensionPack() class.




mari.ExtensionPack.resources()


Path resources such as extension pack icon paths and extension pack default object paths


  • extPack_resource_locator(self,alwaysReturnAPath=False)


Returns the custom paths specified via the 'ResourceLocator' json file.The Resources Json File can be used to move the large Extension Pack

Resources out of the Mari Script Folder.


Parameters:


alwaysReturnAPath (bool):                          If True, a path is returned even if no custom path has been set (e.g. the path returned will be

                                               inside the Extension Pack Installation)



  • mari_settings_locator(self)


Returns the Setting specified for detecting the Mari Settings directory directory, as specified in the 'ResourceLocator' Json File:


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



  • extPack_settings_path(self)


The Path to the Extension Pack Settings Folder inside the Resources Folder


  • extPack_icon_path(self)


The path to Extension Pack Icons


  • extPack_object_path(self)


The path to Extension Pack Default Objects


  • extPack_textures_path(self)


The path to Extension Pack Textures


  • extPack_grunges_path(self)


The path to Extension Pack Grunge Textures


  • extPack_smartmasks_path(self)


The path to Extension Pack Smart Masks for the Mask ShelfThe path to Extension Pack Smart Masks for the Mask Shelf


  • extPack_procedurals_path(self)


The path to Extension Pack Procedural Masks for the Mask shelf


  • extPack_materialpreset_path(self)


The path to Extension Pack Material Presets


  • extPack_archives_path(self)


The path to Extension Pack Archives


  • extPack_tools_path(self)


The path to the Extension Pack Tools Folder


  • extPack_hotboxes_path(self)


The path to Extension Pack Hotboxes

mari.ExtensionPack.splashScreen()


Extension Pack Splash Screen


  • showSplashScreen(self,showReleaseNotes=True)


Launches the Splash Screen


Parameters:


showReleaseNotes (bool):                          Determines if Text Release Notes are shown in the Splash Screen


  • showSplashScreen_ifAllowed(self,showReleaseNotes=True)


Launches the Splash Screen if the user allows it / checkbox is set


Parameters:


showReleaseNotes (bool):                          Determines if Text Release Notes are shown in the Splash Screen



mari.ExtensionPack.hotbox()


Hotbox/Marking Menu related Methods



  • showHotbox(self,path='', SubmenuBackLink = None, force = False, resetPosition = True)


General Method to launch a hotbox


Parameters:


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




  • hotboxManagerUI(self)


Launches the Hotbox Designer UI



  • setupHotboxesOnStartup(self)


Sets up existing User Hotboxes on Mari startup (set hotkeys etc.)



  • setupEPHotboxesOnStartup(self)


Sets up Extension Pack Hotboxes on Mari startup  (set hotkeys etc.)

in a way that I am removing pre existing mari hotkeys for certain actions  if they are mapped

 


  • installEPHotboxes(self)


Installs Extension Pack Hotboxes into the Hotbox Folder (same location as Mari.conf file)

if they don't exist yet/are the same version



  • checkHotbox(self)


checks if the Extension Pack default Hotboxes have been modified



  • currentHotboxInstance(self)


Returns the currently open Hotbox Instance


Returns:


HotboxInstance


mari.ExtensionPack.brush()


  • toggleSteadyStroke(self)


Toggles the Steady Stroke Brush Otpion on and off. When toggling on, the last used Mode is restored.

Modes are stores per Tool


mari.ExtensionPack.bake()


  • SubstanceAutomationBakeBridgeUI(self)


Launches the Substance Baker Bridge UI


mari.ExtensionPack.project_paths()


Set Project Path Tool


  • set_project_paths(self)


Launches the Set Project Path Dialog


  • restore_project_paths(self)


Restores set project paths on Project Load


  • check_project_paths(self)


Checks if the currently set project paths are valid


  • get_projectPath_jsonFile(self)


Returns the per project path to the json file

Used to store project path settings such as export paths etc.



mari.ExtensionPack.project_template()


Project Template related methods



  • createTemplateUI(self)


    Opens the createTemplate UI



  • importTemplateUI(self)


    Opens the importTemplate UI



  • manageTemplateUI(self)


    Opens the manageTemplate UI



  • autoImportTemplateOnNewProject(self)


    Automatically imports a template into a newly created project

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



  • setTemplateFolderPreference(self,path)


    Sets the Project Template Folder in the Preference.

    This is the location where templates are loaded from.

    You can also add templates via Environment Variables


Return:


boolean                                                True if path could be set                                        


Parameters:


path  (string):                                        A path 




  • addTemplateFolderPreference(self)


 Adds Preferences to the Mari Preference Dialog

            to set a Path where Templates should be stored

/Preferences/Paths/Project Templates



  • saveTemplateFolderPreference(self)


Saves the Project Template Preference to the config


  • loadTemplateFolderPreference(self)


    Load the Project Template Preference Path from the config

    and set it in the /Preferences/Paths/Project Templates



  • saveProjectInfoAsTemplate(self,templateName)


    Saves a projector info template json and projector files


Return:


boolean,string                                        True if succesful + the path of the saved  template file                                


Parameters:


templateName  (string):                                A name of a template to save





  • applyProjectorInfoFromTemplate(self,templatePathFile,projectorFolderLocation)


    Applies Projector info to your project from a template

               


Parameters:


templatePath  (string):                                a path to a template json


projectorFolderPath (string):                        a path to a folder containing mari projector files




  • saveLightInfoAsTemplate(self,templateName)


Saves a light info template json


Return:


string                                                The path of the saved light template file


Parameters:


templateName  (string):                                A name of a template to save





  • applyLightInfoFromTemplate(self,templateFilePath)


 Applies Light info to your project from a template


Parameters:


templatePath  (string):                                A path to a template json



  • saveViewportInfoAsTemplate(self,templateName)


Saves a viewport info template json


Return:


string                                                The path of the saved  template file


Parameters:


templateName  (string):                                A name of a template to save




  • applyViewportInfoFromTemplate(self,templateFilePath)

   

Applies Viewport info to your project from a template


Parameters:


templatePath  (string):                                A path to a template json



  • savePrefsAsTemplate(self,templateName)


Saves a prefs info template json



Return:


string                                                The path of the saved  template file


Parameters:


templateName  (string):                                A name of a template to save





  • applyPrefsFromTemplate(self,templateFilePath,excludeList=[],includeList=[])


Applies Preferences to a project from a template


Parameters:


templatePath  (string):                                A path to a template json


exludeList (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 any preference path starts with it

    



  • saveNodesFromCurrentGraph(self,templateName,selectedOnly=False,skipImageData=False)

    

Saves Nodes from the current Graph to an archive



Return:


bool,string,string                                                Returns if export was a success, export status message, export path


Parameters:


templateName  (string):                                A template name to store the archive under


selectedOnly (bool):                                If you only want to include selected nodes


skipImageData (bool)                                if image data (paint) should be exported as well


    


  • importNodesFromTemplate(self,templateFolderPath,clearExisting=True,currentGeoOnly=True)

    

Imports Nodes from a Template


Return:


bool                                                True if succesful


Parameters:


templateFolderPath  (string):                        A path to a template folder


clearExisting (bool):                                if true, all channels and nodes from the geo will be removed before importing


currentGeoOnly (bool)                                if true, template will only be imported onto currently selected object




mari.ExtensionPack.selection()


Selection related tools


  • isolateSelect(self)


Isolates visibility of the selection


mari.ExtensionPack.patch()


Patch related tools


  • patchBake_to_imagemanager(self)


Launches Patch Bake to Image Manager



  • resizePatches_onChannelsOrNodes(self,size)


Resizes selected patches on either channels or nodes


Parameters:


size (int or string)                                            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



mari.ExtensionPack.camera()


Camera/View related tools


  • unproject_channel_to_imagemanager(self)


Unproject Channel to Image Manager tool



  • unproject_layer_to_imagemanager(self)


Unproject Layer to Image Manager tool



  • unproject_view_to_imagemanager(self)


Unproject View to Image Manager tool



  • switch_to_uv_view(self)


Switch the active tab to the UV View



  • switch_to_ortho_view(self)


Switch the active tab to the Ortho View



  • switch_to_persp_view(self)


Switch the active tab to the Perspective View



  • switch_to_split_view(self)


Switch the active tab to the Split View




mari.ExtensionPack.exportChannel()


Export related tools


  • exportSelectedChannelsFlattened(self)


Launches Export Custom Channel Selection Dialog with the

"Flattened" Checkbox turned on



  • exportSelectedChannels(self)


Launches Export Custom Channel Selection Dialog with the

"Flattened" CHeckbox turned off



  • exportLast(self)


Runs the last Export from Export Custom Channel Selection



  • setExportLastBehavior(self)


Sets the Checkbox for how "Export Last" is to deal

with Selected Patch Export - using the original selection

or the current one



  • restoreExportLastBehavior(self)


Sets the Checkbox for "Export Last" Patch Selection Behavior

back to the way it was when Mari was last opened 


mari.ExtensionPack.channel()


Channel related tools



  • channelFromChannelNode(self,geo,channelNode)


Returns a mari.channel from a mari.bakePointNode (a channel node)


Parameters:


geo (mari.geoEntity)                                        The geo to look for a channel

channelNode (mari.BakePoint)                                  The channelNode


Returns:


mari.Channel or None



  • duplicateFlattenChannels(self)


Launches Duplicate/Flatten Channel Dialog



  • saveChannelUDIMTemplate(self,geo=None,channel=None)


Samples the currently selected Channel and stores its resolutions per UDIM.        Geo and channel can optionally be supplied as arguments


Parameters:


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




  • createChannelFromUDIMTemplate(self)


Create a new Channel with the UDIM Size Configuration stored via channel_template_get



  • resizeChannelToUDIMTemplate(self,geo=None,channel=None)


Sets the currently selected Channel to the UDIM resolutions stored via channel_template_get.

Geo and channel can optionally be supplied as arguments


Parameters:


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



  • duplicate_channel(self)


Duplicate a channel with all sharing intact



  • duplicate_nodeNetwork(self,geo,inputNode,inputNodeNodeGraph,StopAfterRadioNodes=True,RenameChannelIncremental=True,

RenameChannel=False,newChannelName='NewChannel',offsetX=50,offsetY=50)


Duplicates 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.


Return:


mari.Node()


Parameters:


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 inputNodeis 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



  • create_packed_channel(self)


Launch Pack Channel UI


  • focusChannelInGraph(self)


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


  • focusChannelContentInGraph(self)


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


  • lockChannel(self)


Lock a Channel


  • lockAllChannels(self)


Lock all Channels


  • unlockChannel(self)


Unlock a channel


  • unlockAllChannels(self)


unlock all channels



  • channelsFromNode_UI(self)


Launches a dialog to create channels from a selected node


mari.ExtensionPack.channelLayer()


Channel Layer related tools


  • channelLayer_AddLayer(self)


Launches the "Add Channel Layer" UI



  • channelLayer_AddLayerMask(self)


Launches the "Add Channel Mask" UI



  • channelLayer_AddMaskGroup(self)


Launches the "Add grouped Channel Mask" UI


mari.ExtensionPack.layer()


Layer related tools


  • copyLayerAttributes(self)


Copies selected Layer Attributes to a Clipboard



  • pasteLayerAttributes(self)


Paste Layer Attributes onto selected layer from  a Clipboard



  • swapLayerType(self)


A call to a Dialog.

Allows you to swap out any Layer type for another Layer type. 

If possible, settings are transfered between nodes



  • cloneMergeSelectedLayers(self)


Executes layer Clone & Merge


  • toggleSelectionVisibility(self)


toggles the visibility of selected layers


  • toggleUnselectedVisibility(self)


toggles the visibility of unselected layers


  • toggleSelectionLock(self)


toggles the locking of selected layers


  • toggleUnselectedLock(self)


toggles the locking of unselected layers


  • convertToPaintable(self)


Extension Pack Version of standard Mari Layer Convert to Paintable

Supports multi selection and channel layers


  • copyWithShared(self)


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



  • pasteWithShared(self)


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



  • layerCut(self)


Standard Mari Layer CUT Action,however since extension pack

moves the action in the UI it is declared here again


  • layerCopy(self)


Standard Mari Layer COPY Action,however since extension pack

moves the action in the UI it is declared here again


  • layerPaste(self)


Standard Mari Layer PASTE Action,however since extension pack

moves the action in the UI it is declared here again


  • addMask(self,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/grayed 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


parameters:


mode (str):    available options are "reveal","hide","from Alpha","from Selection","from Selection Group" 


mari.ExtensionPack.lights()


Light related methods


  • rotateEnvironmentLight(self,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

               

  • createEnvLightPreference(self)


Adds ENV Light Rotation Settings to the Preferences


  • saveEnvLightPreference(self)


Saves the Setting of the ENV Light Rotation in the Preferences


mari.ExtensionPack.pinnedLayers()


Pinned Layer Methods (Layer Sharing Bookmarks)


  • emptyPin(self)


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


  • quickPin(self,mode)


Adds a Layer selection to the Quick Pin


parameters:


mode (str):                     'channel' wil add a pinned Channel, else automatically use layers



  • triggerQuickPin(self,layerType,layerName,project_uuid,layer_uuid)


Adds shared layers from the Quick Pin


parameters:


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



  • collectionPin(self,mode)


Adds a collection Pin


parameters:


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



  • triggerCollectionPin(self,layerType,layerName,project_uuid,layer_uuid)


Adds shared layers from a collection pin


parameters:


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



  • manageCollectionPins(self)


Launches Manage Collection Pins UI


  • restoreProjectPins(self)


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


  • clearCollectionPins(self)


Removes all Collection Pins in a Project


mari.ExtensionPack.shader()


Shader related tools


  • syncObjectShaderSelection(self)


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



  • selectLastShader(self)


Tries to toggle to the last used shader



  • selectLastShader_monitorShaderChangesOnProjectOpen(self)


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



  • selectLastShader_monitorShaderChangesOnGeoAdded(self)


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


mari.ExtensionPack.shaderPreset()


Shader Preset related tools


  • monitorShadersOnProjectOpened(self)


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


  • monitorShadersOnGeoAdded(self)


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


  • saveShaderPreset(self)


Stores a shader preset from the selected shader


  • removeShaderPreset(self)


Removes a shader preset based on the selected shader


  • restoreShaderParametersFromPreset(self)


If a preset matching the name of the selected shader is found, this will restore

all shader attributes to the saved preset


  • restoreShaderChannelInputsFromPreset(self)


If a preset matching the name 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


  • setNodesToShader(self)


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


  • restoreShaderDefaultInputs(self)


With a shader selected in the Shader Palette, this will restore the shader to the state

it was before "setNodesToShader" was first used


mari.ExtensionPack.selection_group()


Selection Group related methods


  • materialID(self)


Launches the "Material ID from Selection Groups" Dialog


  • setMaterialIDColorByDialog(self,selGroups=None)


Spawns a dialog that lets the user set custom ID Colors for Selection Groups


Parameters:


selGroups (list):  A list of optional selection Groups, otherwise the current selected one is used

       

  • setMaterialIDOverride(self,SelectionGroups,color)


Sets a Material ID Override on the provided Selection Group(s)


Parameters:


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



  • removeMaterialIDOverride(self,SelectionGroups)


Removes a Material ID Override on the provided Selection Group(s)


Parameters


SelectionGroups (list)                  A list of selection Groups to apply the override to



  • hideAll(self)


Hide All Selection Groups


  • showAll(self)


Show All Selection Groups


  • lockAll(self)


Lock All Selection Groups


  • unlockAll(self)


Unlock All Selection Groups


  • hideUnselected(self)


Hide unselected Selection Groups


  • invertVisibility(self)


Inverts the visibility of selectiong roups


  • deleteAll(self)


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


  • deleteAll_containingName(self)


Delete All Selection Groups atching or containing a string        


  • searchAndReplaceNames(self)


Rename selection groups with a search and replace        


mari.ExtensionPack.matrix()


  • matrixFromVectors(rotation=(0,0,0), translation=(0,0,0),scale=(1,1,1))


Creates a 4x4 Matrix from given Vectors


Parameters:


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


mari.ExtensionPack.object()


  • exportUVMasks(self)


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


  • exportUVMasks_selectionOnly(self)


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


  • exportGeometry(self)


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


  • exportGeometry_selectionOnly(self)


Launches a Export dialog where you can export your SELECTED object


  • subdivide(self)


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


  • setAllSUBDToHigh(self)


Set all objects to highest available subdivision


  • setAllSUBDToLow(self)


Set all objects to level 0


  • setVisibleSUBDToHigh(self)


Set all visible objects to highest available subdivision


  • setVisibleSUBDToLow(self)


Set all visible objects to level 0


  • addDefaultObject(self,asObjectVersion=True)


Launches the "Add Default Objects" dialog

where you can add a number of primitive objects to your Mari scene (plane, tiling plane, cube etc.)


Parameters


asObjectVersion (bool)                  Determines is the 'Add as Object Version' Checkbox is ticked by default



  • addDefaultObjectsToRecentMeshes(self)


Adds the Extension Pack Default Objects

            to the list of recent meshes in the CREATE NEW PROJECT Dialog


  • geoUVIndices(self,currentGeoOnly=True)


      Builds a UV Index Dictionary of your current geo or all geos



Parameters


currentGeoOnly (bool)                    Determines if to build the Indices for current Geo or all Geos


Return


dict + list


mari.ExtensionPack.imageManager()


Image Manager related Methods


  • exportSelected(self)


Export the selected images in the image manager to a folder


  • reloadSelectedImages(self)


Reloads selected images in the image manager from disc and updates

their occurrences inside of the project (tiled, triplanar etc.)


  • cleanImageManager(self)


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



  • enableImageAutoReloadOnImageManagerFiles(self)


       Enables the "Auto Reload" behavior on selected Images Manager Images



  • disableAllImageAutoReloadingOnProjectClose(self)


       Removes all paths in the "File Change Watcher" so no

       image changes are detected anymore


       This is called once a project is closed



  • setAutoReloading_onSelectedImages(self,mode)


       Sets the Auto Reloading on selected images in the image manager

       to on or off


       Parameters:


       mode (bool) - True/False to enable/disable the Auto Reload



  • deactivateAllImageAutoReloading(self)

       

       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


  • activateAutoReloadingOnSelectedImages(self)

       

       Sets the "Auto Reload" CHeckbox on selected images in the Image Manager to "On"


  • deactivateAutoReloadingOnSelectedImages(self)

       

       Sets the "Auto Reload" CHeckbox on selected images in the Image Manager to "Off"



  • removeImageManagerTabs(self)


       Remove all User created Image Manager Tabs


mari.ExtensionPack.view()


View related methods


  • screenshot_all_channels(self)


Screenshot all channels


  • setPaletteOrientationHorizontal(self)


Set the Preference Window Corner Dock Areas to a value


  • setPaletteOrientationVertical(self)


Set the Preference Window Corner Dock Areas to a value


  • setPaletteOrientationSplitRight(self)


       Set the Preference Window Corner Dock Areas to a value


  • setPaletteOrientationSplitLeft(self)


Set the Preference Window Corner Dock Areas to a value


  • setPaletteOrientationSplitTop(self)


Set the Preference Window Corner Dock Areas to a value


  • setPaletteOrientationSplitBottom(self)


Set the Preference Window Corner Dock Areas to a value


mari.ExtensionPack.shading()


Shading related methods


  • disableViewport(self,mode)


Turns the spinning wheel on in the Mari viewport to pause viewport updates


parameters:


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.




mari.ExtensionPack.symmetry()


Extension Pack Symmetry Bake Tool related methods


  • activateSymmetryX(self)


Activates Symmetry Bake in Mari X Axis


  • activateSymmetryY(self)


Activates Symmetry Bake in Mari Y Axis


  • activateSymmetryZ(self)


Activates Symmetry Bake in Mari Z Axis


  • setSymmetryMode(self)


Toggles between different Symmetry Modes


mari.ExtensionPack.bakePoints()


Bake Point related methods


  • bakeSelectedBakePoints(self)


Bakes all selected Bake Points in the Nodegraph


  • useBake(self,bool)


Sets the "use Bake" checkbox in selected bake points to on or off


parameters


bool (bool) = True/False


  • smartBakeHierarchy(self)


From the currently selected node upstream, refresh all bake points that are empty or out of date including in groups



mari.ExtensionPack.radioNodes()


Radio and Radio Transmitter Node related Methods


  • toggleRadioNodes(self,node,Force=False,ForceMode="")


       A Python API method to toggle a Radio node, so it doesn't require UI interaction like

       toggleSelectedRadioNodesConnection()

       By using Force and Force Mode "Show" or "Hide" you can show all or hide all


       Parameters:

       

       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



  • cycleRadioNodeConnections(self)


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


  • toggleSelectedRadioNodesConnection(self)


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


  • hideAllRadioNodeConnections(self)


Hides all Radio Connections in the current Graph Tab


  • showAllRadioNodeConnections(self)


Shows all Radio Connections in the current Graph Tab


  • jumpViewToRadioNodeConnection(self)


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


  • connectRadioNodeToTransmitter(self)


Launches the "Connect to Transmitter" dialog



  • createRadioNodePreference(self)


Adds Radio Node Preferences to the Mari Preferences


  • saveRadioNodePreference(self)


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


  • reconnectRadioNodeToTransmitter(self,radionode)


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.


Parameters:


radionode (mari.Node) : The Radio Node to sample.


  • connectRadioNodeCreationSignal(self)


Monitors if a created Node is a Radio Node


  • disconnectRadioNodeCreationSignal(self)


Turns off monitoring of Nodecreation in your project for Radio Nodes


mari.ExtensionPack.nodegraph()


Nodegraph related methods




  • toggleShowGrid(self)


Toggles the showing of the Grid in the Nodegraph


  • toggleGridSnap(self)


Toggles Grid Snap on and off



  • increaseGridHeight(self)


Increases the Height of grid cells in the Nodegraph


  • decreaseGridHeight(self)


Decrease the Height of grid cells in the Nodegraph


  • increaseGridWidth(self)


Increases the Width of grid cells in the Nodegraph


  • decreaseGridWidth(self)


Decrease the Width of grid cells in the Nodegraph


  • increaseGridLineWidth(self)


Increase the Width of Grid Lines in the Nodegraph


  • decreaseGridLineWidth(self)


Decrease the Width of Grid Lines in the Nodegraph


  • increaseGridLineOpacity(self)


Increase the Opacity of Grid Lines in the Nodegraph


  • decreaseGridLineOpacity(self)


Decrease the Opacity of Grid Lines in the Nodegraph


  • cycleNodegraphTabs(self)


Cycle through the open Nodegraph tabs



  • setNodegraphTabIndex(self,index)


Sets the active open Nodegraph Tab


Parameters


index (int)):                the index of the tab to open




  • clearNodegraph(self,currentGeoOnly=True)


Clears the Nodegraph of any nodes


Parameters


currentGeoOnly (bool):                if true ony the current geo will be evaluated



  • jumpToNodeOutput(self)


Jumps to the connected Node of the currently selected node output

If multiple Nodes are connected to the Output a dialog will show

 


  • jumpToNodeInput(self)


Jumps to the connected Node of the currently selected node input

If a node has multiple inputs a dialog will show



  • duplicateNodesWithConnections(self,offsetX=50,offsetY=50)


Duplicate selected Nodes while maintaining their connections


       Parameters:


       offset X / Y:                Specifies the offset of duplicated nodes in the Nodegraph



  • renameNodesUI(self)


Launch the "Multi Rename Nodes" Tool UI



  • selectAllNodes(self)


Select all Nodes in the current Graph Tab



  • deselectAllNodes(self)


deselect all Nodes in the current Graph Tab


  • deselectAllNodesExceptBackdrops(self)


deselect all Nodes except backdrops in the current Graph Tab


  • selectUpstreamNodes(self)


select all upstream nodes from the current node selection


  • selectUpstreamNodes_ignoreRadios(self)


select all upstream nodes from the current node selection but stop BEFORE a radio node


  • selectUpstreamNodes_stopAfterRadios(self)


select all upstream nodes from the current node selection but stop AFTER a radio node



  • selectCustomNodes(self)


select all non-mari nodes (custom nodes) and open a dialog with stats how many custom nodes are in your current graph


  • jumpToBookmark(self)


Launches the "Jump to Bookmark" UI


  • cycleBookmarkNodesForward(self)


Cycle forward through the available node graph bookmarks


  • cycleBookmarkNodesBackwards(self)


Cycle backwards through the available node graph bookmarks


  • smartRenameNodesUI(self)


Smart rename selected Nodes based on a some given rules


  • swapNodeType(self)


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



  • duplicate_nodeNetwork(self,geo,inputNode,inputNodeNodeGraph,StopAfterRadioNodes=True,RenameChannelIncremental=True,

RenameChannel=False,newChannelName,offsetX=50,offsetY=50)


Duplicates 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 channel() class.


Return:


mari.Node()


Parameters:


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 inputNodeis 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



  • copyNodeAttributes(self)


Save the currently selected Node Attributes to a File



  • setNodeAttributes(self)


Set the currently selected Node Attributes from a Clipboard File



  • getUpstreamNodes(self,graph,destination_node)


A replacement method for mari.Nodegraph.getUpstreamNodes() which does not work inside of Graph Groups and Materials


Return:


list:                                                A list comprised of mari.Node Objects


Parameters:


graph (mari.Nodegraph)                         The Graph to check against


destination_node (mari.Node)                 The Target Node

                       


  • autoUpdateBakeLookupOnExistingNodes(self)


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



mari.ExtensionPack.node()


Node related methods





  • nodeName(self,node)


Wrapper for differences in node name functions between Mari 4.x and Mari 4.8+.

Returns the Node Name


Parameters:


node (mari.Node):                               A Node Object (mari.Node)


Return:


String:                                     The Node Name



  • setNodeName(self,node,newName)


Wrapper for differences in node name functions between Mari 4.x and Mari 4.8+.

Sets the Node Name.


Parameters:


node (mari.Node):                       Node Object (mari.Node)

newName (String):                       New Node Name


Return:


None




  • findConnectedNodeOutput(self,graph,node_to_find,skipDots=False,findSpecificOutput=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


Parameters:


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 nodes (mari.Node)


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




  • channelsNodeBelongsTo(self,node_to_find,geo,excludeChannelLayer=True)


Returns a Dictionary of Channels [UUID:CHANNEL] that a given node belongs to


Parameters:


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                


Return:


{dict}:                                             Returns a Dictionary of Channels with key= ChannelUUID, value=ChannelObject




  • getNodePrettyName(self,node)


Returns the pretty Name of a Node, as it is listed in the UI


Parameters:


node:                               A Node Object (mari.Node)


Return:


String:                                     Returns a String




  • getNodeCategory(self,node)


Returns the Node Category of a Node, as it is listed in the UI


Parameters:


node:                               A Node Object (mari.Node)


Return:


String:                                    Returns a String




               

  • getNodePosition(self,graph,node)


Returns the Node Position as a list and a string


Parameters:


graph:                              The nodegraph the node belongs to (mari.NodeGraph)

node:                               A Node Object (mari.Node)


Return:


List:                                       Returns a list with the coordinates [x,y]





  • inputNode(self,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


Parameters:


node:                                      The node to check for connections on (mari.Node)

port:                                       The Input Port Name to check for connections (string)


Return:


List:                                      Returns a list with the pair [inputNode, outputPortOnInputNode]





  • setInputNode(self,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.


Parameters:


node:                               The node to connect something to (mari.Node)

port:                                       The Input Port Name to connect something to (string)

NodeToConnect:                        The Node to Connect to the Port

OutputPort:                        The OutputPort of the NodetoConnect to connect to


Return:


None



  • createNodeDuplicateAtPosition(self,graph,nodes,PositionList,removeOriginalNode=False)


Create duplicates of given nodes at a fixed position


Parameters:


       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


Return:


       List:                               Returns a list of nodes 

    



  • createNodeDuplicateWithOffset(self,graph,nodes,offsetList,removeOriginalNode=False)


Create duplicates of given nodes with a position offset


Parameters:


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


Return:


List:                                       Returns a list of nodes 



  • createNodeAtPosition(self,graph,nodeString,positionList)


Creates a new node at a specific position


Parameters:


graph:                                        The nodegraph the node belongs to (mari.NodeGraph)

nodes:                                         A list of Node Objects (list(mari.Node))

PositionList:                               A list of coordinates [x,y]


Return:


mari.Node():                                Returns a mari.Node


 

  • moveNodesToPosition(self,graph,nodes,positionList)


In Mari 4.7, it moves the given nodes to a specific position

Pre Mari 4.7, this actually creates new nodes


Parameters


graph                        The nodeGraph the nodes belong to

nodes                        A list of mari nodes

positionList                        A list of coordinates (x,y)


Return:


list                                Returns a list of mari.Nodes



  • getAllNodesConnectedToNode(self,targetNode,nodeGraph,groupContentMode='Include Group Node Content',returnBakePointUpstream=True,includeTargetNode=True,GraphGroup_TraverseConnectedOutputOnly=False,

IncludeGraphGroupNode=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. 



Parameters:


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_                                If 'True' and groupcontentmode = Inlcude Group Node Content, only group content will be evaluated that is connected

TraverseConnectedOutputOnly (bool)         to an output that is part of the topological sorting of the main input node given to the function

       

IncludeGraphGroup (bool)                        If True, Graph Group Nodes are included in the returned List. Otherwise only the Contents of the Graph Group Nodes are returned 

                                       (given that the groupContentMode parameter is to to 'Include Group Node Contents'


StartStream (string or None)                Optionally, you can provide a stream name to evaluate along. You should have GraphGroup_TraverseConnectedOutputOnly

                 turned on for this




Return:


(list):                                                 A list of nodes (mari.Node)




  • getAllNodesInProject(self,graph,node)


Returns a list of all nodes across all geos in your project

       

Return:


list:                        A list of mari nodes




  • smartRenameNode(self,graph,node)


Smart rename given Nodes, circumventing the Smart Rename UI

       

Parameters:


graph (mari.Nodegraph):                A mari Nodegraph obkect

node (mari.Node):                Node to rename





  • saveNodeAttributes(self,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


Parameters:


selectedNode (mari.Node)          A Mari Node




  • setNodeAttributes(self,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


Parameters:


selectedNode (mari.Node)         A Mari Node



  • alignNodes_VerticallyLeft(self,nodelist=[ ],defaultToSelection=True)


Align Nodes vertically left


Parameters:


nodelist (list)                                A list of Mari nodes

defaultToSelection (bool)                If true and nodelist is empty, the graph selection will be used


Return


None



  • alignNodes_VerticallyRight(self,nodelist=[ ],defaultToSelection=True)


Align Nodes vertically right


Parameters:


nodelist (list)                                A list of Mari nodes

defaultToSelection (bool)                If true and nodelist is empty, the graph selection will be used


Return


None



  • alignNodes_HorizontallyTop(self,nodelist=[ ],defaultToSelection=True)


Align Nodes horizontally top


Parameters:


nodelist (list)                                A list of Mari nodes

defaultToSelection (bool)                If true and nodelist is empty, the graph selection will be used


Return


None




  • alignNodes_HorizontallyBottom(self,nodelist=[ ],defaultToSelection=True)


Align Nodes horizontally bottom


Parameters:


nodelist (list)                                A list of Mari nodes

defaultToSelection (bool)                If true and nodelist is empty, the graph selection will be used


Return


None



  • distributeNodesHorizontally(self,nodelist=[ ],specificXDistance=1,backdropOffsetLimit=True)


Distribute Nodes horizontally with a given Distance between Nodes


Parameters:


nodelist (list)                                A list of Mari nodes .If 'None' is handed in, it uses the current selection

specificXDistance (float)                The distance between nodes

backdropOffsetLimit (bool)                If true, nodes will not be allowed to move outside of their parent backdrop


Return


bool                                Returns true if the node distance was artifically constrained by the backdropOffsetLimit




  • distributeNodesVertically(self,nodelist=[ ],specificXDistance=1,backdropOffsetLimit=True)


Distribute Nodes vertically  with a given Distance between Nodes


Parameters:


nodelist (list)                                A list of Mari nodes .If 'None' is handed in, it uses the current selection

specificXDistance (float)                The distance between nodes

backdropOffsetLimit (bool)                If true, nodes will not be allowed to move outside of their parent backdrop


Return


bool                                Returns true if the node distance was artifically constrained by the backdropOffsetLimit



  • distributeNodeUI(self,nodelist=[ ])


Opens the distribute Node UI.


Return


None


mari.ExtensionPack.nodeUtilities()




  • createSmartMergeNode(self)


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



  • createSmartHeightBlend(self)


Creaes a Height Blend Node and hooks it up to the selection


  • setMergeNodeColorspace_PreferenceChanged(self)


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


  • setMergeNodeColorspace_createPreference(self)


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


  • setMergeNodeColorSpaceToDisabled(sel,node)


Sets the currently selected merge node "Color Space Enabled" Setting to Disabled


Parameters:


Node                a mari node



  • setMergeNodeColorspace(self,node)


Disables the currently selected merge node 'Color Space Enabled' Setting if the Preference to do so it turned on


Parameters:


Node                a mari node


  • lockBackdropColorsInProject(self)


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


mari.ExtensionPack.gizmo()


  • lauchMaskPresetUI(self,nodelist,ReplaceExisting=False,ForceConnectionDialog=False,parent=None)


Launches the Mask Preset Setup UI scanning the nodelist for ports that can be setup


       Parameters:


               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




  • launchMaskPresetUI_RefreshMode(self,nodelist,parent=None)


Launches the Mask Preset Setup UI scanning the nodelist for ports that can be setup.

       In the refresh mode all ports are considered even if they already have something attached


       Parameters:


       nodelist (list)                                a list [] of mari.Node Objects



  • launchMaskPresetUI_BakingMode(self,parent=None)


Launches the Mask Preset Setup UI

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



  • launchMaskPresetUI_SelectedNodes(self,ReplaceExisting=False,ForceConnectionDialog=False,parent=None)


       Launches the Mask Preset Setup UI with the current Node Selection as processing base



       Parameters:



       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




  • launchMaskPresetUIPreferences(self)


Launches the Mask Preset Setup Preferences UI



mari.ExtensionPack.maskShelf()


  • launchSmartMaskShelf(self,mode)


Opens the Smart Mask shelf


Parameters


mode (str)                'Layer' or 'Nodegraph'



  • closeSmartMaskShelfInstance(self)


Closes any Smart Mask Shelf running in the Background



  • resetSmartMaskShelfPositionAndSize(self)


Closes any currently active instance of the Smart Mask Shelf

then resets the size and position to default



  • createMaskShelfPreferences(self)


Creates Preferences inside the Mari Preferences to unlock the Default Shelfs




  • saveMaskShelfPreference(self)


Saves Mask Shelf Specific Preferences to unlock the Default Shelfs



mari.ExtensionPack.materialIngest()


  • addEPNodes_to_MaterialIngester(self)


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


  • addEPPresets_to_MaterialIngester(self)


Adds Material Preset to the Material Template History Dropdown


  • launchMaterialIngester(self)


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


  • ingestImageManagerImagesIntoLayer(self)


Ingests the currently selected image manager images into the active layer


  • ingestImageManagerImagesIntoNode(self)


Ingests the currently selected image manager images into the active node


mari.ExtensionPack.shelf()


  • deleteAllUserMariShelves(self)


Deletes all custom Shelf Tabs inside the Standard Mari Shelf System


  • createShelfFromFolder_UI(self)


Launches a UI to create Shelves from Folders


  • createAdditionalShelfUIElements(self)


Adds a new button to the shelf palette to launch the CreateShelfFromFolder UI



mari.ExtensionPack.dragAndDrop()


Registers Drag And Drop Callbacks to the Mari UI


  • register_DragAndDrop_Callbacks(self)


Registers Extension Pack Callbacks for Drag and Drop Events


  • add_DragAndDrop_Callback_Preferences(self)


Adds Preferences to the Mari/Misc/ Preferences Tab to turn Callbacks on and off


  • save_DragAndDrop_Callback_Preferences(self)


Saves Callback Preferences States from the  Mari Misc Preferences Tab to the config file


  • load_DragAndDrop_Callback_Preferences(self)


Loads Settings from the Mari Config File to set the state of the callback preferences under the Mari/Misc Tab in the Preferences


  • register_MaskShelf_DragAndDrop_Callbacks(self)


Registers Drag and Drop Events for the Extension Pack Mask Shelf, so it works with both Layerstack and Nodegraphe



mari.ExtensionPack.toolbar()


Adds Toolbar Options to existing Mari Toolbars


  • initialize_TransformPaintToolbar(self)


Adds Extension Pack Options to the Transform Paint Toolbar


  • initialize_SyncedBufferDepth(self)


Turns on Buffer BitDepth Syncing on a new session if it was active on previous session close

Buffer BitDepth Syncing will constantly switch the paint buffer bit depth to the

bit depth of the currently selected channel


  • initialize_transformObjectToolbar(self)


Adds Extension Pack Options to the Transform Object Toolbar


  • initialize_PaintThroughToolbar(self)


Adds Extension Pack Options to the Paint Through Toolbar


  • createToolsToolbarPreference(self)


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


  • saveToolsToolbarPreference(self)


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


  • changeToolsToolbarPreference(self)


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



  • flipPaintThroughImage_Horizontally(self)


Flips a Paint Through Image along X



  • flipPaintThroughImage_Vertically(self)


Flips a Paint Through Image along Y



  • initialize_Locator(self)


        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

mari.ExtensionPack.text()


Extension Pack Text Tool


  • textGenerator(self)


Launch the EP Text Generator


mari.ExtensionPack.project()


Project related tools such as cleanup tools        


  • removeAllSnapshots(self)


Remove all Layer and Channel Snapshots


  • cleanUpData(self)


Run a Garbage Collect


  • openCurrentProjectFolder(self)


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


  • getCurrentProjectFolder(self)


Convenience Method to retrieve the current Project Dir.

Always returns the first Path in the Dir List, to avoid issues if there are multiple cache directories.


  • saveAdditionalProjectSettings(self)


        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


  • saveAdditionalProjectSettings(self)


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

mari.ExtensionPack.archive()


Project archiving related tools


  • markProjectAsArchived(self,UUID)


Adds information about Archive Status and Archive Date to the Project Tooltip

and marks the Project Screenshot with a visual indicator



  • archiveUpToDate(self,cur_project,outOfDate=False)


Sets the ArchiveUpToDate Metadata on a Project


Parameters:


cur_project (mari.project):                         a mari.Project

outOfDate (bool):                         Sets the Metadata to True of False



mari.ExtensionPack.projectors()


Projector related tools


  • toggleCameraType(self)


toggles the selected projector between Orthographic and Perspective


mari.ExtensionPack.dev()


A number of tools and dialogs to easily find classes, methods, actions and menu paths


  • action_finder(self)


Launches Dialog to search through Mari Actions


  • menu_path_finder(self)


Launches Dialog to search through Mari Menu Paths


  • class_method_finder(self)


Launches Dialog to search through available classes and methods


  • node_path_findder(self)


Launhes Dialog to search through available node paths


  • mimeTypeInspector(self)


Launches a dialog accepting Drag and Drop Events, helping you to see the returned Mime Type of dragging and dropping an object type




mari.ExtensionPack.help()


Access to Help and Tutorials


  • createSmartMaskProject(self)


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


  • open_online_help(self)


'Launch Extension Pack Online Help


  • open_tutorials(self)


Launch Youtube Extension Pack Tutorials



  • open_releaseNotes(self)


Launch the Release Notes




  • send_bug_report(self)


Opens an email to file a bug report



  • onlineHelpURL(self)


The URL of the Online Help



  • releaseNotesURL(self)


The URL of the Release Notes


  • youtubeURL(self)


       The URL of the Youtube Tutorial Playlist


  • email(self)


       The Email Address to contact the Developer


  • facebook(self)


       The URL of the Extension Pack Facebook Page


  • tdrTutorial(self)


       The URL to the Tutorial to configure your TDR Settings


  • resourceMovingTutorial(self)


       The URL to the Tutorial showing you how to move Extension pack Resources


  • onlineHelpBasePath(self)


       Returns the Base URL of the Online Help


Return:


string                                                     The Base URL of Extension pack Online Help


  • open_MariUserSettingsFolder(self)


       Opens the Mari User Settings Folder



  • contactFoundrySupport(self)


       Opens a web browser to the Foundry Support Portal


  • open_LogFile(self)


       Opens the Mari Log File



mari.ExtensionPack.version()


Methods to determine Extension Pack Versions


  • recommendedEPResourceVersion(self)


Returns the Resource Version that should be associated to this installed Extension pack Version


  • checkResourceVersion(self)


Returns the Resource Version currently installed



  • check_version(self)


Check if a new version exists


  • versionAsJson(self,jsonfile=None)


returns Path to Json file containing Major, Minor, Patch and PrettyVersionName


  • majorVersion(self)


returns the Major Version


  • minorVersion(self)


returns the Minor Version


  • patchVersion(self)


returns the patch Version


  • buildVersion(self)


returns the build Version



  • HIDStatus(self)


returns a complete check from the version compatibility system


  • versionPrettyName(self)


returns the Pretty Version Name


  • version(self)


returns the full version consisting of major,minor and patch


  • productID(self)


returns the product ID


  • productPath(self)


returns the product Path


  • mari45OrAbove(self,invert=False)


Returns true if Mari 4.5 or higher. Can be inverted with invert parameter



  • mari46OrAbove(self,invert=False)


Returns true if Mari 4.6 or higher. Can be inverted with invert parameter


  • mari46v4OrAbove(self,invert=False)


Returns true if Mari 4.6v4 or higher. Can be inverted with invert parameter



  • mari47OrAbove(self,invert=False)


Returns true if Mari 4.7 or higher. Can be inverted with invert parameter



  • mari470v2OrAbove(self,invert=False)


Returns true if Mari 4.7v2 or higher. Can be inverted with invert parameter


mari.ExtensionPack.content()


  • showTextureInstallDialog(self)


Displays a Dialog to ask the User if to install Shelves - only Mari 4.5 and above


  • canTextureInstallDialogBeShown(self)


A Method called on Mari Startup to check if the user opted out of Installation of Shelves


  • checkIfShelvesAreUpToDate(self)


Compares if EP Shelf Content is the latest and installs any new ones


  • installMaterialPresets(self)


Installs standard empty material presets to a new shelf


  • rendermanForMariInstalled(self)


Check if Renderman for Mari is installed


  • saveMaterialTemplatePreference(self)


Save the Material Template Preferences to the Config file



  • loadMaterialTemplatePreference(self)


load the Material Template Preferences from the Config file



  • loadMaterialTemplatePreferenceFromEnvVar(self)


load the material template preferences from Env Variables


  • addMaterialTemplatePreferences(self)


Add Template Preferences to the Mari Preferences


mari.ExtensionPack.utils()


Various Python Helper Methods



  • findTriggerAction(self,actiopath)


Given a Mari Action path, this command will find and tirgger the action


  • nodeCreatedConnect(self)


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



  • nodeCreatedDisconnect(self)


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


  • nodeMetaDataEditor(self)


Launches a editor to edit node metadata



  • getImageAttributeNames(self)


Returns a list of Image Attributes used in Mari Nodes.

Useful if you need to check for Images on Nodes


  • setNodegraphGridDefaults(self)


Sets new Default Color for the Nodegraph Grid



  • getMariSettingsFolder(self)


Returns the Location of the Mari config file



  • TDRCheck(self)


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




  • findActiveLayerSelection(self,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


Parameters:


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 dialog messages pop up if nothing is found


Return:


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




  • findNodeGraphContext(self)


this is a method to find the active nodegraph based on the open tab

Hopefully in the future Mari will provide this via its build in python

at which point the method will use that method to keep backwards compatibility


Return: 


mari.Nodegraph



  • findNodeGraphTabWidget(self,returnNoneIfRootGraph=False)


this is a method to find the active nodegraph Tab widget


Parameters:

       returnNoneIfRootGraph (bool):          If true the return is always None if the active tab widget is the root graph


Return: 

       TabbedWidget



  • findNodeAbstractGraphicsView(self)


Finds and returns the QGraphicsView of the Nodegraph Palette


  • recursiveNodeList(self,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


Parameters:


node_list (list):                          A list of nodes (mari.Node)


Return:


(list):                                     A list of nodes (mari.Node)





  • recursiveGroupNodeList(self,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


Parameters:


node_list (list):                          A list of nodes (mari.Node)


Return:


(list):                                     A list of group nodes (mari.GraphGroup)




  • getSelectedNodesOnCurrentGeoRootGraph(self,FirstOnly=False)


A quick and easy way to get the selected Nodes from the current geo root graph


Parameters:


FirstOnly (bool):                           If "True" only the first found selected node willl be returned, otherwise all selected ones


Return:


(list):                                     A list of nodes (mari.Node)




  • mariMainWindowObject(self)


This returns the Mari Main Window Object or None if not found


 


  • setNodegraphContext(self)


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