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
2020-04-03Cleanup: use term 'attr' instead of 'attrib'Campbell Barton
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19ColorManagement: Incorrect Memory Read for RGB imagesJeroen Bakker
When RGB images or BW images are converted to a GPU texture and color space conversion was needed the images were read incorrectly. This patch checks the correct amount of channels in the image and uses that as the correct pixel stride.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Prepare for sorted headers on windowsRay Molenkamp
To prepare for D6811 small changes were needed. we can no longer undefine near/far since the windows headers use those extensively. some of the imbuf files need to include the windows headers explicitly to make sure it builds.
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
2020-03-06Cleanup: Fix forward declaration of headersDalai Felinto
2020-03-06Cleanup: move Alembic, AVI, Collada, and USD to `source/blender/io`Sybren A. Stüvel
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common `io` directory. This also cleans up some `#include "../../{somedir}/{somefile}.h"` by adding `../../io/{somedir}` to `CMakeLists.txt` and then just using `#include "{somefile}.h"`. No functional changes.
2020-03-06CodeCleanup: Added enums to opengl render functionsJeroen Bakker
Motivation the functions get 3 different kind of flag parameters (ImBuf, DrawType, OffscreenRendering) the naming of the flags were not clear, leading to mistakes and unnecessary time spend debugging.
2020-03-04Cleanup: replace CLAMP macros with functionsCampbell Barton
2020-03-02Cleanup: make remaining imbuf headers work in C++Jacques Lucke
2020-02-25GPU: Add Image property to allow high bitdepth support on a per image basisClément Foucault
This adds the `Half Float Precision` option in the image property panel. This option is only available on float textures and is enabled by default. Adding a flag inside the imbuf (IB_halffloat) on load is done for EXR and PSD formats that can store half floating point (16bits/channels). The option is then not displayed in this case and forced. Related task T73086 Reviewed By: brecht Differential Revision: https://developer.blender.org/D6891
2020-02-20Cleanup: remove use of 'register'Campbell Barton
This isn't needed with modern compilers.
2020-02-17ColorManagement: Dithering ImprovementClément Foucault
- Unlock property range. - Use triangular noise to keep perceptual noise error more uniform. Remap range to preserve perceptual intensity. - Center noise distribution around 0 for GPU implementation because of rounding. - Do dithering after merging overlays. Effect of using triangular noise is not really noticeable if you don't use really low bitdepth. But doing a test in the shader were we artificially reduce the bitdepth (`col = (col * 16) / 16;`) reveals the real difference. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6850
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-01-29Cleanup: minor style changes, use const vars for bmp.cCampbell Barton
2020-01-29imbuf: support writing grayscale BMP imagesJames Fulop
2020-01-27Fix OBJECT_GUARDED_FREE compiler error when type is in namespaceBrecht Van Lommel
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2019-12-12Add support for tiled images and the UDIM naming schemeLukas Stockner
This patch contains the work that I did during my week at the Code Quest - adding support for tiled images to Blender. With this patch, images now contain a list of tiles. By default, this just contains one tile, but if the source type is set to Tiled, the user can add additional tiles. When acquiring an ImBuf, the tile to be loaded is specified in the ImageUser. Therefore, code that is not yet aware of tiles will just access the default tile as usual. The filenames of the additional tiles are derived from the original filename according to the UDIM naming scheme - the filename contains an index that is calculated as (1001 + 10*<y coordinate of the tile> + <x coordinate of the tile>), where the x coordinate never goes above 9. Internally, the various tiles are stored in a cache just like sequences. When acquired for the first time, the code will try to load the corresponding file from disk. Alternatively, a new operator can be used to initialize the tile similar to the New Image operator. The following features are supported so far: - Automatic detection and loading of all tiles when opening the first tile (1001) - Saving all tiles - Adding and removing tiles - Filling tiles with generated images - Drawing all tiles in the Image Editor - Viewing a tiled grid even if no image is selected - Rendering tiled images in Eevee - Rendering tiled images in Cycles (in SVM mode) - Automatically skipping loading of unused tiles in Cycles - 2D texture painting (also across tiles) - 3D texture painting (also across tiles, only limitation: individual faces can not cross tile borders) - Assigning custom labels to individual tiles (drawn in the Image Editor instead of the ID) - Different resolutions between tiles There still are some missing features that will be added later (see T72390): - Workbench engine support - Packing/Unpacking support - Baking support - Cycles OSL support - many other Blender features that rely on images Thanks to Brecht for the review and to all who tested the intermediate versions! Differential Revision: https://developer.blender.org/D3509
2019-12-11Cleanup: spellingCampbell Barton
2019-11-27Curve: CurveMapping Extend OptionJeroen Bakker
Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-11-03Fix T68018: Crash on building movie proxyRichard Antalik
Skip building proxy if directory can not be created. Crash happens, when setting custom dir to location of source file itself. This results in attempt to create directory with the same name as source file. Differential Revision: https://developer.blender.org/D6148 Reviewed By: sergey
2019-10-15Fix image undo restoring float/byte tiles into the wrong buffer typeCampbell Barton
This also resolves the (unlikely) issue of undo having uninitialized zbuf data, now it's cleared instead.
2019-10-03Cleanup: unused structs, struct membersCampbell Barton
2019-10-03Fix assert in image cropCampbell Barton
2019-10-01Image: support storing full image buffers for each undo stepCampbell Barton
Update image undo to store buffers for each step: - Undo buffers share tiles to avoid using too much memory. - Undo support for different sized buffers allowing operations such as crop or resize. - Paint tiles have been split into separate API/storage. - Painting speed wont be impacted significantly since storing the extra tiles is done after the stroke & only for the first undo step. Resolves T61263, see D5939 for details.
2019-09-27Fix T70276: View animation with jpeg 2000 image will crash playerPhilipp Oeser
Since our ffmpeg is built with openjpeg support and thus can decode jpeg 2000 (in both J2K and JP2 codec flavors as well as high bitdepths), added these extensions to the supported list. Also IMB_ispic > IMB_ispic_type > imb_is_a_jp2 was only testing for jp2, now do both jp2/j2k. Reviewers: brecht Maniphest Tasks: T70276 Differential Revision: https://developer.blender.org/D5909
2019-09-25Cleanup: use const for image blending functionsCampbell Barton
2019-09-19Cleanup: rename anim::duration to anim::duration_in_framesSybren A. Stüvel
Units should be explicit, and not left to be guessed by the reader. The field is only used in a single C file, so it's a relatively low-risk change.
2019-09-19Fix T68091: Adding a corrupt video crashes/confuses BlenderSybren A. Stüvel
The problematic video from T68091 clearly has an invalid stream duration (it would be 55 centuries long if interpreted at 30 FPS, and given that it was recorded with an Android 9 device, it's unlikely that recording started that long ago). I've added a heuristic to check the stream duration against the container duration; if the stream is more than 4x longer than the container, Blender now falls back to the container duration. We could use MIN(stream duration, container duration), but there might be video files out there where the container duration is less precise than the stream duration; they are measured in different units of time (microseconds for the container vs. frames for the stream). Includes a unit test for the above heuristic. Reviewed by: jbakker Differential revision: https://developer.blender.org/D5853
2019-09-19Use FFmpeg's own `av_guess_frame_rate()` function instead of guessing ourselvesSybren A. Stüvel
This was introduced in FFmpeg lavf 55.1.100 in 2013. For systems that are still on LibAV or older FFmpeg there is a fallback implementation that performs the same guess as we did before in `av_get_r_frame_rate_compat()`.
2019-09-19Cleanup: don't index the same array multiple timesSybren A. Stüvel
There is now a clearer distinction between `video_stream` (the stream itself) and `video_stream_index` (its index), and no more repetition of accessing the same item of an array. This also makes the code a bit more readable in preparation for an upcoming functional change.
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-07Partially revert "Cleanup: use post increment/decrement"Campbell Barton
This partially reverts commit 0b2d1badecc48b5cbff5ec088b29c6e9acc5e1d0 Post increment can deep-copy for C++ iterators, while in my own checks GCC was able to optimize this to get the same output, better follow C++ best practice and use pre-increment for iterators.
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-09-07Cleanup: style, spellingCampbell Barton
2019-08-27Workbench: Specular Highlighting for MatCapsJeroen Bakker
With Blender 2.80 we introduced a more flexible matcap system. One change we did was to multiply the matcap with the base color that was shaded. As matcaps contains diffuse and specular lighting in a single texture this lead to rendering artifacts. Artists were complaining that everything looked to metalic. We now support a separate `diffuse` and `specular` pass for matcaps. `shaded_color = diffuse_light * base_color + specular_light` For matcaps to support this feature they need to be multilayer openexr files with 2 renderpasses (named `diffuse` and `specular`). In the future we can change this to first pass/second pass in stead of this naming convention. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5335
2019-08-16Cleanup: spellingCampbell Barton
2019-08-14Cleanup: move trailing comments to avoid wrapping codeCampbell Barton
Some statements were split across multiple lines because of their trailing comments. In most cases it's clearer to put the comments above.
2019-08-06Cleanup: use BKE_ prefix for BKE_colortools.hCampbell Barton
2019-08-01Cleanup: misc spelling fixes in variable names & definesCampbell Barton
T68045 by @luzpaz
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-07-31Spelling fixes in comments and descriptions, patch by luzpazBrecht Van Lommel
Differential Revision: https://developer.blender.org/D3744
2019-07-29Remove debug prints from previous commit.Bastien Montagne
Sorry for the noise...
2019-07-29Fix T67620: Font preview translations malfunction in Blender 2.8Bastien Montagne
We cannot reliably use translations API from non-main threads. Now storing translated strings in a static cache, with basic mechanism to update it on language change. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5350
2019-07-17Fix T66515, T67112, T61607: failure to read EXR files with single, named layerBrecht Van Lommel
Like Blender renders without a Z channel. The single layer case assume that channel names are just R/G/B/A without any layer name prefix, and would not read channels like "Image.R". Carefully tested for regressions with the openexr project tests images, so this should be safe.
2019-07-10Fix T66571: Unable to change input color space of PSDSergey Sharybin
Image reader must not override file's color space specification if it is already specified.