Maybe anybody know script for 3ds max to automatically save project as file on google drive in the same time of saving it on pc I try to use for this chatgpt, but this isn.t help me import os.path from google.oauth2.credentials import Credentials from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request # Якщо зміните доступи, то використовуйте інші Scopes SCOPES = ['https://www.googleapis.com/auth/drive.file'] def authorize(): creds = None # Перевірка, чи є вже збережений токен if os.path.exists('token.json'): creds = Credentials.from_authorized_user_file('token.json', SCOPES) # Якщо токен недоступний або не валідний, проходимо нову авторизацію if not creds or not creds.valid: if creds and creds.expired and creds.refresh_token: creds.refresh(Request()) else: flow = InstalledAppFlow.from_client_secrets_file( 'credentials.json', SCOPES) creds = flow.run_local_server(port=0) # Збереження токену в файл для наступних запитів with open('token.json', 'w') as token: token.write(creds.to_json()) return creds from googleapiclient.discovery import build from googleapiclient.http import MediaFileUpload def upload_to_google_drive(file_path): creds = authorize() # Виклик функції авторизації service = build('drive', 'v3', credentials=creds) # Створення метаданих для файлу file_metadata = {'name': os.path.basename(file_path)} media = MediaFileUpload(file_path, mimetype='application/octet-stream') # Завантаження файлу file = service.files().create( body=file_metadata, media_body=media,`your text` fields='id' ).execute() print(f"Файл завантажено на Google Диск з ID: {file.get('id')}" Continue reading...