Function hasSelectedKeys

  • Property 存在选中关键帧谓词

    Parameters

    • property: _PropertyClasses

    Returns property is CanSetValueProperty

    0.1.0

    const selectedProperty = _.getFirstSelectedProperty();
    // 注意:如果没有活动合成会返回 undefined
    if (selectedProperty) {
    if (_.hasSelectedKeys(selectedProperty)) {
    const selectedKeys = selectedProperty.selectedKeys;
    _.removeKeyframesBy(selectedProperty, function (property, keyIndex) {
    return _.contains(selectedKeys, keyIndex);
    });
    }
    }
    // 结果:选中 Property 存在关键帧的前提下,所有选中的关键帧都会被移除。