37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
|
//******************************************************************************
|
|||
|
//
|
|||
|
// <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: <20><>Ϫʱ<CFAA><CAB1><EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
// <20><>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>: q.100@qq.com
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 2023/08/08
|
|||
|
//
|
|||
|
//******************************************************************************
|
|||
|
|
|||
|
global proc SGCreateMenuItem ()
|
|||
|
{
|
|||
|
string $icon = "unreal.png";
|
|||
|
string $logo = "logo.png";
|
|||
|
menu -to on -label "SuperRigging" -parent MayaWindow SG_MENU ;
|
|||
|
menuItem -label "Super Rigging" -i $logo -command "EXECUTE_SUPER_RIGGING;" SG_Editor ;
|
|||
|
menuItem -label "Pose Wrangler" -i $icon -command "EXECUTE_POSE_WRANGLER;" SG_PoseWrangler ;
|
|||
|
}
|
|||
|
|
|||
|
global proc EXECUTE_SUPER_RIGGING ()
|
|||
|
{
|
|||
|
string $version = `about -v`;
|
|||
|
string $plugins[] = {("SuperRiggingEditor" + $version), ("MayaUE4RBFPlugin" + $version), "embeddedRL4", "MayaUERBFPlugin", "mayaHIK"};
|
|||
|
for ( $i=0; $i < size($plugins); $i++ ){
|
|||
|
if(!`pluginInfo -q -l $plugins[$i]`){
|
|||
|
catchQuiet (`loadPlugin -qt $plugins[$i]`);
|
|||
|
catchQuiet (`pluginInfo -edit -autoload true $plugins[$i]`);
|
|||
|
}
|
|||
|
}
|
|||
|
eval("SuperRiggingWindow;");
|
|||
|
}
|
|||
|
|
|||
|
global proc EXECUTE_POSE_WRANGLER ()
|
|||
|
{
|
|||
|
string $pythonCmd;
|
|||
|
$pythonCmd += "from epic_pose_wrangler import main\n";
|
|||
|
$pythonCmd += "pose_wrangler_instance = main.PoseWrangler()";
|
|||
|
python $pythonCmd;
|
|||
|
}
|