Home  Previous Next

command (MEL/Python)

MGPickerLicence v2_transparent

Go to: Synopsis. MEL examples. Python examples.

Synopsis

MGPickerLicence ([floating=[boolean]],[nodeLocked=[string]], [state=string])

 

MGPickerLicence is NOT undoable, queryable, and editable.

This is a util command to query and edit the license state of MG-Picker Studio.

 

Long name (short name)

Argument types

Properties

-floating(-fl) v2_transparent

boolean

createqueryedit

 

In query mode, this returns information in a string array:

   [0] the path to the directory that contains the connector executable.

   [1] the floating license state, "-1" means the connection was tried but failed, "1" means a floating license is connected, "0" means all the other states, e.g. it is using a node-locked license, etc.

   [2] the state of whether we auto-connect to floating license on program launch.

 

In create/edit mode, the argument True means starting the floating license connection process, and False means disconnecting and logging out from the current floating license.

-nodeLocked(-nl) v2_transparent

string

createqueryedit


In query mode, this returns information in a string array:

   [0] the user request-code of this machine.

   [1] the registration code, an empty string means not registered with node-locked.

   [2] the major.minor version of the registry in string form. e.g. "2.3" means the registration code used was for version 2.3.

        The main version matters the most as that usually means some new features may be locked if it was registered for an old version.

        You can use cmds.MGPicker(q=True, version=True) to query the actual program version string (major.minor.path).

 

In create/edit mode, you specify the registration code for the registry. Using an empty string means unregistering the node-locked license.

-state(-st) v2_transparent

 

query


The state of license:

   0: No registered or logged in.

   1: Registered with a node-locked license but it is for an old version.

   2: Registered with node-locked license.

   3: Is logged in to a floating license.

 


create Flag can appear in Create mode of command

edit Flag can appear in Edit mode of command

query Flag can appear in Query mode of command

multiuse Flag can be used more than once in a command.

MEL examples

print("Query license state: " + `MGPickerLicence -q -state` + "\n");
print("Node-Locked license state: " + stringArrayToString(`MGPickerLicence -q -nodeLocked`, ", ") + "\n");
print("Floating license state: " + stringArrayToString(`MGPickerLicence -q -floating`, ", "));

Python examples

from maya import cmds

print("Query license state:", cmds.MGPickerLicence(q=True, state=True))
print("Node-Locked state:", cmds.MGPickerLicence(q=True, nodeLocked=True))
print("Floating License state:", cmds.MGPickerLicence(q=True, floating=True))

 

Home Previous Next