Installing patches

Hello, Blender users!

Recently I ran into a Metropolis sampling patch (https://developer.blender.org/T38401). I was looking for an information on how to install it (or any other patches). :eek: Could anyone give me an easy step-by-step instruction how to do that? :o

Thanks in advance!

Ubuntu 14.04 (32-bit)
Blender 2.75

Thanks for reply, Mib! Could you give me some more details on how to apply patches? Because I cannot find this info anywhere.

Ubuntu 14.04 (32-bit)
Blender 2.75

You could follow this to get blender’s source and then this to try actual patching.
My attempt showed that metropolis patch wont apply using automated methods to the latest blender’s code; provided that it’s partly included this is not a surprise.

Patch file is a text where you can read which code file and what lines are changed or added; you can go through all changes and see if you can add needed parts manually. Diffutils or http://winmerge.org/ could be the tools to use.

Thanks, Eppo! I’ll try that when I come back home.

By the way, is it worth trying to install that patch?

Reading through the conversation - looks like a code we might miss. One of those, there are quite a bunch of the patches which for some or another reason end on a dusty shelf instead of being used despite being asked for a long, if you dig.
It would be easier to apply patch if there was a clear clue to which version (hash, or whatever is used in git to determine code state) patch should be applied to. Right now - one should be fairly good at programming, i guess, to get it compile and work.
There were ready to test builds at the time this was posted, win only if i remember; i haven’t tried any unfortunately but graphicall or links in the posts could lead to some.
Is it worth to try? idk, if you feel like this is a thing you would want a lot…

Have not build blender in a while but to patch blender you place the patch file inside the source folder then in terminal cd to the source folder and use this command “patch -p1 < name_of_file.patch”, then build blender as usual.
That’s how it used to be.

ramboblender, thanks, this still work.

@Nazarii: you could take a look at this thread.

according to this
https://dev-files.blender.org/file/data/tmgcgyj3bsslk6dk53lw/PHID-FILE-zzvd7pxcz74xdvfj4tqp/nzlmolizeunqqcsz/metropolis_20_2.patch
it was made using “diff”

BUT!!!
on the source from this OLD date
Date: Thu, 31 Jul 2014 19:28:31 +0200

you would have to run “patch” against what ever fork that was from that date
– a pain in the rear

a manual cut / copy / paste
into the relevant cpp and h files would be needed

basically a
HOPE AND PRAY

build

it might kill something or NOT

a guess is maybe LESS than a 50/ 50 chance of it working on the Aug. 2015 code