Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xsheet feature #1119

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2dac3de
Xsheet shows up, can resize ok
davidlamhauge Oct 19, 2018
981d948
Xsheet interacts with Timeline, not vice versa
davidlamhauge Oct 22, 2018
3a7e2c1
Removed dead code. Use member variable in stead of parameter
davidlamhauge Oct 23, 2018
b1605da
WIP Xsheet must cope with add new layer, delete layer, etc
davidlamhauge Oct 23, 2018
4879e99
Shortcut X. Modularized to subfunctions. Enhanced code
davidlamhauge Oct 24, 2018
d18c448
Color coded xsheet. Vector and Bitmap layers.
davidlamhauge Oct 24, 2018
6da4c55
Loads papagayo files to xsheet
davidlamhauge Oct 24, 2018
5215068
Optimizing colors in xsheet. Renaming stringlist
davidlamhauge Oct 25, 2018
8772ef2
Erase xsheet possible.
davidlamhauge Oct 26, 2018
cd257f7
double click in xsheet gives a new keyframe in timeline
davidlamhauge Oct 26, 2018
7a6f9e4
WIP FileDialog loads twice. Ignore commit
davidlamhauge Oct 28, 2018
676101e
Almost 100% interactive. Scrub in Xsheet. Show/hide layer
davidlamhauge Oct 28, 2018
bf9baae
Erasing lipsync info, when new/open file
davidlamhauge Oct 28, 2018
f204a87
Minor rewrite og *.pgo file import
davidlamhauge Oct 28, 2018
815e8b6
Load and Save lipsync column in xsheet
davidlamhauge Oct 28, 2018
c334012
Remove/Add Keyframes/Lipsync from xsheet.
davidlamhauge Oct 28, 2018
4c7253b
Index error running on Win10 fixed (scrollToItem)
davidlamhauge Oct 30, 2018
34553fe
Added addFrame button to xsheet. Cleaning up code
davidlamhauge Oct 30, 2018
f960b6e
Added csv Export. Small adjustments to come.
davidlamhauge Oct 30, 2018
114c5c1
Rearranged xsheet icons. Fixed length bug
davidlamhauge Oct 31, 2018
1f18cd1
Added suggestions for lipsync column. Clean up.
davidlamhauge Oct 31, 2018
b29cf1b
Ui enhanced. Less waste area.
davidlamhauge Nov 1, 2018
3e3d76a
Improve xsheet frame selection
scribblemaniac Nov 13, 2018
41ef981
Modify x-sheet spacing and text formatting
scribblemaniac Nov 13, 2018
ac88717
Merge pull request #1 from scribblemaniac/xsheet_interface_tweak
davidlamhauge Nov 13, 2018
16f8a0f
Optimizing xsheet updates
davidlamhauge Nov 15, 2018
6be66fe
replacing unstable function
davidlamhauge Nov 15, 2018
3c2db50
Hide xsheet at startup, and small update fix
davidlamhauge Nov 17, 2018
9513e28
Resolved merge conflicts
davidlamhauge Dec 13, 2018
201d844
Adding support for identical layernames in xsheet
davidlamhauge Jan 8, 2019
b20d50b
Merge branch 'master' into xsheet_dock
davidlamhauge Jan 9, 2019
58a8704
Not updating xsheet when it is hidden
davidlamhauge Jan 20, 2019
af54b36
Merged Master into xsheet_dock. Replaced obsolete functions
davidlamhauge Aug 5, 2019
36d7058
Resolving merge conflicts with master branch
davidlamhauge Oct 25, 2020
26ae355
Updating code
davidlamhauge Oct 25, 2020
1df896a
Merged master into branch
davidlamhauge Apr 15, 2022
c404ea3
Merged master branch into xsheet_dock
davidlamhauge Aug 17, 2022
21a296a
Renaming member variables to more logical names
davidlamhauge Aug 17, 2022
9e4ccc3
same as last. Forgot changes in header file
davidlamhauge Aug 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ HEADERS += \
src/importimageseqdialog.h \
src/spinslider.h \
src/doubleprogressdialog.h \
src/colorslider.h
src/colorslider.h \
src/xsheet.h

