Created
May 26, 2025 02:44
-
-
Save lowteq/6de061d47e6565aff7e547fa59c006a9 to your computer and use it in GitHub Desktop.
Blenderの現在のファイルパスをクリップボードにコピー
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| import os | |
| def copy_current_blend_path_to_clipboard(): | |
| filepath = bpy.data.filepath | |
| if not filepath: | |
| print("ファイルがまだ保存されていません。") | |
| return False | |
| abs_path = bpy.path.abspath(filepath) | |
| # クリップボードにコピー | |
| bpy.context.window_manager.clipboard = abs_path | |
| print("クリップボードにコピーしました:", abs_path) | |
| return True | |
| # 実行 | |
| copy_current_blend_path_to_clipboard() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment