Memo: In VScode: - install "Blender development" addon - in Terminal tab : pip install fake-bpy-module-2.80 - make a project folder, create a test.py inside In Blender: - in a Text Editor window: locate and open test.py If you modify file in Blender do Alt+S in Blender's text editor to sync in VScode If you modify in VScode: click red question mark icon in Blender text editor bar, then "Reload form disk" Thanks for the great turorial, Just subed (800th) :)
As an engineer, without Blender skills and with the task of creating thousands of physics simulations and rendering the result. I came to this topic very quickly, namely to create an own addon for Blender. You did a great job, but now I'm a little sad that I have to wait for your next video. Keep the work up!
Hey look who I found :) I watched your UE4 C++ course!🌟 I love that you put so much energy into helping people setting up an ideal development environment
Perfect tutorial, concise and to the point, clear and easily understandable audio. I watched this in 2x speed and was still able to follow. Thank you very much
I can't understand why this great tutorial does not have the enough view count-! Scripting is also important as well as using the base features of blender. More people need to consider about using, making and sharing additional open source scripts for blender, and this will make the blender world bigger and more flexible for all users including new learning people
Great tutorial! That `fake-bpy-module` was exactly what I needed. Just to add one thing others might find helpful, there is a way to avoid clicking the "Reload from disk" button every time: On the top of the Blender text editing window click Templates > Python > External Script Stub. This will load a template that executes another script that you edit in your IDE.
You can also open Blender via the command "Blender: Start" (open the command panel with Ctrl+Shift+P), then VSC will open Blender and make a "bridge" between your current workspace and this running instance of Blender. You can then run your code via the command "Blender: Run Script". Using the usual Run Button (or Alt+P) doesn't work here because it only accesses the fake-bpy-module and not the Python interpreter/environment that Blender uses.
If you get stucked at 6:40. The code for installing the package is ""py -m pip install fake-bpy-module-2.79". Check your version if that doesn't work for you, hope it helps.
Yes i did it! i install all of them and now i can see all the avalaible methods on dot .. it's hard for me to understand why dot doesn't work in blender 's text editor
The only issue of Ninite i have found is that the programs install with no user input so you can not choose drive location nor does it give you the option to add python or vscode to PATH. P.s. great video, very informative.
not having any luck getting fake-bpy-module to work in VS code with any version of it installed. I'm using blender 2.93 as well as fake-bpy-module-2.93 which says it installs correctly but I still get the "Import "bpy" could not be resolved" issue and reloading VS code doesn't seem to help and I've uninstalled python, blender, and vscode and reinstalled them to no avail.
Very good video! I cannot run the program on Visual Code, when I run the program, it shows run time errors. Is this the way it supposed to work. This is only to check synaxis but not debugging nor running on VC?
If you open Blender via the command "Blender: Start" (open the command panel with Ctrl+Shift+P), then VSC will open Blender and make a "bridge" between your current workspace and this running instance of Blender. You can then run your code via the command "Blender: Run Script". Using the usual Run Button (or Alt+P) doesn't work here because it only accesses the fake-bpy-module and not the Python interpreter/environment that Blender uses.
Thank you for the video, for import bpy I am not getting error but if I write from bpy.types import Operator I get error ImportError: cannot import name 'Operator' from 'bpy.types' (unknown location). (Please note I followed fake bpy installation video properly, even referred similar videos on Ytube). Any hint will help.
I believe so, but it is a bit more involved and requires the script to be loaded as an actually Add-On and not just run as a script. It's been a while since I last did that though
@@MichaelBridges3D Actually, it might make for a awesome blender plugin to expose some kind of port for running REPL commands. I know you can interface with Blender REPL via the STDIN interface (have actually written a project to do that), but setting that up in such a way that commands can either be passed over named pipes, /dev/pipes or even just over a TCP socket would be pretty amazing. I might look at writing something like that.
Amazing video.. great help But what if I install bpy module instead of this one (fake-bpy-module) Before finding this video, I installed the bpy module through, pip install bpy, but then vscode won't show suggestions for the library
To uninstall a package that you installed using pip, you can use the pip uninstall command followed by the package name. Here's a step-by-step guide: Open a terminal or command prompt on your computer. Run the following command, replacing package-name with the name of the package you want to remove: pip uninstall package-name You will be prompted to confirm the uninstallation. Type y and press Enter to proceed Keep in mind that if the package has any dependencies that were installed alongside it, they may not be removed automatically. You can use the pipdeptree tool to inspect the package's dependencies and remove them if necessary. To do this, first install pipdeptree: pip install pipdeptree Then, run the following command to view the dependency tree: pipdeptree This will show you a tree-like structure of all installed packages and their dependencies. You can then uninstall any unnecessary packages using the pip uninstall command.
in vba you can access another application. From vba excel i can open autocad and draw everything (whole control) Is there any way to access blender from vs code directly ?
The Add on needs to be reloaded regardless of the path, but when I was using VSCode I could "run" the addon which in turn would load up Blender and refresh the add-on
@Michael Bridges: This video lesson/explanation/tutorial is interesting about the Python language in Visual Basic, for point variables, if the user has adequate knowledge: - with the use of python and visual basic language, you could port blender software interface on android devices in 1080 x 2400 pixel screen resolution in .apk extension, with the help of Termux shell; but how?!. - my difficulty and problem is how to make Blender full of viewport, compatible on Nvidia NVS 5200M or Intel(r) hd 4000 regarding fps/lag/frames, but I can't find file/algorithm/line code in your Blender folder directory ; as far as i know about languages, i think it is accessible in this regard code line between blender viewport and graphics card model, if yes, how?!.
Haha that’s beyond my knowledge at the moment. You need to ensure that whatever hardware you have meets the minimum requires for the graphic api. As of 3.4 that is open GL 4.3
@@MichaelBridges3D however it was to have a chat, even if I was hoping that in the directory where I installed, there was a particular file, especially the line of code for compatibility in this regard fps and viewport, I don't find it a bad thing, if my notebook doesn't can update / or install in addition to Nvidia NVS 5200M, that's why I had thought of a modification, I have a saying: "if Mohammed can not reach the mountain, the mountain goes to Mohammed", if we compare the installed Nvida driver is Mohammed and the mountain is blender; anyway thanks for your reply.
Sadly this doesn't work for me. The installing fas successful (for fake-bpy-module-3.1) but I still have the yellow lines around my code and the autocomplete doesn't work either. :/ Maybe there was an update or such thing?
It can be challenging since, everyone's setup is slightly different and other installs can cause issues. Update';s of course can cause things to fail as well.
ok Michael a simple question for you? if you know -any help appreciated def abcd(): print("cat") x = 'ab' y = 'cd' w = x + y print(w) #prints abcd w() #why isn't this callable as my abcd() function above, how do I make it callable?
Memo:
In VScode:
- install "Blender development" addon
- in Terminal tab : pip install fake-bpy-module-2.80
- make a project folder, create a test.py inside
In Blender:
- in a Text Editor window: locate and open test.py
If you modify file in Blender do Alt+S in Blender's text editor to sync in VScode
If you modify in VScode: click red question mark icon in Blender text editor bar, then "Reload form disk"
Thanks for the great turorial, Just subed (800th) :)
Francois Schnell woohoo thanks 🙏 🎉
As an engineer, without Blender skills and with the task of creating thousands of physics simulations and rendering the result. I came to this topic very quickly, namely to create an own addon for Blender. You did a great job, but now I'm a little sad that I have to wait for your next video.
Keep the work up!
Thank you. Very encouraging. The wait won’t be long. 😀
What an amazin English speaker! This how people should speak
This is an amazing tutorial! I really appreciate how you walk through the steps so simply.
Thank you so much!
Hey look who I found :) I watched your UE4 C++ course!🌟
I love that you put so much energy into helping people setting up an ideal development environment
Thank you for all the effort you've done. you saved my day!
Perfect tutorial, concise and to the point, clear and easily understandable audio. I watched this in 2x speed and was still able to follow. Thank you very much
Great to hear!
Well done!! I find what I was looking for your speech is fast and comprehensive
This video should be on the official Blender Quick Start documentation, saves everyone's time
High praise! Thank you.
It can be certainly be challenging with python configurations being different on everyone’s system.
I can't understand why this great tutorial does not have the enough view count-! Scripting is also important as well as using the base features of blender. More people need to consider about using, making and sharing additional open source scripts for blender, and this will make the blender world bigger and more flexible for all users including new learning people
Really useful tutorial, just what I needed!
You’re welcome.
Great tutorial! That `fake-bpy-module` was exactly what I needed.
Just to add one thing others might find helpful, there is a way to avoid clicking the "Reload from disk" button every time: On the top of the Blender text editing window click Templates > Python > External Script Stub. This will load a template that executes another script that you edit in your IDE.
Thanks for the info!
You can also open Blender via the command "Blender: Start" (open the command panel with Ctrl+Shift+P), then VSC will open Blender and make a "bridge" between your current workspace and this running instance of Blender. You can then run your code via the command "Blender: Run Script".
Using the usual Run Button (or Alt+P) doesn't work here because it only accesses the fake-bpy-module and not the Python interpreter/environment that Blender uses.
Beautiful explanation. Thank you so much.
Extremely helpful!
Thank you very much. You have a talent for teaching. Keep it up!
Thank you so much! This was just the help I needed to get everything working!
You are welcome!
Awesome video Michael, thank you!
My pleasure!
Exemplary explained and excellently visualized and presented
Thank you for your kind words they mean a lot
Great tutorial! Thank you!
Glad you enjoyed it!
If you get stucked at 6:40. The code for installing the package is ""py -m pip install fake-bpy-module-2.79". Check your version if that doesn't work for you, hope it helps.
Thanks, mate! That was useful!
No problem 👍
Incredible video. You rock!
Thank you kindly!
Very Nice!!! Thank you for the video.
You are welcome!
Very well presented, thank you!
Glad you enjoyed it!
You are a phenomenal techer Michael!! I am currently taking your blender course on udemy.
soumitra wagholikar Thank you that means a lot!
Great. Really useful awesome tutorial. Thank you very much
Thank you Michael !!!
Any time
Great That was really helpfull Michael Thanks
Glad it helped.
Thank you so much for this tutorial!
Glad it was helpful!
thank you so much for you clear interesting video! subbed! :)
Great Video. Thanks!
You're welcome!
thank you so much
Welcome 😊
Thanks man...
Always welcome
Thanks for the video, there needs to be a better way though than switching back and forth and clicking the ?-icon on any iteration.
Haven’t found one yet, Blender stores a local, cached, copy of the script just like it does images and everything else.
thanks!!!!!!!!!
thank u
You're welcome!
thanks
Welcome
You make courses for Udemy too? Amazing that I find this channel, love your content, excellent teaching. Thank you Sir!
Yes I do! And thank you, that means a lot :)
Yes i did it! i install all of them and now i can see all the avalaible methods on dot .. it's hard for me to understand why dot doesn't work in blender 's text editor
ty
You are welcome!
Great video! Did you probably managed to set up debugging as well so that you can run your code step by step from VS Code?
That’s a great question, I’m not sure 🤔
The only issue of Ninite i have found is that the programs install with no user input so you can not choose drive location nor does it give you the option to add python or vscode to PATH.
P.s. great video, very informative.
Good point with ninite. Especially If you need that customisation.
thx
You are welcome!
not having any luck getting fake-bpy-module to work in VS code with any version of it installed. I'm using blender 2.93 as well as fake-bpy-module-2.93 which says it installs correctly but I still get the "Import "bpy" could not be resolved" issue and reloading VS code doesn't seem to help and I've uninstalled python, blender, and vscode and reinstalled them to no avail.
Very good video! I cannot run the program on Visual Code, when I run the program, it shows run time errors. Is this the way it supposed to work. This is only to check synaxis but not debugging nor running on VC?
If you open Blender via the command "Blender: Start" (open the command panel with Ctrl+Shift+P), then VSC will open Blender and make a "bridge" between your current workspace and this running instance of Blender. You can then run your code via the command "Blender: Run Script".
Using the usual Run Button (or Alt+P) doesn't work here because it only accesses the fake-bpy-module and not the Python interpreter/environment that Blender uses.
Thank you for the video, for import bpy I am not getting error but if I write from bpy.types import Operator I get error ImportError: cannot import name 'Operator' from 'bpy.types' (unknown location). (Please note I followed fake bpy installation video properly, even referred similar videos on Ytube). Any hint will help.
Great Video, Thank you! Is there a way to execute the script from vscode?
I believe so, but it is a bit more involved and requires the script to be loaded as an actually Add-On and not just run as a script. It's been a while since I last did that though
@@MichaelBridges3D Actually, it might make for a awesome blender plugin to expose some kind of port for running REPL commands. I know you can interface with Blender REPL via the STDIN interface (have actually written a project to do that), but setting that up in such a way that commands can either be passed over named pipes, /dev/pipes or even just over a TCP socket would be pretty amazing.
I might look at writing something like that.
Amazing video.. great help
But what if I install bpy module instead of this one (fake-bpy-module)
Before finding this video, I installed the bpy module through, pip install bpy, but then vscode won't show suggestions for the library
To uninstall a package that you installed using pip, you can use the pip uninstall command followed by the package name. Here's a step-by-step guide:
Open a terminal or command prompt on your computer.
Run the following command, replacing package-name with the name of the package you want to remove:
pip uninstall package-name
You will be prompted to confirm the uninstallation. Type y and press Enter to proceed
Keep in mind that if the package has any dependencies that were installed alongside it, they may not be removed automatically. You can use the pipdeptree tool to inspect the package's dependencies and remove them if necessary. To do this, first install pipdeptree:
pip install pipdeptree
Then, run the following command to view the dependency tree:
pipdeptree
This will show you a tree-like structure of all installed packages and their dependencies. You can then uninstall any unnecessary packages using the pip uninstall command.
in vba you can access another application. From vba excel i can open autocad and draw everything (whole control) Is there any way to access blender from vs code directly ?
Kind of, but I found it a little clunky and unreliable
Is there opportunity to run script form vscode directly? Because it a little annoying to reload it in blender every time
The Add on needs to be reloaded regardless of the path, but when I was using VSCode I could "run" the addon which in turn would load up Blender and refresh the add-on
@Michael Bridges: This video lesson/explanation/tutorial is interesting about the Python language in Visual Basic, for point variables, if the user has adequate knowledge: - with the use of python and visual basic language, you could port blender software interface on android devices in 1080 x 2400 pixel screen resolution in .apk extension, with the help of Termux shell; but how?!. - my difficulty and problem is how to make Blender full of viewport, compatible on Nvidia NVS 5200M or Intel(r) hd 4000 regarding fps/lag/frames, but I can't find file/algorithm/line code in your Blender folder directory ; as far as i know about languages, i think it is accessible in this regard code line between blender viewport and graphics card model, if yes, how?!.
Haha that’s beyond my knowledge at the moment. You need to ensure that whatever hardware you have meets the minimum requires for the graphic api.
As of 3.4 that is open GL 4.3
@@MichaelBridges3D however it was to have a chat, even if I was hoping that in the directory where I installed, there was a particular file, especially the line of code for compatibility in this regard fps and viewport, I don't find it a bad thing, if my notebook doesn't can update / or install in addition to Nvidia NVS 5200M, that's why I had thought of a modification, I have a saying: "if Mohammed can not reach the mountain, the mountain goes to Mohammed", if we compare the installed Nvida driver is Mohammed and the mountain is blender; anyway thanks for your reply.
Thanks for this! What about working on blender itself with C++? I'm not a fan of visual studio. I'd rather use vscode.
You can certainly do that especially with Blender being Open Source. That's beyond my remit at the moment though...but perhaps one day!
@@MichaelBridges3D thank you for your response!
Sadly this doesn't work for me.
The installing fas successful (for fake-bpy-module-3.1) but I still have the yellow lines around my code and the autocomplete doesn't work either. :/
Maybe there was an update or such thing?
It can be challenging since, everyone's setup is slightly different and other installs can cause issues.
Update';s of course can cause things to fail as well.
Can autosave in vscode.
is there a way to do this with Sublime?
I don’t know sorry. I should imagine it might be possible given how flexible Sublime is.
ok Michael a simple question for you? if you know -any help appreciated
def abcd():
print("cat")
x = 'ab'
y = 'cd'
w = x + y
print(w) #prints abcd
w() #why isn't this callable as my abcd() function above, how do I make it callable?
You haven’t defined the function w() so cannot call it yet.
@@MichaelBridges3D Thanks Michael!, I just assumed I could imply function
My blender 2.92.0 was running fine. I installed VS and it broke blender or rather OpenGL, so beware it's an ugly road back.
Only Blender 2.8 is supported!!!!! :(
I’m sure it won’t be long before 2.9 and onwards is supported 🤞