Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[draft] convert premiere to pype2 #92

Closed

Conversation

jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Apr 17, 2020

Jakub Jezek and others added 30 commits March 31, 2020 10:36
@@ -0,0 +1,138 @@
import os
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'os' imported but unused

self._sentry_logging_handler = None
self._database = None
self._is_installed = False
self.Session = {}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

over-indented

@@ -0,0 +1,2 @@
from .publishing import PUBLISH_PATHS
from .lib import AdobeRestApi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.lib.AdobeRestApi' imported but unused

@@ -0,0 +1,2 @@
from .publishing import PUBLISH_PATHS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'.publishing.PUBLISH_PATHS' imported but unused

}

for (var key in arguments) {
var string_key = '{' + key + '}'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

_pype.displayError('Data comming from `{url}` are not correct'.format({url: url}));
callback(null)
}
}).catch(err => _pype.displayError('Data comming from `{url}` are not correct.\n\nError: {error}'.format({url: url, error: err})));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

callback(json.data);
} else {
_pype.displayError('Data comming from `{url}` are not correct'.format({url: url}));
callback(null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

} catch (e) {
return res.text();
}
}).then(json => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

_pype.displayResult('options: ' + JSON.stringify(options));

// send post request to rest api server
fetch(url, options).then(res => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

headers: {
'Content-Type': 'application/json'
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

@mkolar mkolar added the type: enhancement Enhancements to existing functionality label Apr 17, 2020
import json
import bson
import bson.json_util
from pype.services.rest_api import RestApi, abort, CallbackResult
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'pype.services.rest_api.abort' imported but unused

import re
import json
import bson
import bson.json_util
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'bson.json_util' imported but unused

@@ -0,0 +1,48 @@
import os
import re
import json
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'json' imported but unused

@@ -0,0 +1,48 @@
import os
import re
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

're' imported but unused

*/
getApiServerUrl: function () {
var url = _pype.ENV.PYPE_REST_API_URL;
return url
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon.

_pype.csi.evalScript('$.pype.encodeRepresentation(' + JSON.stringify(request) + ');', function (result) {
// create json for pyblish
const jsonfile = require('jsonfile');
const fs = require('fs');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


_pype.csi.evalScript('$.pype.encodeRepresentation(' + JSON.stringify(request) + ');', function (result) {
// create json for pyblish
const jsonfile = require('jsonfile');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

// copy project file to stagingDir
_pype.csi.evalScript('$.pype.getProjectFileData();', function (result) {
const path = require('path');
const fs = require('fs');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).


// copy project file to stagingDir
_pype.csi.evalScript('$.pype.getProjectFileData();', function (result) {
const path = require('path');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

const mkdirp = require('mkdirp');
const os = require('os');
const path = require('path');
const UUID = require('pure-uuid');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

__import__("pype.premiere")
__import__("pyblish")

except ImportError as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__import__() can return in some cases ValueError on python < 3.9. See (https://bugs.python.org/issue37444)

@mkolar mkolar added this to the 2.9 milestone Apr 27, 2020
@jakubjezek001
Copy link
Member Author

outdated merged locally into #100

Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Apr 17, 2023
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request May 5, 2023
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Jun 1, 2023
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants