I am sry if this is the wrong place to ask this or if this has already been answered elsewhere but I couldn't find it.

I am confused about the git workflow when coding for blender: When I clone the blender src I get a local repo with the blender src code, but as I understand it, I can't directly develop in this repo because I don't get a Visual Studio solution or smth similiar and I don't get an application to run/debug.
So I build blender and get another folder outside of my git repo called build_windows.. or something. In this folder I get a VS solution and an application to run/debug. Here I can work on the code with VS.
But how do I get my changes, that I make in this folder, back into the source code folder, back into the git repo? I can't imagine I have to copy the changes manually.

What am I missing in this workflow? If someone could explain that to me, I would greatly appreciate it.

Thank you!

  • $\begingroup$ You don't edit files in the build directory (it actually doesn't contain the C or C++ source files). You do use the build for debugging and due to the project files generated by cmake VS knows where the actual source files are located. None of this has anything to do with a particular git workflow though. That would be how Blender manages feature and release branches, merges and so on. $\endgroup$
    – Robert Gützkow
    Nov 1 '20 at 20:45
  • $\begingroup$ Thank you! Yeah, I thought I had to work in the build directory and was missing some kind of step to get my changes done there, back into the repo. $\endgroup$ Nov 2 '20 at 16:28

You work with source code in the src folder of the cloned blender repo directly. If there is no project file for the IDE included (in your case the Visual Studio Solution) you need to create one and set it up to use this src folder.

Fortunately, Visual Studio offers support for git, so all you have to do is create a new Visual Studio Solution and set up git and the blender repo. Then you can track your changes and do the versioning in Visual Studio.

Of course you can still use the git command line but the source files stay in the src folder. Git handles the changes and keeps track of them. The repo itself with all versions and changes is usually stored in a folder named ".git" inside of the main folder.

Hope that helps.

  • $\begingroup$ Thank you! That helps a lot. I was confused because there was so much focus on building blender using the make script on the wiki, so I thought I had to work with that. $\endgroup$ Nov 2 '20 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.