コード例 #1
0
def Cloth_Rigger_SelectSoftMimicCluster_OnClicked():
    target = PPG.Inspected(0).Parent3DObject
    cls = XSI.OpenTransientExplorer(
        target, constants.siSEFilterPropertiesAndPrimitives, 3)(0)
    if cls and cls.Type == 'pnt':
        PPG.Inspected(0).Parameters('SoftMimicCluster').Value = cls.Name
        Utils.GetWeightMap(target, 'SoftMimicMap', 1, 0, 1, cls)
    else:
        XSI.LogMessage(
            '[Cloth_Rigger] Invalid Selection : Select a Point Cluster on Cloth Geometry',
            constants.siWarning)
コード例 #2
0
def Cloth_Rigger_SelectCollidePointCluster_OnClicked():
    item_id = Property.GetIDFromSelectedUIItem(PPG.Inspected(0),
                                               "ColliderMeshes")
    target = PPG.Inspected(0).Parent3DObject
    cluster = XSI.OpenTransientExplorer(
        target, constants.siSEFilterPropertiesAndPrimitives, 3)(0)
    if cluster and cluster.Type == 'pnt':
        PPG.Inspected(0).Parameters(
            'CollidePointCluster{}'.format(item_id)).Value = cluster.Name
    else:
        XSI.LogMessage(
            '[Cloth_Rigger] Invalid Selection : Select a Point Cluster on Cloth Geometry',
            constants.siWarning)