Update
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
//Switch the camera of current actived 3d view to persp camera.
|
||||
MGP_SetActiveViewCamera "persp"; //change the camera string to switch to that camera.
|
||||
@@ -0,0 +1,4 @@
|
||||
//get attribute float array value. Only works when you query attributes like .translate, .rotate, .scale, etc.
|
||||
//Input the objectName.attribute without its namespace, the namespace will be replaced by the namespace of picker:
|
||||
//Error will occur if there is no such object or attribute.
|
||||
float $theAttVs[] = `MGP_GetAttributeFloatValueArray_ViaPickerNamespace "objNameWithoutNamespace.attr"`;
|
||||
@@ -0,0 +1,4 @@
|
||||
//get a attribute float value.
|
||||
//Input the objectName.attribute without its namespace, the namespace will be replaced by the namespace of picker:
|
||||
//Error will occur if there is no such object or attribute.
|
||||
float $theAttV = `MGP_GetAttributeFloatValue_ViaPickerNamespace "objNameWithoutNamespace.attr"`;
|
||||
@@ -0,0 +1,5 @@
|
||||
//Get currently attribute button's maya attribute:
|
||||
//if the attribute is not linked to a maya attribute, this will return empty string.
|
||||
//the return attribute string is of format: [ns:]nodeName.attributeName.
|
||||
//0 for no namespace, 1 for has namespace.
|
||||
string $objDotAttr = `MGP_GetCurrentAttributeButton_Attribute 0`;
|
||||
@@ -0,0 +1 @@
|
||||
string $currentPickerDir = `MGP_GetCurrentPickerDirectory`; //get the dierctory path of current picker file.
|
||||
@@ -0,0 +1 @@
|
||||
string $currentPickerFileOrNode = `MGP_GetCurrentPickerFileOrNode`; //get the full path of current picker file or the picker node name.
|
||||
@@ -0,0 +1,4 @@
|
||||
//get current mouse interactiving picker item name:
|
||||
//When you want to change the item itself within its script type property, such as color or position, use this to query its id.
|
||||
string $currentPickerItem = `MGP_GetCurrentInteractiveItem`;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
string $currentPickerNamespace = `MGP_GetCurrentPickerNamespace`; //get the namespace of current picker file/node.
|
||||
@@ -0,0 +1 @@
|
||||
MGP_CancelIsolation; //Cancel the isolation for currently activated model view.
|
||||
@@ -0,0 +1 @@
|
||||
MGP_IsolateSelectedObjects; //Isolat selected objects for currently activated model view.
|
||||
@@ -0,0 +1 @@
|
||||
MGP_IsolateSelectedRig; //Isolate selected objects' whole rigs for currently activated model view.
|
||||
@@ -0,0 +1 @@
|
||||
float $fillColor[] = `MGPickerItem -q -fillColor ""`; //To-Do: input the button id string to get the fill color of it.
|
||||
@@ -0,0 +1 @@
|
||||
string $label = `MGPickerItem -q -label ""`; //To-Do: input the button id string to get the label of it.
|
||||
@@ -0,0 +1 @@
|
||||
float $labelColor[] = `MGPickerItem -q -labelColor ""`; //To-Do: input the button id string to get the label color of it.
|
||||
@@ -0,0 +1 @@
|
||||
float $opacity = `MGPickerItem -q -opacity ""`; //To-Do: input the button id string to get the opacity of it.
|
||||
@@ -0,0 +1,3 @@
|
||||
//To-Do: input the button id string to get the 2D position of it:
|
||||
int $x = `MGPickerItem -q -x ""`;
|
||||
int $y = `MGPickerItem -q -y ""`;
|
||||
@@ -0,0 +1,3 @@
|
||||
//To-Do: input the button id string to get the size of it:
|
||||
int $width = `MGPickerItem -q -width ""`;
|
||||
int $height = `MGPickerItem -q -height ""`;
|
||||
@@ -0,0 +1 @@
|
||||
float $valueColor[] = `MGPickerItem -q -valueColor ""`; //To-Do: input the button id string to get the value color of it.
|
||||
@@ -0,0 +1 @@
|
||||
int $visible = `MGPickerItem -q -visible ""`; //To-Do: input the button id string to get the visibility of it.
|
||||
@@ -0,0 +1,15 @@
|
||||
//To-Do: hardcode this button id. The id won't not changed once it is created.
|
||||
string $pickerButtonID = "";
|
||||
//below the full edit flags are listed, feel free to remove unwanted lines.
|
||||
MGPickerItem -e //with/without -e is the same;
|
||||
-visible 1 //set the visibility of the button;
|
||||
-label "" //set the label of the button,repace the string with your desired label string;
|
||||
-x 0 //set the x position of your button;
|
||||
-y 0 //set the y position of your button;
|
||||
-w 20 //set the width of your button;
|
||||
-h 20 //set the height of your button;
|
||||
-fillColor 1 0 0 1 //set the fill color of your button;
|
||||
-labelColor 0 0 0 1 //set the label color of your button;
|
||||
-valueColor 1 1 1 1 //set the value color of your button. only make sense when it is a attribute button;
|
||||
-opacity 1 //set the opacity of your button, you could also set this through the last parameter of "-fillColor" flag;
|
||||
$pickerButtonID;
|
||||
@@ -0,0 +1 @@
|
||||
MG_SetKeyframeNonDefaultChannels; //Set keyframs at current frame, only on those channels are of non-default values.
|
||||
@@ -0,0 +1,3 @@
|
||||
//Popup a prompt dialog, which user could input a frame count to keyframe object at this each frame count.
|
||||
//arg: 0 for each keytick, 1 for each certain frames.
|
||||
MGP_SetKeyframeEachKeyOrGap 1;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Set keyframe each keytick via time range control.The ensure each selected object all have keys at same frames:
|
||||
//arg: 0 for each keytick, 1 for each certain frames.
|
||||
MGP_SetKeyframeEachKeyOrGap 0;
|
||||
@@ -0,0 +1 @@
|
||||
MGP_SetKeyframeForOnlyKeyframed; //Set keyframe only if the attribute is already keyframed.
|
||||
@@ -0,0 +1,3 @@
|
||||
//Reactivate the model view, so animators could have access to the hotkeys features of Maya, such as set keys,etc.
|
||||
//but ususually you don't need to do so, cos MG-Picker in animator interactive mode does so automatically after each mouse left mouse button clicking.
|
||||
MGP_ReactiveModelViewport;
|
||||
@@ -0,0 +1 @@
|
||||
MGP_MirrorSelection 1; //Add Mirrored objects into selection via current picker panel's mirror relationship.
|
||||
@@ -0,0 +1,3 @@
|
||||
//Add all selectButton & Slider members of current picker panel to scene selection.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPanelAllSelectButtons 1;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Add all selectButton & Slider members of current picker to scene selection:
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPickerAllSelectButtons 1;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Deselect all selectButton & Slider members of current picker panel from scene selection.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPanelAllSelectButtons 2;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Deselect all selectButton & Slider members of current picker from scene selection.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPickerAllSelectButtons 2;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Toggle all selectButton & Slider members selection states of current picker panel.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPanelAllSelectButtons 3;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Toggle all selectButton & Slider members selection states of current picker.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPickerAllSelectButtons 3;
|
||||
@@ -0,0 +1 @@
|
||||
MGP_MirrorSelection 0; //Mirror selection via current picker panel's mirror relationship.
|
||||
@@ -0,0 +1,3 @@
|
||||
//Select all selectButton & Slider members of current picker panel.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPanelAllSelectButtons 0;
|
||||
@@ -0,0 +1,4 @@
|
||||
//Select all selectButton & Slider members of the picker panel with the panel index.
|
||||
//The first int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
//the second int arg stands for the target picker panel index.
|
||||
MGP_EvalPanelAllSelectButtons_viaPanelIndex 0 0;
|
||||
@@ -0,0 +1,3 @@
|
||||
//Select all selectButton & Slider members of current picker.
|
||||
//The int arg stands for the selection mode, 0 for replace selection,1 for add selection, 2 for remove selection, 3 for invert selection.
|
||||
MGP_EvalPickerAllSelectButtons 0;
|
||||
@@ -0,0 +1,3 @@
|
||||
//set a attribute with a value. Input the objectName.attribute without its namespace, the namespace will be replaced by the namespace of picker:
|
||||
//Error will occur if there is no such object or attribute.
|
||||
MGP_SetAttributeViaPickerNamespace "objNameWithoutNamespace.attr" 0;
|
||||
@@ -0,0 +1 @@
|
||||
MGP_SetCurrentPickerNamespace ""; //To-Do: replace the "" with your namespace to set current picker namespace.
|
||||
@@ -0,0 +1,2 @@
|
||||
//pop up set namespace ui:
|
||||
MGP_SetCurrentPickerNamespace_WithUI;
|
||||
@@ -0,0 +1 @@
|
||||
MGP_GoToPanel 0; //To-Do: replace the int with the target panel index, 0 is usually the first panel.
|
||||
Reference in New Issue
Block a user