![]() ![]() ![]() |
▪Converters are a MEL script that converts other types of picker nodes/files into MG-Picker files/nodes. The converters utilize the MEL API commands provided by MG-Picker Studio heavily, especially these 3 commands: MGPicker, MGPickerItem, MGPickerLink. Refer to the command reference for those commands to know more about these commands.
▪Where should these converter scripts be placed? For factory default converters, they are in the Maya's user script folder/ MG-PickerStudio/MGPicker_Program/Converters, the factory default converters are maintained by the developer of MG-Picker Studio so better keep them intact. For user converters, please put them here: Maya's user script folder/MG-PickerStudio/MGPicker_UserConfig/Converters.
▪To learn how to write a converter, check out the existing converters from the factory default converters folder: Converter_abxPicker.mel, Converter_nickPicker.mel
▪Say your converter is for the otherPicker nodes, and the converter file is called Converter_otherPicker.mel, the interfaces that a converter mel should implement are: //other picker node converter API: global proc int Converter_otherPicker_autoReadNode(); //return 0~1 value, indicate if MG-Picker should invoke this converter to autoload your in-scene picker node. global proc string Converter_otherPicker_nodeType(); //return string value, the type string of picker node. global proc int Converter_otherPicker_isPickerNode(string $node); //return 0~1 value, indicating the node is of the picker node. global proc string Converter_otherPicker_getNamespace(string $node); //return the namespace from a picker node. //The proc is used in find&Load feature of MG-Picker studio. global proc string[] Converter_otherPicker_nodeLister(); //list all the picker nodes in the scene. global proc int Converter_otherPicker_readNode(string $node); //the actual reader for each picker node.
//other picker file converter API: global proc int Converter_otherPicker_isPickerFile(string $fileFullPath); //Return 1 if the file is the picker file, 0 if not. global proc int Converter_otherPicker_readFile(string $fileFullPath); //the actual reader for each picker file.
|
![]() ![]() ![]() |