Skip to content

Instantly share code, notes, and snippets.

@lowteq
Created May 26, 2025 02:44
Show Gist options
  • Select an option

  • Save lowteq/6de061d47e6565aff7e547fa59c006a9 to your computer and use it in GitHub Desktop.

Select an option

Save lowteq/6de061d47e6565aff7e547fa59c006a9 to your computer and use it in GitHub Desktop.
Blenderの現在のファイルパスをクリップボードにコピー
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