SOURCES += \
src/main.cpp \
Expand Down Expand Up @@ -86,7 +87,8 @@ SOURCES += \
src/importimageseqdialog.cpp \
src/spinslider.cpp \
src/doubleprogressdialog.cpp \
src/colorslider.cpp
src/colorslider.cpp \
src/xsheet.cpp

FORMS += \
ui/mainwindow2.ui \
Expand All @@ -108,7 +110,8 @@ FORMS += \
ui/timelinepage.ui \
ui/filespage.ui \
ui/toolspage.ui \
ui/toolboxwidget.ui
ui/toolboxwidget.ui \
ui/xsheet.ui



Expand Down
3 changes: 3 additions & 0 deletions app/data/app.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
<file>icons/new/arrow-horizontal.png</file>
<file>icons/new/arrow-selectmove.png</file>
<file>icons/new/arrow-vertical.png</file>
<file>icons/papagayo.png</file>
<file>icons/papagayoNo.png</file>
<file>icons/savecsv.png</file>
</qresource>
<qresource prefix="/app">
<file>icons/onion-blue.png</file>
Expand Down
Binary file added app/data/icons/papagayo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/data/icons/papagayoNo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/data/icons/savecsv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion app/src/actioncommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ GNU General Public License for more details.
#include "aboutdialog.h"
#include "doubleprogressdialog.h"


