diff --git a/controller.py b/controller.py index bed34e3..d92864c 100644 --- a/controller.py +++ b/controller.py @@ -1,5 +1,5 @@ import sys -from PySide2.QtWidgets import QApplication, QFileDialog +from PySide2.QtWidgets import * from view import AssetUploaderView from model import AssetUploaderModel @@ -31,7 +31,9 @@ def current_asset_type(self): return asset_type def btn_browse_clicked(self): - self.dir_path = QFileDialog.getExistingDirectory() + dialog = QFileDialog() + dialog.setDirectory(r'C:\shotgrid') + self.dir_path = dialog.getExistingDirectory() self.line_path.setText(self.dir_path) def btn_upload_clicked(self): diff --git a/model.py b/model.py index 29f56f8..3b4d304 100644 --- a/model.py +++ b/model.py @@ -4,10 +4,10 @@ from pprint import pprint -# Shotgrid Api connect -SERVER_PATH = "https://molo.shotgrid.autodesk.com" -SCRIPT_NAME = 'script_dj' -SCRIPT_KEY = 'i*teicH1pmxjklgqmydqwmyyl' +# Shotgrid API connect +SERVER_PATH = "shotgrid_url" +SCRIPT_NAME = 'script_name' +SCRIPT_KEY = 'script_key' sg = Shotgun(SERVER_PATH, SCRIPT_NAME, SCRIPT_KEY) @@ -42,7 +42,7 @@ def upload_assets(self, project_name, asset_dir_path, asset_type): result = sg.create('Asset', data) - pprint(result) + print(result) def main():