def gear_GuideTools_Execute(): prop = xsi.ActiveSceneRoot.Properties("Guide_Tools") if not prop: prop = xsi.ActiveSceneRoot.AddProperty("gear_GuideToolsUI", False, "Guide_Tools") dis.inspect(prop, 340, 700, 125, 200)
def gear_OpenRenamer_Execute(): if xsi.ActiveSceneRoot.Properties("gear_Renamer"): xsi.DeleteObj(xsi.ActiveSceneRoot.Properties("gear_Renamer")) prop = xsi.ActiveSceneRoot.AddProperty("gear_Renamer", False, "gear_Renamer") dis.inspect(prop, 550, 450)
def gear_OpenSynoptic_Execute(): if xsi.ActiveSceneRoot.Properties("gear_Synoptic"): prop = xsi.ActiveSceneRoot.Properties("gear_Synoptic") else: prop = xsi.ActiveSceneRoot.AddProperty("gear_Synoptic", False, "gear_Synoptic") dis.inspect(prop, 335, 700, 125, 75)
def gear_newPose_Execute(): if xsi.ActiveSceneRoot.Properties("gear_newPoseProp"): xsi.DeleteObj(xsi.ActiveSceneRoot.Properties("gear_newPoseProp")) prop = xsi.ActiveSceneRoot.AddProperty("gear_newPoseProp", False, "gear_newPoseProp") ds.inspect(prop, 350, 150)
def gear_prefPoseLib_Execute(): if xsi.ActiveSceneRoot.Properties("gear_prefPoseLibProp"): xsi.DeleteObj(xsi.ActiveSceneRoot.Properties("gear_prefPoseLibProp")) prop = xsi.ActiveSceneRoot.AddProperty("gear_prefPoseLibProp", False, "gear_prefPoseLibProp") ds.inspect(prop, 550, 200)
def gear_OpenWireframe_Execute(): if xsi.ActiveSceneRoot.Properties("gear_Wireframe"): prop = xsi.ActiveSceneRoot.Properties("gear_Wireframe") xsi.DeleteObj(prop) prop = xsi.ActiveSceneRoot.AddProperty("gear_Wireframe", False, "gear_Wireframe") dis.inspect(prop, 315, 345, 125, 75)
def gear_selectionSetsCmd_Execute(): if xsi.ActiveSceneRoot.Properties("gear_selectionSets"): xsi.DeleteObj(xsi.ActiveSceneRoot.Properties("gear_selectionSets")) oScene = xsi.ActiveProject.ActiveScene prop = xsi.ActiveSceneRoot.AddProperty("gear_selectionSets", False, "gear_selectionSets") dis.inspect(prop, 410, 525)
def gear_poseLibManager_createPoseSet_OnClicked(currPose = False, setName = False, remPose = False ): root = xsi.ActiveSceneRoot if currPose and setName and not remPose: for newPose2add in PPG.parPoseList.Value.split(";"): if newPose2add not in currPose: currPose.append(newPose2add) pose2add = currPose pEditList = ";".join(currPose) elif currPose and setName and remPose: for newPose2remove in PPG.parPoseList.Value.split(";"): if newPose2remove in currPose: currPose.remove(newPose2remove) pose2add = currPose pEditList = ";".join(currPose) else: pose2add = PPG.parPoseList.Value.split(";") setName = xsi.XSIInputBox ("Pose Set Name", "Name", "poseSet") pEditList = PPG.parPoseList.Value oPSet = root.AddCustomProperty(setName, False ) oPSet.AddParameter3("percentage", c.siInt4, 25, 1, 100, False, False) oLayout = oPSet.PPGLayout oLayout.AddItem("percentage", "Pose %", c.siControlNumber ) oPSet.AddParameter3( "poseEditList", c.siString) oPSet.Parameters("poseEditList").Value = pEditList rowNumber = PPG.parRowsNum.Value rowConter = 0 rowAdd = 0 lines = 1 for posePath in pose2add: iPoseName = posePath.split(SEP)[-1] iPath = os.path.join(posePath, posePath.split("_")[-1] + ".htm" ) oPSet.AddParameter3( iPoseName, c.siString) oPSet.Parameters(iPoseName).Value = iPath if rowAdd == rowConter: oLayout.AddRow() rowConter = rowConter + rowNumber oItem = oLayout.AddItem(iPoseName, ".", c.siControlSynoptic) oItem.SetAttribute(c.siUINoLabel,True) if rowAdd == rowConter -1: oLayout.EndRow() lines += 1 rowAdd +=1 # just testing ds.inspect( oPSet, (75*rowNumber)+ 25, (75*lines) + 65 )
def gear_poseLib_Execute(): if xsi.ActiveSceneRoot.Properties("gear_poseLibManager"): xsi.DeleteObj(xsi.ActiveSceneRoot.Properties("gear_poseLibManager")) prop = xsi.ActiveSceneRoot.AddProperty("gear_poseLibManager", False, "gear_poseLibManager") if xsi.Preferences.Categories("gear_prefPoseLib"): listSize = xsi.GetValue("preferences.gear_prefPoseLib.list_Size") else: listSize = 500 ds.inspect(prop, 300, 365 + listSize)
def selectOrInspect(in_mousebutton, in_keymodifier, ctl_name, prop_name, width=None, height=None): # Right click - Do nothing if in_mousebutton == 2: return elif in_mousebutton == 0: # Left click - Select only select(0, in_keymodifier, ctl_name) elif in_mousebutton == 1: # Middle click - Select and Inspect select(0, in_keymodifier, ctl_name) prop = xsi.Selection(0).Properties(prop_name) if not prop: gear.log("Can't find property", gear.sev_error) return dis.inspect(prop, width, height, -(width+145), 75)
def selectOrInspect(in_mousebutton, in_keymodifier, ctl_name, prop_name, width=None, height=None): # Right click - Do nothing if in_mousebutton == 2: return elif in_mousebutton == 0: # Left click - Select only select(0, in_keymodifier, ctl_name) elif in_mousebutton == 1: # Middle click - Select and Inspect select(0, in_keymodifier, ctl_name) prop = xsi.Selection(0).Properties(prop_name) if not prop: gear.log("Can't find property", gear.sev_error) return dis.inspect(prop, width, height, -(width + 145), 75)