From 09b4d1541e6e06563a40f8829048e4225ed8fcf9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jun 2018 16:12:38 +0200 Subject: mandatory results folder --- .../modules/pix2pixhd/views/pix2pixhd.live.js | 53 ++++++++++++++-------- .../modules/pix2pixhd/views/pix2pixhd.results.js | 22 ++++----- .../modules/pix2pixhd/views/pix2pixhd.show.js | 1 - 3 files changed, 46 insertions(+), 30 deletions(-) (limited to 'app/client/modules/pix2pixhd/views') diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js index 3f027a1..5dd4153 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.live.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.live.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux' import { ParamGroup, Param, Player, - Slider, Select, Button, Loading + Slider, Select, TextInput, Button, Loading } from '../../../common/' import { startRecording, stopRecording, saveFrame, toggleFPS } from '../../../live/player' @@ -52,10 +52,12 @@ class Pix2PixHDLive extends Component { } start(){ // console.log(this.props) - const sequence = this.props.pix2pixhd.data.sequences[0].name - const checkpoint = this.props.pix2pixhd.data.checkpoints[0].name + const sequence = this.props.live.opt.sequence_name + const checkpoint = this.props.live.opt.checkpoint_name console.log('starting up!', sequence, checkpoint) - this.props.actions.tasks.live_task(sequence, checkpoint) + this.props.actions.tasks.live_task(sequence, checkpoint, { + folder_id: resultsFolder.id, + }) } interrupt(){ this.props.actions.queue.stop_task('gpu') @@ -121,21 +123,10 @@ class Pix2PixHDLive extends Component { /> {this.renderRestartButton()} - + {this.renderRecordButton()} + // ) + } } function timeInSeconds(n){ return n.toFixed(1) + ' s.' diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js index ac0bb74..af8d90a 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.results.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.results.js @@ -18,20 +18,21 @@ class Pix2pixHDResults extends Component { render(){ if (! this.props.pix2pixhd.results) return - const { results, renders, files } = this.props.pix2pixhd.results -console.log(results) + const { resultsFolder, results, renders, files } = this.props.pix2pixhd.results + console.log(results) + return (

Pix2PixHD Results

- -

results

+ { e.preventDefault() e.stopPropagation() @@ -39,7 +40,7 @@ console.log(results) this.handlePick(file) }} /> - +

renders

-

files

+

results

{ e.preventDefault() e.stopPropagation() diff --git a/app/client/modules/pix2pixhd/views/pix2pixhd.show.js b/app/client/modules/pix2pixhd/views/pix2pixhd.show.js index 5777ac0..d58ee80 100644 --- a/app/client/modules/pix2pixhd/views/pix2pixhd.show.js +++ b/app/client/modules/pix2pixhd/views/pix2pixhd.show.js @@ -86,7 +86,6 @@ class Pix2PixHDShow extends Component { const input = pix2pixhd.data.fileLookup[dataset.input[0]] if (! input) return null if (input.name && input.name.match(/(gif|jpe?g|png)$/i)) return null - console.log(dataset) return (
-- cgit v1.2.3-70-g09d2