Windows で,Blender 最新版をソースコードからビルドして,インストールする.
https://wiki.blender.org/wiki/Building_Blender/Windowsの手順に従う
Blender のインストールは,複数の方法がある.
Blenderは,3次元コンピュータグラフィックス・アニメーションソフトウェア. 3次元モデルの編集,レンダリング、光源やカメラ等を設定しての3次元コンピュータグラフィックス・アニメーション作成機能がある.
【目次】
【サイト内の関連ページ】
謝辞:Blenderソフトウェアの作者に感謝します
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
Windows での 7-Zip のインストール: 別ページ »で説明
【関連する外部ページ】
7-Zip の公式ページ: https://sevenzip.osdn.jp/
Subversion for Windows (SlikSVN) のインストール: 別ページ »で説明
Subversion for Windows (SlikSVN) のページ: https://sliksvn.com/
Windows での Python 3.10,関連パッケージ,Python 開発環境のインストール: 別ページ »で説明
【サイト内の関連ページ】
Python のまとめ: 別ページ »にまとめ
【関連する外部ページ】
Python の公式ページ: https://www.python.org/
Windows での Build Tools for Visual Studio 2022,NVIDIA ドライバ,NVIDIA CUDA ツールキット 11.8,NVIDIA cuDNN v8.6 のインストールと動作確認: 別ページ »で説明
【関連する外部ページ】
次の公式ページの手順による
インストールしたい Blender のバージョンにあうタグを,次のページで探す.
起動は,Windows のメニューで「Visual Studio 20..」の下の「x64 Native Tools コマンドプロンプト (x64 Native Tools Command Prompt)」を選ぶ.「x64」は,64ビット版の意味である.
「x64 Native Tools コマンドプロンプト (x64 Native Tools Command Prompt)」がないとき:
C++ ビルドツール (Build Tools) のインストールを行うことで, 「x64 Native Tools コマンドプロンプト (x64 Native Tools Command Prompt)」がインストールされる.その手順は,別ページ »で説明
「master」のところには,使用したいバージョンの Blender のブランチを指定する.
cd %HOMEPATH% rmdir /s /q blender git clone -b master --recursive https://github.com/blender/blender
Blender のソースコードに付属の make.bat を使用している.
cd %HOMEPATH% cd blender make help
「2022b」のところは, さきほど make help を実行したときの表示を参考に,必要に応じて変更する.
Visual Studio Community 2022 を使うときは「make update 2022b」ではなく,「make update 2022」 を実行.
cd %HOMEPATH% cd blender make update 2022b
「Would you like to download them?」と表示されたときは「y」を入れる.
終了まで時間がかかるので,しばらく待つ
ダウンロード終了を確認する.
cmake のオプションの 「Visual Studio 17 2022」のところは, 使用する Visual Studio のバージョンにあわせること. Visual Studio 2022 のときは,「Visual Studio 17 2022」. Visual Studio 2019 のときは,「Visual Studio 16 2019」.
公式ページの手順に従うが,公式ページの手順通りに実行するとエラーが出たので, 手順を変えている.
終了まで時間がかかるので,しばらく待つ
cd %HOMEPATH% cd blender del CMakeCache.txt rmdir /s /q CMakeFiles cd %HOMEPATH% rmdir /s /q blender-build mkdir blender-build cd blender-build cmake ..\blender -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_INSTALL_PREFIX="c:\blender" cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL
c:\blender\blender.exe
次のページの記載による: https://wiki.blender.org/wiki/Building_Blender/Other/BlenderAsPyModule
cd %HOMEPATH% cd blender del CMakeCache.txt rmdir /s /q CMakeFiles cd %HOMEPATH% rmdir /s /q blender-build mkdir blender-build cd blender-build cmake ..\blender -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_INSTALL_PREFIX="c:\blender" ^ -DWITH_PYTHON_INSTALL=OFF -DWITH_AUDASPACE=OFF -DWITH_PYTHON_MODULE=ON ^ -DWITH_WINDOWS_BUNDLE_CRT=OFF cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL xcopy /E c:\blender\bpy "C:\Program Files\Python310\Lib\site-packages\bpy"
エラーメッセージが出ていないこと.
コマンドプロンプトで次のコマンドを実行する.
エラーメッセージが出なければ OK.
python -c "import bpy; scene = bpy.data.scenes['Scene']; print(scene)"