How to setup blender building in windows

So its my first contact with C and C++ but I am willing to mess around with the blender source code.

I could build blender sucessfully but it was painfully slow, is it supposed to take 50min to build it?

If I want to do some quick tests and change stuff in blender what is the best practice? is there a way to not have to rebuild the entire program every time I edit one line of code to make some quick experiments?

Highly depended on your hardware, on my 6 year old i7-3770/16gb it takes about 20-25 minutes for the initial build.

best practice for ‘quick tests and change stuff’ I’m not sure what kind of response you are expecting, but with the information given there is very little advise i can give. Best i have is disable the bits you don’t need? not testing cycles? disable it, not doing anything with motion tracking? disable libmv. not using freestyle? disable it.

It’s kinda depended on what you are changing, if you just change a single line in a .c or .cpp file only that file will be recompiled, if you change a very common header, it’ll have to rebuild everything that depends on that header which could take a bit.

Sorry, noob here, how to I disable those modules?
is there a configuration file somewhere? or its through command arguments?

easiest is probably running cmake-gui and pointing it to your source+build folder.

Oh, I found thanks for the help.

I’ve also wondered these same questions. It takes me roughly 10 mins to do a “make full” and looks like you would be spending most of your time waiting to test changes. Don’t know the first thing about C/C++ ,but always thought it would be cool to learn and maybe create new modifiers or something. Navigating and understanding the source also looks like a nightmare. Wish somebody would do some tutorials on youtube or something.

I’ll help anyone with issues building blender, but that’s about where it ends, I just don’t have the time for anything beyond that. I know @mathieu is making a course that touches upon these subjects, but given the steep price i haven’t looked at it, so no idea if it’s any good.

For me on a laptop, make update and make release only takes a couple minutes normally. The exception is if the CUDA kernels need to be re-built in which case you can tack another 15-20 minutes on for that (slow and single-threaded).

I highly recommend Visual Studio Code (free, open-source, cross-platform) as a tool for exploring Blender’s source code.

By default blender is configured to make cuda kernels for all cards (gtx6xx all the way up to the rtx2xx, 10 kernels in total) if you are doing local development, set CYCLES_CUDA_BINARIES_ARCH in cmake to just your gpu architecture and you can shave 90% off that cuda build time.

1 Like

Hey @LazyDodo happy new year. You helped me so much, you can have a free access of course, just ask per PM on BA. I thought you may already know everything I explain there, so didn’t propose.

Hi AFWS,
the course I made may be perfect for you to get started with modifiers: Programing course for Blender/Cycles - General Forums / Latest News - Blender Artists Community . The advertising is not yet ready, but you can already see some gifs of what you would learn to implement. And I made the modifications really as simple as possible for anyone to be able to step in. The offer for the beta has ended today, but I can make an exception if you want. I know some are students, etc. Send a PM at bliblubli on Blenderartists :slight_smile: