mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
resolving presets promise
This commit is contained in:
parent
45feed021a
commit
64fe76271c
2 changed files with 11 additions and 9 deletions
|
|
@ -617,7 +617,6 @@ $.pype = {
|
||||||
*/
|
*/
|
||||||
setProjectPreset: function (inPresets) {
|
setProjectPreset: function (inPresets) {
|
||||||
// validating the incoming data are having `plugins` key
|
// validating the incoming data are having `plugins` key
|
||||||
$.pype.log(inPresets.plugins);
|
|
||||||
if (Object.prototype.hasOwnProperty.call(inPresets, 'plugins')) {
|
if (Object.prototype.hasOwnProperty.call(inPresets, 'plugins')) {
|
||||||
$.pype.presets = inPresets;
|
$.pype.presets = inPresets;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,18 @@ class Pype {
|
||||||
this.csi.evalScript('$.pype.setEnvs(' + JSON.stringify(self.env) + ')');
|
this.csi.evalScript('$.pype.setEnvs(' + JSON.stringify(self.env) + ')');
|
||||||
this.pras = new PypeRestApiClient(this.env);
|
this.pras = new PypeRestApiClient(this.env);
|
||||||
console.info(`Getting presets for ${this.env.AVALON_PROJECT}`);
|
console.info(`Getting presets for ${this.env.AVALON_PROJECT}`);
|
||||||
this.presets = this.pras.get_presets(this.env.AVALON_PROJECT);
|
this.presets = this.pras.get_presets(this.env.AVALON_PROJECT)
|
||||||
console.info("transferring presets to jsx")
|
.then((presets) => {
|
||||||
this.csi.evalScript('$.pype.setProjectPreset(' + JSON.stringify(result) + ');', () => {
|
console.info("transferring presets to jsx")
|
||||||
console.log("done");
|
this.presets = presets;
|
||||||
// bind encoding jobs event listener
|
this.csi.evalScript('$.pype.setProjectPreset(' + JSON.stringify(presets) + ');', () => {
|
||||||
this.csi.addEventListener("pype.EncoderJobsComplete", this._encodingDone);
|
console.log("done");
|
||||||
|
// bind encoding jobs event listener
|
||||||
|
this.csi.addEventListener("pype.EncoderJobsComplete", this._encodingDone);
|
||||||
|
|
||||||
// Bind Interface buttons
|
// Bind Interface buttons
|
||||||
this._bindButtons();
|
this._bindButtons();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue