improved connector UI in node view

This commit is contained in:
itsmattkc
2021-11-10 21:59:54 -08:00
parent 9c650883c2
commit 6033039046
15 changed files with 352 additions and 148 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ const QString Track::kMutedInput = QStringLiteral("muted_in");
Track::Track() :
track_type_(Track::kNone),
index_(-1),
locked_(false)
locked_(false),
sequence_(nullptr)
{
AddInput(kBlockInput, NodeValue::kNone, InputFlags(kInputFlagArray | kInputFlagNotKeyframable));
+14 -1
View File
@@ -26,6 +26,8 @@
namespace olive {
class Sequence;
/**
* @brief A time traversal Node for sorting through one channel/track of Blocks
*/
@@ -388,9 +390,18 @@ public:
bool IsLocked() const;
int GetArrayIndexFromBlock(Block* block) const;
Sequence *sequence() const
{
return sequence_;
}
void set_sequence(Sequence *sequence)
{
sequence_ = sequence;
}
static const double kTrackHeightDefault;
static const double kTrackHeightMinimum;
static const double kTrackHeightInterval;
@@ -472,6 +483,8 @@ private:
bool locked_;
Sequence *sequence_;
private slots:
void BlockLengthChanged();
+2
View File
@@ -83,6 +83,7 @@ void TrackList::TrackConnected(Node *node, int element)
connect(track, &Track::TrackLengthChanged, this, &TrackList::UpdateTotalLength);
track->set_type(type_);
track->set_sequence(parent());
emit TrackListChanged();
@@ -121,6 +122,7 @@ void TrackList::TrackDisconnected(Node *node, int element)
track->SetIndex(-1);
track->set_type(Track::kNone);
track->set_sequence(nullptr);
disconnect(track, &Track::TrackLengthChanged, this, &TrackList::UpdateTotalLength);