mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-27 06:12:19 +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) {
|
||||
// validating the incoming data are having `plugins` key
|
||||
$.pype.log(inPresets.plugins);
|
||||
if (Object.prototype.hasOwnProperty.call(inPresets, 'plugins')) {
|
||||
$.pype.presets = inPresets;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -23,15 +23,18 @@ class Pype {
|
|||
this.csi.evalScript('$.pype.setEnvs(' + JSON.stringify(self.env) + ')');
|
||||
this.pras = new PypeRestApiClient(this.env);
|
||||
console.info(`Getting presets for ${this.env.AVALON_PROJECT}`);
|
||||
this.presets = this.pras.get_presets(this.env.AVALON_PROJECT);
|
||||
console.info("transferring presets to jsx")
|
||||
this.csi.evalScript('$.pype.setProjectPreset(' + JSON.stringify(result) + ');', () => {
|
||||
console.log("done");
|
||||
// bind encoding jobs event listener
|
||||
this.csi.addEventListener("pype.EncoderJobsComplete", this._encodingDone);
|
||||
this.presets = this.pras.get_presets(this.env.AVALON_PROJECT)
|
||||
.then((presets) => {
|
||||
console.info("transferring presets to jsx")
|
||||
this.presets = presets;
|
||||
this.csi.evalScript('$.pype.setProjectPreset(' + JSON.stringify(presets) + ');', () => {
|
||||
console.log("done");
|
||||
// bind encoding jobs event listener
|
||||
this.csi.addEventListener("pype.EncoderJobsComplete", this._encodingDone);
|
||||
|
||||
// Bind Interface buttons
|
||||
this._bindButtons();
|
||||
// Bind Interface buttons
|
||||
this._bindButtons();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue