NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.54k stars 332 forks source link

Fix crash when pasting unexistent nodes #847

Closed YakoYakoYokuYoku closed 1 year ago

YakoYakoYokuYoku commented 1 year ago

PR Description

What type of PR is this? (Check one of the boxes below)

What does this pull request do?

When I was testing a reported issue I stumbled upon a crash after I've tried to paste a group of nodes that used a plugin that was missing in my test installation. I've took notice that an assertion failed during copying and pasting that led to the crash.

https://github.com/NatronGitHub/Natron/blob/2b94fdcc1293f82413d1293f477d7c8ea926cc56/Gui/NodeGraphPrivate10.cpp#L114-L120

This PR makes that pasting content that may have missing node plugins only paste those which indeed have their plugin.

Show a few screenshots (if this is a visual change)

N/A.

Have you tested your changes (if applicable)? If so, how?

By pasting a selection of nodes that have some GIMP ones, which by the way is missing in my test install, in it and seeing that only those nodes were not present.

Futher details of this pull request

N/A.

YakoYakoYokuYoku commented 1 year ago

I was thinking about that and that's why I've exactly sent this as a PR. I was in between adding a warning dialog or not but an error seems more logical here. Though would be suitable to present which plugins are missing?

rodlie commented 1 year ago

Though would be suitable to present which plugins are missing?

That would be nice. As a user I hate "something failed" dialogs :)

devernay commented 1 year ago

I'm still OK with merging this, though, so you can merge and work on the dialog later

YakoYakoYokuYoku commented 1 year ago

Going to merge the dialogs later, though thanks for the feedback.