dim CPS1,CPS2,CPS3,tmpPS,tmpPose,tmpPMC,tmpRP,tmpDP,selected,Axis,str,update SelectAllUsingFilter "object", siCheckComponentVisibility set selected = getvalue("SelectionList") update = false for each oSel in selected if not(typename(Dictionary.getobject(oSel & ".PoseMixer_Client.custom",false)) = "Nothing") then update = true AddProp "Custom_parameter_list",oSel , , "tmpPoseMixer_Client",tmpPMC SIAddCustomParameter tmpPMC, "Active", siBool, false, , , , 5 AddProp "Custom_parameter_list", tmpPMC , , "ResultPose",tmpRP SIAddCustomParameter tmpRP, "sclx", siDouble, getvalue(oSel&".kine.local.sclx"), -1000000, 1000000, , 5, -10, 10 SIAddCustomParameter tmpRP, "scly", siDouble, getvalue(oSel&".kine.local.scly"), -1000000, 1000000, , 5, -10, 10 SIAddCustomParameter tmpRP, "sclz", siDouble, getvalue(oSel&".kine.local.sclz"), -1000000, 1000000, , 5, -10, 10 SIAddCustomParameter tmpRP, "rotx", siDouble, getvalue(oSel&".kine.local.rotx"), -1000000, 1000000, , 5, -360, 360 SIAddCustomParameter tmpRP, "roty", siDouble, getvalue(oSel&".kine.local.roty"), -1000000, 1000000, , 5, -360, 360 SIAddCustomParameter tmpRP, "rotz", siDouble, getvalue(oSel&".kine.local.rotz"), -1000000, 1000000, , 5, -360, 360 SIAddCustomParameter tmpRP, "posx", siDouble, getvalue(oSel&".kine.local.posx"), -1000000, 1000000, , 5, -100, 100 SIAddCustomParameter tmpRP, "posy", siDouble, getvalue(oSel&".kine.local.posy"), -1000000, 1000000, , 5, -100, 100 SIAddCustomParameter tmpRP, "posz", siDouble, getvalue(oSel&".kine.local.posz"), -1000000, 1000000, , 5, -100, 100 AddProp "Custom_parameter_list", tmpPMC , , "DefaultPose",tmpDP SIAddCustomParameter tmpDP, "sclx", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.sclx"), -1000000, 1000000, , 4, -10, 10 SIAddCustomParameter tmpDP, "scly", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.scly"), -1000000, 1000000, , 4, -10, 10 SIAddCustomParameter tmpDP, "sclz", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.sclz"), -1000000, 1000000, , 4, -10, 10 SIAddCustomParameter tmpDP, "rotx", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.rotx"), -1000000, 1000000, , 4, -360, 360 SIAddCustomParameter tmpDP, "roty", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.roty"), -1000000, 1000000, , 4, -360, 360 SIAddCustomParameter tmpDP, "rotz", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.rotz"), -1000000, 1000000, , 4, -360, 360 SIAddCustomParameter tmpDP, "posx", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.posx"), -1000000, 1000000, , 4, -100, 100 SIAddCustomParameter tmpDP, "posy", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.posy"), -1000000, 1000000, , 4, -100, 100 SIAddCustomParameter tmpDP, "posz", siDouble, getvalue(oSel&".PoseMixer_Client.DefaultPose.posz"), -1000000, 1000000, , 4, -100, 100 SetExpr oSel & ".kine.local.sclx", tmpRP & ".sclx" SetExpr oSel & ".kine.local.scly", tmpRP & ".scly" SetExpr oSel & ".kine.local.sclz", tmpRP & ".sclz" SetExpr oSel & ".kine.local.rotx", tmpRP & ".rotx" SetExpr oSel & ".kine.local.roty", tmpRP & ".roty" SetExpr oSel & ".kine.local.rotz", tmpRP & ".rotz" SetExpr oSel & ".kine.local.posx", tmpRP & ".posx" SetExpr oSel & ".kine.local.posy", tmpRP & ".posy" SetExpr oSel & ".kine.local.posz", tmpRP & ".posz" deleteobj oSel & ".PoseMixer_Client.ResultPose" deleteobj oSel & ".PoseMixer_Client.DefaultPose" deleteobj oSel & ".PoseMixer_Client" SetValue tmpPMC & ".Name", "PoseMixer_Client" SetValue tmpRP & ".Name", "ResultPose" SetValue tmpDP & ".Name", "DefaultPose" AddProp "Custom_parameter_list",oSel , , "tmpPoseStore",tmpPS for each oPose in Dictionary.getobject(oSel & ".PoseStore.Custom",false).nestedObjects AddProp "Custom_parameter_list", tmpPS , , oPose.name,tmpPose for each oParam in oPose.nestedObjects SIAddCustomParameter tmpPose, oParam.name, siDouble,getvalue(oParam), -1000000, 1000000, , oParam.Capabilities,-100,100 next CopyAnimation oPose & ".weight" PasteAnimation tmpPose & ".weight" deleteobj oPose next deleteobj oSel & ".PoseStore" SetValue tmpPS & ".Name", "PoseStore" for i = 0 to 8 select case i case 0 Axis = "sclx" case 1 Axis = "scly" case 2 Axis = "sclz" case 3 Axis = "rotx" case 4 Axis = "roty" case 5 Axis = "rotz" case 6 Axis = "posx" case 7 Axis = "posy" case 8 Axis = "posz" end select str = oSel&".PoseMixer_Client.DefaultPose."&Axis& " + ( " for each oParam in Dictionary.getobject(oSel & ".PoseStore",false).NestedObjects str = str & "(" & oParam & "." & Axis & " * " & oParam & ".weight) + " next ' for each oParam in Dictionary.getobject(oSel & ".PoseStore",false).NestedObjects(0).NestedObjects ' str = str & "(" & oParam & "." & Axis & " * " & oParam & ".weight) + " ' next str = str & " 0 )" SetExpr oSel & ".PoseMixer_Client.ResultPose." & Axis, str next SetExpr oSel & ".kine.local.scl.sclx.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.scl.scly.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.scl.sclz.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.ori.euler.rotx.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.ori.euler.roty.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.ori.euler.rotz.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.pos.posx.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.pos.posy.Expression.Active", oSel & ".PoseMixer_Client.Active" SetExpr oSel & ".kine.local.pos.posz.Expression.Active", oSel & ".PoseMixer_Client.Active" str=_ "function PoseMixerTool_Active_Update(ctx,out,InResultPose,InPoseStore,InPosx)" & vbcrlf & _ "dim parent" & vbcrlf & _ "set parent = Dictionary.getobject(InPoseStore.value,false).parent" & vbcrlf & _ "if parent.selected=true then" & vbcrlf & _ "out.value = false" & vbcrlf & _ "else" & vbcrlf & _ "out.value = true" & vbcrlf & _ "end if" & vbcrlf & _ "end function" AddScriptedOp oSel & ".PoseMixer_Client.Active",str,oSel & ".PoseMixer_Client.ResultPose," & oSel & ".PoseStore," & oSel & ".kine.local.posx" ,"PoseMixerTool_Active","VBScript" logmessage oSel & " のPoseMixer関連のパラメーターの仕様をXSI6以降用に変更しました" end if next if update then logmessage "この操作はアンドゥしないでください。シーンをセーブしてロードしなおすことをお勧めします。",4