From f848885747bc973b4530e54475e178666b21eea9 Mon Sep 17 00:00:00 2001 From: Eunjin Date: Fri, 23 Jun 2023 22:42:29 +0900 Subject: [PATCH] =?UTF-8?q?code=20=EC=A0=95=EB=A6=AC=ED=95=98=EC=97=AC=20u?= =?UTF-8?q?pdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller.py | 6 ++++-- model.py | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) 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():