ActionCommands::ActionCommands(QWidget* parent) : QObject(parent)
{
mParent = parent;
Expand Down
28 changes: 25 additions & 3 deletions app/src/mainwindow2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ void MainWindow2::createDockWidgets()
mToolBox = new ToolBoxWidget(this);
mToolBox->setObjectName("ToolBox");

mXsheet = new Xsheet(mEditor, this);
mXsheet->setObjectName("Xsheet");

/*
mTimeline2 = new Timeline2;
mTimeline2->setObjectName( "Timeline2" );
Expand All @@ -175,7 +178,8 @@ void MainWindow2::createDockWidgets()
<< mColorPalette
<< mDisplayOptionWidget
<< mToolOptions
<< mToolBox;
<< mToolBox
<< mXsheet;

// mColorInspector->setFloating(true);
mStartIcon = QIcon(":icons/controls/play.png");
Expand All @@ -196,6 +200,7 @@ void MainWindow2::createDockWidgets()
addDockWidget(Qt::RightDockWidgetArea, mColorBox);
addDockWidget(Qt::RightDockWidgetArea, mColorInspector);
addDockWidget(Qt::RightDockWidgetArea, mColorPalette);
addDockWidget(Qt::RightDockWidgetArea, mXsheet);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the xsheet should be displayed by default. It will clutter the interface and cause confusion for new animators. Professional animators are the ones that will mainly benefit from this, and I think they should be more than capable of enabling it in from windows menu. Will see what they others have to say about this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the xsheet should be hidden by default. Pencil2D should keep its clean and easily accessible interface.
I also agree that the xsheet should be updated more efficient. I know there is a wish that the frames should be visible (in miniature) in the xsheet, so it will be corrected. That said, I think 60 fps or more i only seen in games, where it is common to have 50-100 fps, but that depends on cpu power. Hand drawn animation is max 24 or 25 fps in Europe and 30 fps in the States. Correct me if I'm wrong.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad we agree. You would have to be crazy to do frame-by-frame animating in 60 fps, though maybe someone is importing a 60 fps video and rotoscoping on twos or something along those lines. It might also be useful for smoother camera motion since that does not require any extra work for the user. I was mainly using that as an example to demonstrate the issue more clearly. We've had many complaints about our playback speed so we should avoid compounding the issue with more contributing factors.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've solved the problems mentioned. Rewrites of xsheet is now limited to situations where it is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scribblemaniac I have made changes, so I use the layer index in stead of layer name as identifier. This means that identical layer names are supported now.

addDockWidget(Qt::LeftDockWidgetArea, mToolBox);
addDockWidget(Qt::LeftDockWidgetArea, mToolOptions);
addDockWidget(Qt::LeftDockWidgetArea, mDisplayOptionWidget);
Expand Down Expand Up @@ -329,6 +334,15 @@ void MainWindow2::createMenus()
connect(ui->actionEraser, &QAction::triggered, mToolBox, &ToolBoxWidget::eraserOn);
connect(ui->actionResetToolsDefault, &QAction::triggered, mEditor->tools(), &ToolManager::resetAllTools);

/// --- Xsheet update ---
connect(mEditor, &Editor::updateTimeLine, this, &MainWindow2::updateXsheet);
connect(mEditor->layers(), &LayerManager::layerCountChanged, mXsheet, &Xsheet::updateXsheet);
connect(mEditor, &Editor::currentFrameChanged, mXsheet, &Xsheet::updateScrub);
connect(ui->actionNew, &QAction::triggered, mXsheet, &Xsheet::newOpenScene);
connect(ui->actionOpen, &QAction::triggered, mXsheet, &Xsheet::newOpenScene);
connect(mEditor->layers(), &LayerManager::animationLengthChanged, mXsheet, &Xsheet::lengthChanged);


/// --- Window Menu ---
QMenu* winMenu = ui->menuWindows;
winMenu->clear();
Expand All @@ -340,7 +354,8 @@ void MainWindow2::createMenus()
mColorPalette->toggleViewAction(),
mTimeLine->toggleViewAction(),
mDisplayOptionWidget->toggleViewAction(),
mColorInspector->toggleViewAction()
mColorInspector->toggleViewAction(),
mXsheet->toggleViewAction()
};

for (QAction* action : actions)
Expand Down Expand Up @@ -400,7 +415,7 @@ void MainWindow2::clearRecentFilesList()
if (!recentFilesList.isEmpty())
{
mRecentFileMenu->clear();
QMessageBox::information(this, 0,
QMessageBox::information(this, nullptr,
tr("\n\n You have successfully cleared the list"),
QMessageBox::Ok);
}
Expand Down Expand Up @@ -918,6 +933,7 @@ void MainWindow2::lockWidgets(bool shouldLock)
mToolOptions->setFeatures(feat);
mToolBox->setFeatures(feat);
mTimeLine->setFeatures(feat);
mXsheet->setFeatures(feat);
}

void MainWindow2::preferences()
Expand Down Expand Up @@ -954,6 +970,11 @@ void MainWindow2::resetAndDockAllSubWidgets()
}
}

void MainWindow2::updateXsheet()
{
mXsheet->updateUi(mEditor);
}

void MainWindow2::readSettings()
{
QSettings settings(PENCIL2D, PENCIL2D);
Expand Down Expand Up @@ -1084,6 +1105,7 @@ void MainWindow2::setupKeyboardShortcuts()
mTimeLine->toggleViewAction()->setShortcut(cmdKeySeq(CMD_TOGGLE_TIMELINE));
mDisplayOptionWidget->toggleViewAction()->setShortcut(cmdKeySeq(CMD_TOGGLE_DISPLAY_OPTIONS));
mColorInspector->toggleViewAction()->setShortcut(cmdKeySeq(CMD_TOGGLE_COLOR_INSPECTOR));
mXsheet->toggleViewAction()->setShortcut(cmdKeySeq(CMD_TOGGLE_XSHEET));

ui->actionHelp->setShortcut(cmdKeySeq(CMD_HELP));
ui->actionExit->setShortcut(cmdKeySeq(CMD_EXIT));
Expand Down
4 changes: 4 additions & 0 deletions app/src/mainwindow2.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GNU General Public License for more details.

#include <QMainWindow>
#include "preferencemanager.h"
#include "xsheet.h"


template<typename T> class QList;
Expand All @@ -42,6 +43,7 @@ class Timeline2;
class ActionCommands;
class ImportImageSeqDialog;
class BackupElement;
class Xsheet;



Expand Down Expand Up @@ -98,6 +100,7 @@ class MainWindow2 : public QMainWindow

private slots:
void resetAndDockAllSubWidgets();
void updateXsheet();

private:
bool openObject(QString strFilename, bool checkForChanges);
Expand Down Expand Up @@ -141,6 +144,7 @@ private slots:
//PreviewWidget* mPreview = nullptr;
TimeLine* mTimeLine = nullptr; // be public temporary
ColorInspector* mColorInspector = nullptr;
Xsheet* mXsheet = nullptr;

// backup
BackupElement* mBackupAtSave = nullptr;
Expand Down
Loading