Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-13typotemp-move-geometry-to-cppJacques Lucke
2022-01-13move to c++Jacques Lucke
2022-01-13Cleanup: fix building all geometry nodes in one translation unitJacques Lucke
There were a couple of function name collisions which were caused by sharing code with the mask modifier. I just removed the dependence on the mask modifier now. The code that I duplicated for that purpose is only in a legacy node, so it can be expected to be removed soonish.
2022-01-13Fix link errors after recent FFMPEG / link_directories changesBrecht Van Lommel
2022-01-13Tests: skip some compositor tests when WITH_LIBMV=OFFBrecht Van Lommel
2022-01-13Fix T94737: Cycles wrong normal map normal with OSLBrecht Van Lommel
Ensure valid reflection was moved elsewhere, should not be done in the node anymore.
2022-01-13Fix T94050, T94570, T94527: Cycles Bevel and AO nodes not working with MetalBrecht Van Lommel
Workaround what may be a compiler bug, solution found by Michael Jones.
2022-01-13Fix Cycles CPU + GPU render not using CPU after recent changesBrecht Van Lommel
In some places the task scheduler was not initialized in time.
2022-01-13Fix T94758: wrong denoising albedo with BSSRDF retro reflectionBrecht Van Lommel
2022-01-13Build: remove usage of link_directoriesBrecht Van Lommel
We are now always using absolute paths for libraries, as recommended by the CMake docs. Followup to D9177.
2022-01-13CMake: use FFmpeg find module on LinuxBrecht Van Lommel
And change install_deps.sh to build shared (instead of static) FFMPEG libraries, for consistency with other library dependencies and to simplify the logic. This may require users of install_deps.sh to rebuild FFMPEG. This is the last step that lets us get rid of LIBPATH variables and link_directories() entirely, as recommended by the CMake docs. Some fixes were needed in the find FFMPEG module to make it actually work, this code was unused up to now. Followup to D8855. Differential Revision: https://developer.blender.org/D9177
2022-01-13Fix T92953: Tool Settings: Drag on Tweak fails with LMB selectCampbell Barton
2022-01-13Cleanup: follow code-style for float suffixCampbell Barton
2022-01-13Cleanup: quiet missing braces warningCampbell Barton
2022-01-12Fix T94624: Object as font instances don't workHans Goudey
The fundamental limitation is that we can only have one instance ("dupli") generator at a time. Because the mesh output of a curve object is output as an instances, the geometry set instances existed, replacing the object as font instances. The "fix" is to reverse the order. The behavior won't be perfect still, but at least the old behavior will be preserved, which is really what matters for a feature like this. One way to take this change further would be completely disabling regular geometry evaluation while this option is active. However, it doesn't seem like that would actually improve the state of the code. Differential Revision: https://developer.blender.org/D13768
2022-01-12Fix T85706: wm_window_make_drawable update DPIHarley Acheson
When drawing windows on monitors that differ in DPI, we can sometimes have UI elements draw at an incorrect scale. This patch just ensures that `wm_window_make_drawable` always updates DPI. See D10483 for more details. Differential Revision: https://developer.blender.org/D10483 Reviewed by Brecht Van Lommel
2022-01-12Revert "CMake: use FFmpeg find module on Linux"Brecht Van Lommel
This reverts commit 62a0de1673302fb7f15fe06efaf6f0f97d92d240. Linux buildbot is giving link errors.
2022-01-12Fix T94071: Area Split ImprovementsHarley Acheson
Allow area Split to be initiated in any area and give better feedback when not allowed. See D13599 for more details and usage examples. Differential Revision: https://developer.blender.org/D13599 Reviewed by Campbell Barton
2022-01-12Fix warnings after bab47b60cb69Julian Eisel
It's not really clear how this part of the defaults code should be used, I think this is fine now and solves the warnings.
2022-01-12Cleanup: Correct indentationJulian Eisel
2022-01-12CMake: use FFmpeg find module on LinuxBrecht Van Lommel
And change install_deps.sh to build shared (instead of static) FFMPEG libraries, for consistency with other library dependencies and to simplify the logic. This may require users of install_deps.sh to rebuild FFMPEG. This is the last step that lets us get rid of LIBPATH variables and link_directories() entirely, as recommended by the CMake docs. Some fixes were needed in the find FFMPEG module to make it actually work, this code was unused up to now. Followup to D8855. Differential Revision: https://developer.blender.org/D9177
2022-01-12DNA: Add space clip editor defaultsSimon Lenz
This is my attempt of adding defaults for the space clip editor struct (in line with https://developer.blender.org/T80164). It adds the default allocation for `SpaceClip` and `node_composite_movieclip.cc`. This also solves the error below (for C++ files using the DNA_default_alloc), which was put forward by Sergey Sharybin. Differential Revision: https://developer.blender.org/D13367 Reviewed by: Julian Eisel
2022-01-12Outliner: Add way to display warning icon for items.Bastien Montagne
While theorically fairly generic, current code is only enabled for bledfile and liboverride views, and only used to display messages from library IDs. Reviewed By: Severin Differential Revision: https://developer.blender.org/D13766
2022-01-12BLI_math: Fix building when WITH_GMP is offClément Foucault
2022-01-12Icons: Remove absolute pathnames and deprecated gradients from SVG filesNikhil Shringarpurey
SVG files contained specific detailed pathnames on developers' computers. These included full local user profile and path and should not be in the release. This patches corrects those lines. It also removes unused gradients from the private icons SVG. Differential Revision: https://developer.blender.org/D13344 Reviewed by: Yevgeny Makarov, Julian Eisel
2022-01-12DRW: Add DRW_gpu_wrapper.hhClément Foucault
This adds wrapper classes that make it easier to use GPU objects in C++. ####Motivations:#### - Easier handling of GPU objects. - EEVEE rewrite already makes use of similar wrappers. - There is the ongoing effort to use more C++ in the codebase and lans to port more engines to it. - The shader code refactor will make use of many UBOs with shared struct declaration. This helps managing them. - Safer handling of `TextureFromPool` which can't be bound as normal texture (only texture ref) and can be better tracked in the future. ####Considerations:#### - I chose the `blender::draw` namespace because `blender::gpu` already has private classes (i.e: `gpu::Texture`). - Theses are wrappers that manage a GPU object internally. They might be confused with actual `Texture`. However, the name `TextureWrapper` is a bit too much verbose in my opinion. I'm open to suggestion about better name. Reviewed By: jbakker Differential Revision: http://developer.blender.org/D13805
2022-01-12Cleanup: codestyle obj_exporter_tests.cc.Jeroen Bakker
2022-01-12Cleanup: Not needed if statement around delete.Jeroen Bakker
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Includes unwanted changes This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
2022-01-12BLI: Refactor vector types & functions to use templatesClment Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
2022-01-12Compositor: Add Scene Time Node, Rename Time nodeNathan Rozendaal
Fixes issue T94603 It adds a new compositor node called Scene Time which is already present as a geo node, having the same basic nodes available in all node trees is a nice thing to have. Renames "Time" node to "Time Curve", this is done to avoid confusion between the Time node and the Scene Time node. Reviewed By: jbakker Maniphest Tasks: T94603 Differential Revision: https://developer.blender.org/D13762
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:float2) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the blender::math namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: float3::reflect()). Upsides: - Still support .x, .y, .z, .w for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call len_squared_v3v3 in math::length_squared() and call it a day. - Type cast does not work with the template version of the math:: vector functions. Meaning you need to manually cast float * and (float *)[3] to float3 for the function calls. i.e: math::distance_squared(float3(nearest.co), positions[i]); - Some parts might loose in readability: float3::dot(v1.normalized(), v2.normalized()) becoming math::dot(math::normalize(v1), math::normalize(v2)) But I propose, when appropriate, to use using namespace blender::math; on function local or file scope to increase readability. dot(normalize(v1), normalize(v2)) Consideration: - Include back .length() method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches delaunay_2d.cc and the intersection code. I would like to know @Howard Trickey (howardt) opinion on the matter. - The noexcept on the copy constructor of mpq(2|3) is being removed. But according to @Jacques Lucke (JacquesLucke) it is not a real problem for now. I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: http://developer.blender.org/D13791
2022-01-12Cleanup: make formatDalai Felinto
2022-01-12Fix T94797: crash when playing animation in eevee rendered viewJacques Lucke
The issue was caused by rBd09b1d2759861aa012ab2e7e4ce2ffa2. Since this commit, the image users in gpu materials were updated during depsgraph evaluation as well. However, there was a race condition when one thread is deleting gpu materials in `BKE_material_eval` while another thread is updating the image users at the same time. The solution is to make sure that deleting gpu materials is done before iterating over all gpu materials, by adding a new depsgraph relation.
2022-01-12Fix T94812: render layer sockets are missing after file loadJacques Lucke
The main issue was the use of `G_MAIN` during file load. This patch refactors the code so that iterating over `G_MAIN` is not necessary anymore. See D13800 for more details. Differential Revision: https://developer.blender.org/D13800
2022-01-12Fix T94041: Loading a new file gives crash while rendering in viewportSergey Sharybin
The issue was caused by Cycles display driver not being able to restore window's OpenGL context after disposing Cycles-side OpenGL context. This is due to the window OpenGL re-activation needing to access window manager which gets cleared out form global main during file reading. Defer clearing window manager from the global main to until after all screens are "exited". This allows Cycles to properly stop rendering, dispose its OpenGL context, and restore window's drawable context. It is unclear why it was required to clear window manager list early on. Guess is that it comes from an original code in a1c8543f2ac where there was an early return which then got replaced with an actual logic without changing the order of de-initialization and window manager list clear. Differential Revision: https://developer.blender.org/D13799
2022-01-12CMake: exclude linker options for APPLE and non-UNIXCampbell Barton
These are only used for non-apple unix systems.
2022-01-12Revert "Cleanup GPencil strength previous commit"Antonio Vazquez
This reverts commit e339946515b00bc230bad2ec52a729dd914a8af3. This broken the tablet pressure and it was impossible to set a proper strength.
2022-01-12Cleanup: use utility functionsKévin Dietrich
2022-01-12Fix T89542: Crash when loading certain .hdr filesJesse Yurkovich
The direct cause of the bug in question was passing in the raw memory buffer to sscanf. It should be called with a null-terminated buffer; which isn't guaranteed when blindly trusting the file data. When attempting to fuzz this code path, a variety of other crashes were discovered and fixed. Differential Revision: https://developer.blender.org/D11952
2022-01-12Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
2022-01-12Cleanup: VSE channel drawingRichard Antalik
Remove code that very slightly darkened line on bottom of timeline, when backdrop is enabled. Purpose of the code wasn't dodumented, and 2.79 doesn't seem to produce this darkened line. Rename drawing functions to appropriate names.
2022-01-12deps_builder: GMP 6.2.1Ray Molenkamp
Pretty straightforward update, nothing noteworthy to report. Differential Revision: https://developer.blender.org/D13278 Reviewed by: brecht, sybren
2022-01-12BLF: UI_fontstyle_draw UsageHarley Acheson
Add maximum string length argument to UI_fontstyle_draw to reduce usage of BLF_DRAW_STR_DUMMY_MAX. Reorders arguments to UI_fontstyle_draw_ex See D13794 for more details. Differential Revision: https://developer.blender.org/D13794 Reviewed by Campbell Barton
2022-01-12BLF: Reduction of use of BLF_DRAW_STR_DUMMY_MAXHarley Acheson
Reduction of the number of uses of the define BLF_DRAW_STR_DUMMY_MAX by using actual sizes of static character arrays. See D13793 for more details. Differential Revision: https://developer.blender.org/D13793 Reviewed by Campbell Barton
2022-01-12Fix T94751: ground created by Setup Tracking Scene not marked as Shadow CatcherGermano Cavalcante
Change that was missing in {rBca64bd0aacda}.
2022-01-12Cleanup: Fix build warning with MSVCRay Molenkamp
comparing a bool > 0 make MSVC emit warning C4804: '>': unsafe use of type 'bool' in operation. int does the job nicely.
2022-01-12Build: Enable unity build for `bf_compositor`Aaron Carlisle
Blender's compositor code already makes extensive use of namespace which makes it very simple to enable unity build. There was one duplicated function that has since to be moved to a common header. I saw roughly a 3x speedup of bf_compositor using ninja on linux using i5 8250u (1:34 down to 0:34). Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D13792