appleseedhq / appleseed

A modern open source rendering engine for animation and visual effects
https://appleseedhq.net/
MIT License
2.2k stars 329 forks source link

Add button for 'watch mode' to appleseed.studio #241

Closed jonathantopf closed 10 years ago

jonathantopf commented 11 years ago

A mode where appleseed watches the current open file for changes, reloads the file and starts a new interactive render. Would make iteration much simpler.

garvitverma commented 10 years ago

can i start working on this one? are there any more details before i start to work on this.

dictoon commented 10 years ago

Sure, I mark it as assigned then.

dictoon commented 10 years ago

Basically, when a project file is open in appleseed.studio, and some settings is set in settings/appleseed.studio.xml (for instance watch_project_file_changes=true?), then appleseed.studio should reload the file when it detects that it was modified on disk. Qt has this ability via the QFileSystemWatcher class.

If it turns out interactive rendering was running when the project file changes were detected, then rendering should be interrupted, the project file should be reloaded and rendering should be restarted. This is already all implemented: MainWindow::open_project() will stop the render, reload the project and restart the render if necessary. All it is missing is calling this method when a project file change is detected.

garvitverma commented 10 years ago

ok great! thanks for the detailed info i'll start working and will post if i face any troubles On Mar 15, 2014 11:39 PM, "François Beaune" notifications@github.com wrote:

Basically, when a project file is open in appleseed.studio, and some settings is set in settings/appleseed.studio.xml (for instance watch_project_file_changes=true?), then appleseed.studio should reload the file when it detects that it was modified on disk. Qt has this ability via the QFileSystemWatcherhttp://qt-project.org/doc/qt-4.8/qfilesystemwatcher.htmlclass.

If it turns out interactive rendering was running when the project file changes were detected, then rendering should be interrupted, the project file should be reloaded and rendering should be restarted. This is already all implemented: MainWindow::open_project() will stop the render, reload the project and restart the render if necessary. All it is missing is calling this method when a project file change is detected.

Reply to this email directly or view it on GitHubhttps://github.com/appleseedhq/appleseed/issues/241#issuecomment-37733264 .

dictoon commented 10 years ago

The core functionality has been added in PR #379. All is left to do is add a toolbar button to enable/disable watch mode.

garvitverma commented 10 years ago

ok i will get started on that. do you have any starting point or any other details before i get to adding the button.

On Thu, Mar 20, 2014 at 1:31 PM, François Beaune notifications@github.comwrote:

The core functionality has been added in PR #379https://github.com/appleseedhq/appleseed/pull/379. All is left to do is add a toolbar button to enable/disable watch mode.

Reply to this email directly or view it on GitHubhttps://github.com/appleseedhq/appleseed/issues/241#issuecomment-38142550 .


Regards, Garvit Verma BITS PILANI-K.K. Birla Goa Campus M.Sc(Tech.) Information Systems President,Computer Graphics Club Autodesk Student Expert

dictoon commented 10 years ago

Check how other toolbar buttons are implemented. This button should be a toggle (when pressed, the watch mode is engaged and the button stays pressed).

dictoon commented 10 years ago

Garvit, there's a small bug in the watch mode functionality. Here's a scenario where the watch mode is not working:

  1. Open a project file.
  2. Save the project under another file name.
  3. Modify the new file: the project is not reloaded.
garvitverma commented 10 years ago

the code will work if any project is opened, i din't get the save part.

On Thu, Mar 20, 2014 at 6:26 PM, François Beaune notifications@github.comwrote:

Garvit, there's a small bug in the watch mode functionality. Here's a scenario where the watch mode is not working:

  1. Open a project file.
  2. Save the project under another file name.
  3. Modify the new file: the project is not reloaded.

Reply to this email directly or view it on GitHubhttps://github.com/appleseedhq/appleseed/issues/241#issuecomment-38163044 .


Regards, Garvit Verma BITS PILANI-K.K. Birla Goa Campus M.Sc(Tech.) Information Systems President,Computer Graphics Club Autodesk Student Expert

garvitverma commented 10 years ago

hey franz i have added a new PR with button for watch mode plz have a look at it. On Mar 20, 2014 6:26 PM, "François Beaune" notifications@github.com wrote:

Garvit, there's a small bug in the watch mode functionality. Here's a scenario where the watch mode is not working:

  1. Open a project file.
  2. Save the project under another file name.
  3. Modify the new file: the project is not reloaded.

Reply to this email directly or view it on GitHubhttps://github.com/appleseedhq/appleseed/issues/241#issuecomment-38163044 .

dictoon commented 10 years ago

There is another issue that needs to be fixed: when the watch mode is enabled, saving the current project (via CTRL-S for instance) reloads it immediately.

dictoon commented 10 years ago

Done in #412.