コード例 #1
0
    bool setLayerProperties(int row, PropertyList props) {
        KisNodeDummy *dummy = converter->dummyFromRow(row);
        if (!dummy) return false;

        KisNodePropertyListCommand::setNodePropertiesNoUndo(dummy->node(), image, props);
        return true;
    }
コード例 #2
0
    QVariant layerProperties(int row) const {
        KisNodeDummy *dummy = converter->dummyFromRow(row);
        if (!dummy) return QVariant();

        PropertyList props = dummy->node()->sectionModelProperties();
        return QVariant::fromValue(props);
    }
コード例 #3
0
    bool removeLayer(int row) {
        KisNodeDummy *dummy = converter->dummyFromRow(row);
        if (!dummy) return false;

        if (nodeInterface) {
            nodeInterface->removeNode(dummy->node());
        }

        return true;
    }
コード例 #4
0
    bool frameExists(int row, int column) const {
        KisNodeDummy *dummy = converter->dummyFromRow(row);
        if (!dummy) return false;

        KisKeyframeChannel *content =
            dummy->node()->getKeyframeChannel(KisKeyframeChannel::Content.id());

        if (!content) return false;

        KisKeyframeSP frame = content->keyframeAt(column);
        return frame;
    }
コード例 #5
0
 bool layerEditable(int row) const {
     KisNodeDummy *dummy = converter->dummyFromRow(row);
     if (!dummy) return true;
     return dummy->node()->visible() && !dummy->node()->userLocked();
 }
コード例 #6
0
 QVariant layerName(int row) const {
     KisNodeDummy *dummy = converter->dummyFromRow(row);
     if (!dummy) return QVariant();
     return dummy->node()->name();
 }
コード例 #7
0
    bool addKeyframe(int row, int column, bool copy) {
        KisNodeDummy *dummy = converter->dummyFromRow(row);
        if (!dummy) return false;

        return KisAnimationUtils::createKeyframeLazy(image, dummy->node(), column, copy);
    }