You canât apply a patch after building. Youâll need to use the git patching tool (or git bash) to apply the patch to the downloaded master code base and then rebuild Blender.
So:
Download the diff
Put it in the root folder of the Blender code
Navigate there with Git Bash
type âgit apply --ignore-space-change <patchFileNameGoesHere>â (without the quotes) and hit enter
i navigated with gitBash to the folder and used the â patch -p1 < difffileâ but no file to patch was found at line 5.
I was looking in line 5 and was thinking maybe i have to put the diff file in the âinternâ folder because to patch works only in one folderâŚi navigated git bash again to te intern folder and try to patch and this time he find some code to changeâŚbut not all and he ask again to skip the not founded code âŚnow my original source code is changed and works no more âŚi think i have make a copy first before i try to patch.
Ok after skipping some lines i realysed some files are not included in the source code so maybe the patch is written for another blender versionâŚjust guessing.
How do i know which patch belongs to which blender source version?
-âgit stashâ(in master folder) all changes gone.
-âgit checkout 98e2135a2â master switched to 98e2135a2 âŚhow the heck you know which blender version belongs to which patch?.
-âgit apply D1985.diffâ I put the raw diff in the root folder
and after the apply command i get a lot of errors âNo such files or directoryâ
But in version 98e2135 all files and directories are there so i dont know why git dont find these files and directoryâŚmaybe i but the .diff file not in right folder?
Right!, Im on the Verge of randomly smacking someone in the face on the street.
First the whole Blender patch situation is as clear as mud, All docs are out of date and just drive you nuts.
Im on windows 10, Can compile blender fine but ive tried 50,000 different ways to patch code with RAW .diffs and nothings worked.
Download diff, released today. Update blender master from today. git console into directory of master blender-git/blender. Copy patch there. Git apply patch xxxxxx.diff
C:\blender-git\blender [master âĄ]> git apply D2341.diff
error: patch failed: intern/cycles/kernel/svm/svm.h:332
error: intern/cycles/kernel/svm/svm.h: patch does not apply
error: patch failed: intern/cycles/render/nodes.h:462
error: intern/cycles/render/nodes.h: patch does not apply
C:\blender-git\blender [master âĄ]> git apply --ignore-space-change D2341.diff
error: patch failed: intern/cycles/kernel/svm/svm.h:332
error: intern/cycles/kernel/svm/svm.h: patch does not apply
error: patch failed: intern/cycles/render/nodes.h:462
error: intern/cycles/render/nodes.h: patch does not apply
C:\blender-git\blender [master âĄ]>
Tried in blender directory, tried in source directory as other docs online say, itâs such a confused subject that has no real decent help or information on.
So tried git stash then the above again with same problems. Ive tried git add in many different ways. AGHHHHHHHH!
I get this with every single diff downloaded from the dev page, WTF is going on.
There has to be a blender dev running windows and applying patches, for once could devs actually help new comers who are just trying to pitch in, why is it such a hassle for devs to help new comers. And sort out the Bloody Docs related to this ASAP.
@3DLuver, I use Linux so I do not have much idea about how to patch on Windows. But that seems like youâre trying to patch versions of Blender that do not match the patch date. Have you done what Lukas explain in message #7?
Edit:
Sorry, I did not pay attention. You said todayâŚ
Thank you Yafu, Your a diamond mate. Again no where in docs did it explain you have to apply patches in number order.
Now works.
Im going to write a start to finish explanation of compiling blender on windows and apply dev patches / creating dev patches as the docs are shamefully wrong and out of date on this. Makes you wonder how many devs wanted to get involved with blender code just to loose interest because the lac of documentation on this subject.