Getting MPFB 2 started with VS code

Discussions that concern the community rather than the makehuman software

Getting MPFB 2 started with VS code

Postby AssetDK » Sat May 08, 2021 10:27 am

Edit note: I realize that I can not add more than one attachment here and I really want to do than. So I moved notes to the wiki - there are now two brand new pages there:



This is outdated and will be removed:

I just started up my VSCode (VSC), that I used for MakeShapes, and it looks like I can simply access the MPFB2-latest - with very few problems. So I guess it would make sense to make a few "getting started with VSC" notes. Also I would like to recommend that you use YouTube:Blender launcher, as you will probably need to run different versions of Blender. ( In case you get errors just starting Blender look for a opengl32.dll file, to fix that, it should be installed in the same directory where Blender.exe is).

I will start this by making some developers notes that could eventually compile into one or more tutorials... - I will keep adding more notes to this post but I urge you to:
  • Add comments
  • Add tips and links to other tutorials
  • Add your own code
  • Request topics that you think would need to covered
  • Add links to other addons that is useful for VSC and MBFP2

Getting MPFB 2 started with VS code

To get really started, I would recommend YouTube:Visual Studio Code + Blender tutorial - there are a load of other tutorials, but this seems to give a short recap, just what I need to get re-started.
Start VSC and locate the version of MBFP2 you want to inspect/debug/run.

The very first issue!!

Getting Blender running from VSC, you need to open the folder in VSC and ctrl-shift-p and select the runtime - in my case D:\Blender\stable\blender-2.92.0-windows64\blender.exe - but if you do this like I did you will just see Blender start up and then pass-away. if you are new to VSC you may not notice that there is a message about this on the console - the operative part is: PermissionError:. This rather meaningless, however but what happen is that did already install the addon with this Blender version 2.92.0... and in short you need to unload and uninstall the addon you want to run/debug in VSC.

This is what Blender should look like when running from VSC - I highlighted tree things:
  • It looks like 2.9.2 (or perhaps MBPF2) adds collections to the Scene: Mesh/Rig/Collision/Extras.
  • When running from VSC you will get a extra DEV tool-tab, this is good to know i you are running Blender both ways.
  • When running from VSC the add on gets installed and it will be installed as is, when you run (the same) Blender without VSC.
  • _
    MPFB2-VS1.PNG




Placeholder for topics I would like to cover

Using GitHub?!

Placeholder for how to get the addon.

Inspect an error

Placeholder for looking at the console and reporting errors.

Debug the code

Placeholder for "digging in" and inspecting the code.

Adding your own code

Placeholder for - how to "sample" the existing code, adding your own menus/buttons and functions.

MFB2 in Blender

Placeholder for "how are the MPFB2 components organized in Blender".

Useful Blender things

Placeholder for learning to use Blender via MPFB2!

Useful VSC things

Placeholder for VSC specific tips.

Useful Addons

Placeholder for addon specific tips.
Last edited by AssetDK on Tue May 11, 2021 6:23 pm, edited 1 time in total.
AssetDK
 
Posts: 51
Joined: Wed Dec 25, 2019 1:46 pm

Re: Getting MPFB 2 started with VS code

Postby joepal » Sat May 08, 2021 12:42 pm

A very useful and helpful contribution. :-)

Maybe I should switch to VSC. I currently run eclipse + pydev, but that's rather primitive and does not come with any debugging capability.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4455
Joined: Wed Jun 04, 2008 11:20 am

Re: Getting MPFB 2 started with VS code

Postby AssetDK » Mon May 10, 2021 2:04 pm

joepal wrote:A very useful and helpful contribution. :-)

Maybe I should switch to VSC. I currently run eclipse + pydev, but that's rather primitive and does not come with any debugging capability.

I think I used this tutorial for installing, https://www.youtube.com/watch?v=77mMpeoh3OI - I could not work without debug, and it's especially useful when learning. But Blender do have some cool features where you can inspect/trace what is happening also.
AssetDK
 
Posts: 51
Joined: Wed Dec 25, 2019 1:46 pm


Return to Community discussions

Who is online

Users browsing this forum: No registered users and 1 guest