5 Steps to setup VSCode for Blender Python (on macOS)

  Рет қаралды 2,311

CG Python

CG Python

Күн бұрын

Learn how to set up and install VSCode on macOS for efficient Blender Python development with this step-by-step tutorial. This easy-to-follow guide covers everything from downloading and installing VSCode to configuring it for seamless integration with Blender.
5 Steps to setup VSCode for Blender Python (on Windows)
• 5 Steps to setup VSCod...
5 Steps to setup VSCode for Blender Python (on Linux)
• 5 Steps to setup VSCod...
Visual Studio Code Download
code.visualstudio.com/Download
Python Download
www.python.org/downloads/
Fake Blender Python API module
github.com/nutti/fake-bpy-module
Blender Python scripting: Creating custom operators from scratch
• Blender Python scripti...
00:00 - Intro
01:22 - Step 1 install Python
04:20 - Step 2 install VSCode
05:00 - Step 3 Configure VScode for Python
07:22 - Step 4 Configure VScode for Blender Python
09:12 - Step 5 Configure Blender/VSCode integration
#blender #python #scripting #tutorial #vscode

Пікірлер: 18
@peterstrohmeier4666
@peterstrohmeier4666 2 ай бұрын
Thank You so much. Now I am able to debug my Python-S/W for Blender. BTW: To run the S/W I had to make a change at the end and not to go over "main()".😀
@CGPython
@CGPython Жыл бұрын
Hey friends, I just realized that I made a mistake in the edit The VSCode Command Palette is launched with Command + Shift + P
@ginescap
@ginescap Жыл бұрын
Thanks, I hope you finish the Linux one. :)
@Winston-K
@Winston-K Жыл бұрын
I'm so happy to have found your videos. I enjoy making Blender art in short videos using Python. Having your videos available to explain how to use `bpy` has helped me clean up my code! Especially cleaning up the scene for multiple script runs. Look forward to more videos :)
@CGPython
@CGPython Жыл бұрын
Hey Jason, I'm pleased to hear that! 😃
@jaimeberkovich
@jaimeberkovich 7 ай бұрын
reopened blender after creating the __init__.py file but did not see the custom panel -- tried "Blender: Run Script" as well but no dice. Help? (I was able to get the other scripts (the ones that create and move cubes) working just fine. Thanks!
@CGPython
@CGPython 7 ай бұрын
Make sure to have that __init__.py file in a separate folder and then open that folder in VSCode. Also, make sure that you have the bl_info dictionary in the code (the part of the code that registers the add-on). If you have everything in place, the add-on will auto-load when you start Blender from VSCdoe, no need to run "Blender: Run Script
@TwinkleToes16
@TwinkleToes16 5 ай бұрын
A notification keeps popping up that says "No workspace folder found". Can you help?
@CGPython
@CGPython 4 ай бұрын
yes, I have a video on how to fix that kzfaq.infoK9Ft10KuLCA
@kuzey3d767
@kuzey3d767 Жыл бұрын
Is there a different procedure for Mac m1 devices? I installed the fake-bpy-module but when I try to run a script I'm getting No module named 'bpy'....is this because M1's use zsh instead of bash? cheers
@CGPython
@CGPython Жыл бұрын
Hey, No it isn't because the M1, I'm running a Mac M2 here. The issue is that you can only launch the script in Blender if you run it from the VSCode Command Palette. The "Run & Debug" currently works only for scripts that you run outside of Blender. To run the script you need to do the following: 1. Open the VSCode Command Palette with Command + Shift + P 2. Start Blender using the "Blender: Start" command 3. Open the Command Palette (again) with Command + Shift + P 4. Select "Blender: Run Script" See 10:20 in the video
@kuzey3d767
@kuzey3d767 Жыл бұрын
@@CGPython Cheers I think VSC was using the wrong Python Interpreter, in any case, it's working now. Thank you!
@radekradmor
@radekradmor 6 ай бұрын
had the same - wrong version of Python - thanks@@kuzey3d767
@marknielsen4494
@marknielsen4494 5 ай бұрын
Thanks a million for all your efforts Victor! In getting the initial script to run from vsc... After starting blender from vsc and it installed debugpy ok, then trying to run the script from vsc I'm getting: Got POST: {'type': 'script', 'path': '/Users/marknielsen/Desktop/VSCode_Blender_Testing/my_bpy_script.py'} Traceback (most recent call last): File "/Users/marknielsen/.vscode/extensions/jacqueslucke.blender-development-0.0.18/pythonFiles/include/blender_vscode/utils.py", line 22, in always try: func() File "/Users/marknielsen/.vscode/extensions/jacqueslucke.blender-development-0.0.18/pythonFiles/include/blender_vscode/operators/script_runner.py", line 24, in run_script_action bpy.ops.dev.run_script(context, filepath=path) File "/Applications/Blender.app/Contents/Resources/4.0/scripts/modules/bpy/ops.py", line 106, in __call__ C_exec, C_undo = _BPyOpsSubModOp._parse_args(args) File "/Applications/Blender.app/Contents/Resources/4.0/scripts/modules/bpy/ops.py", line 60, in _parse_args raise ValueError("1-2 args execution context is supported") ValueError: 1-2 args execution context is supported Any thoughts on troubleshooting?
@marknielsen4494
@marknielsen4494 5 ай бұрын
I uninstalled Jacques Blender Development extension and installed your experimental fork. It worked on the initial script run test so now I'll attempt to complete the rest of your video steps. I'm running VSCode 1.84.2, Blender 4.0.1, Python 3.12.0 installed blender using it's own
@CGPython
@CGPython 4 ай бұрын
yeah, There was a Blender Python update when Blender was released. I submitted a fix to the original Jacques Blender Development extension. It should be fixed there as well. I'm glad it is working for you now!
5 Steps to setup VSCode for Blender Python (on Windows)
12:29
CG Python
Рет қаралды 19 М.
Supercharging Blender's Drivers with Python
17:03
CG Python
Рет қаралды 4 М.
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 687 М.
Когда на улице Маябрь 😈 #марьяна #шортс
00:17
Start Automating Your Life Using Python! (File Management with Python Tutorial)
13:07
How to Setup Neovim for Godot GDScript on Windows
11:15
Big Turtle
Рет қаралды 414
Will AI replace programmers, is coding dead?
5:00
Python Programmer
Рет қаралды 36 М.
Getting Started with Scripting in Python
49:24
Blender
Рет қаралды 11 М.
The Reality Of Tech Jobs in 2024
6:39
Theo - t3․gg
Рет қаралды 300 М.
you NEED to use VS Code RIGHT NOW!!
12:48
NetworkChuck
Рет қаралды 550 М.
My Python Development Environment Setup - Full Tutorial
20:39
Tech With Tim
Рет қаралды 201 М.
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 687 М.