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-04-13Cleanup: use C++ comments for disabled codeCampbell Barton
Also ensure space around text in C-comment blocks.
2022-04-01Fix compositor memory leak after recent color management changesBrecht Van Lommel
2022-03-31Cleanup: spelling, trailing space for comment-blocksCampbell Barton
2022-03-25Cleanup: use count or num instead of nbrCampbell Barton
Follow conventions from T85728.
2022-03-22Cleanup: refactor passing of color management settings for image saveBrecht Van Lommel
Make a copy of ImageFormatData that contains the effective color management settings, and pass that along to the various functions. This will make it possible to add more complex logic later. For compositing nodes, passing along view and display settings through many functions made it harder to add additional settings, so just get those from the scene now. Differential Revision: https://developer.blender.org/D14401
2022-03-22Cleanup: add proper IMB_openexr.h instead of including file from intern/Brecht Van Lommel
2022-03-21Cleanup: add image_format.cc for functions related to ImageFormatDataBrecht Van Lommel
Also fixes missing code to read/write/free/copy color management settings in various places. This can't be set through the UI currently, but still should be handled consistently.
2022-03-21T84815: Missing preview image in compositing file output nodePierre Risch
Hello, I saw that this revision was stalled for a few months so I tried to update it. https://developer.blender.org/D10995 I added a function that adds a preview on the first connected input of the file output node. I removed the preview on the single layer format Thanks Reviewed By: #compositing, jbakker Maniphest Tasks: T84815 Differential Revision: https://developer.blender.org/D14219
2022-03-19Revert "Compositor: Support backdrop offset for the Viewer node"Brecht Van Lommel
This reverts commit 33409f9f1cd42e899f2706fe7878e5e89b50d617, as it breaks panning in the image editor. Fixes T96543
2022-03-17Compositor: Support backdrop offset for the Viewer nodeHabib Gahbiche
This is only part of the experimental "Full Frame" mode (disabled by default). See T88150. Currently the viewer node uses buffer paddings to display image offset in the backdrop as a temporal solution implemented for {D12466}. This solution is inefficient memory and performance-wise. Another issue is that the paddings are part the image when saved. This patch instead sets the offset in the Viewer node image as variables and makes the backdrop take it into account when drawing the image or any related gizmo. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12750
2022-03-16Cleanup: incorrect comments, use C commentsCampbell Barton
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-02-22Merge branch 'blender-v3.1-release'Campbell Barton
2022-02-22Cleanup: clang-formatCampbell Barton
2022-02-21Merge branch 'blender-v3.1-release'Habib Gahbiche
2022-02-21Fix T95413: Blur node size input crashHabib Gahbiche
Bug was introduced in D12167. Reading input size from an input socket is not possible in tiled compositor before execution is initialized. A similar change was done for the base class, see BlurBaseOperation::init_data(). Reviewed by: Jeroen Bakker Differential Revision: https://developer.blender.org/D14067
2022-02-18Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-18Fix T95809: Compositor Node not directly updated in image editor.Jeroen Bakker
Image wasn't tagged to be dirty.
2022-02-14Merge branch 'blender-v3.1-release'Jeroen Bakker
2022-02-14Fix T95699: Compostior backdrop not updated.Jeroen Bakker
The Viewer marked the gpu texture to be out of date. But it should have used the mark_full_update as the gpu textures are only used by the render/draw engines. The image/node editor uses the image engine that have its own GPU textures.
2022-02-11File headers: add missing copyright, add MIT to SPDX licensesCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-10Merge branch 'blender-v3.1-release'Sergey Sharybin
2022-02-10Fix strict warning initializing texture result in compositorSergey Sharybin
From a strict language point of view the code required a braces around `trgba` initialization. But it is easier to rely on the fact that fields which are not specified are zero-initialized.
2022-02-09Added a "Sharpen Less" kernel for the Filter Compositor nodeColin Basnett
Added a new "Sharpen Less" kernel to the filter compositor node. The intent here is to provide a much less aggressive sharpening filter that can't simply be solved by toning down the factor on the existing sharpen filter. The existing "Sharpen" filter uses a "box" kernel: ``` -1 -1 -1 -1 9 -1 -1 -1 -1 ``` The new "Sharpen Less" filter uses a "diamond" kernel: ``` 0 -1 0 -1 5 -1 0 -1 0 ``` The difference between the two is clear to see in the following side-by-side: {F12847431} Below shows the difference between the filtering kernels as applied to a B&W render of Suzanne with the UV grid as a texture. The left side of the render using the existing "Sharpen" filter, and the right side showing the new "Sharpen Less" filter. Notice that the left side is more aggressive in accentuating localized contrasts across the image. This can lead to what appears to be aliasing or striations in the resulting image: {F12847429} https://developer.blender.org/T95275 https://blender.community/c/rightclickselect/57Kq/?sorting=hot {F12847428} Reviewed By: #compositing, jbakker Differential Revision: https://developer.blender.org/D14019
2022-02-09Cleanup: use consistent copyright location, move descriptionsCampbell Barton
Order copyright immediately after the license block, this was done almost everywhere with a few exceptions. Remove authors from a few files (we had already removed "Contributors" section however with old patches being applied this gets added back in). Also move descriptive text into the doxygen comment block under \file. In some cases remove the text as it was accidentally copied.
2022-02-02Compositor: Combine and Separate XYZ NodeAaron Carlisle
We have this node for shader and geometry nodes. Compositor can also work with vectors, and this can help with that. Reviewed By: manzanilla Maniphest Tasks: T95385 Differential Revision: https://developer.blender.org/D12919
2022-01-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929
2022-01-28Remove compilation warnings TexResult.Jeroen Bakker
2022-01-25Cleanup: Correct location of node function declarationsHans Goudey
Currently there are many function declarations in `BKE_node.h` that don't actually have implementations in blenkernel. This commit moves the declarations to `NOD_composite.h`, `NOD_texture.h`, and `NOD_shader.h` instead. This helps to clarify the purpose of the different modules. Differential Revision: https://developer.blender.org/D13869
2022-01-24Cleanup: sort cmake file listsCampbell Barton
2022-01-14Fix possible build error with unity buildAaron Carlisle
`NodeOperationBuilder::Link` could conflict with the list base macros. To resolve this dont use `using Link`.
2022-01-13Cleanup: Run `make format`Julian Eisel
2022-01-13Fix compilation error caused by missing target relationRay Molenkamp
compositor depends on DNA now so that it can access offsets.
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-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: remove redundant const qualifiers for POD typesCampbell Barton
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
2022-01-12Build: Add precompiled headers for `bf_compositor`Aaron Carlisle
With this change, compilation saw a 2.4x improvement. This can be combined with unity build to give an overall 4x improvement Depends on D13797 Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D13798
2022-01-11Cleanup: Deduplicate `finv_test` functionAaron Carlisle
2022-01-10Compositing Convert color space nodeJeroen Bakker
Compositor node to convert between color spaces. Conversion is skipped when converting between the same color spaces or to or from data spaces. Implementation done for tiled and full frame compositor. Reviewed By: Blendify, jbakker Differential Revision: https://developer.blender.org/D12481
2022-01-10Cleanup: note that compositor vector blur shares logic with zbuf.cCampbell Barton
Note that some functions have been copied between these files. De-duplication isn't trivial as there are differences in some functions.
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2022-01-04Fix T90830: Crop node cropping is one pixel shortManuel Castilla
Currently the crop higher limits are inclusive too which contradicts the documentation as it says that if Left and Right are both 50, it will result in a zero-sized image. And the result is one pixel out of the crop gizmo, which is another hint that this is not intended. In "Full Frame" experimental mode it's two pixels short because of a misuse of `BLI_rcti_isect_pt` as it considers max limits inclusive. Reviewed By: jbakker Maniphest Tasks: T90830 Differential Revision: https://developer.blender.org/D12786
2021-12-25Cleanup: use new c++ guarded allocator APIAaron Carlisle
API added in rBa3ad5abf2fe85d623f9e78fefc34e27bdc14632e