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-03-25UI: remove non-unicode font and simplify default font loading codeBrecht Van Lommel
There is no need to have another font embedded in the Blender executable, we can assume the bundled font exists. In the future we may provide a fallback if the font specified by the user in the preferences is missing a character, but that can use our bundled international font. Differential Revision: https://developer.blender.org/D6854
2020-03-25UI: always use international fontBrecht Van Lommel
This means Blender can display more text correctly without having to enable user interface translation. Previously the quality of the font was lower, but that has been fixed now. The font files have now been ungzipped, which results in faster file loading as Freetype can read only the parts of the file that it needs. Blender download size should not increase since the release package is compressed. This includes improvements for Cyrillic characters from the latest DejaVu Sans fonts from D6960, contributed by Harley Acheson. Fixes T74097. Differential Revision: https://developer.blender.org/D6854
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-11GPU: minor changes to support standalone GHOST buildsCampbell Barton
- Move gpuPush/Pop from GPU_draw.h into GPU_state.h as this is for pushing/popping state. - Add 'GPU_STANDALONE' define, to bypass use of user-preferences for theme colors and pixelsize, as well as pbvh init/free functions. Needed to get GHOST tests working again.
2020-03-02Cleanup: make blf header work in C++Jacques Lucke
2020-02-27Fix T74228, T74246: Strange CharactersGermano Cavalcante
The glyph can come from a different cache.
2020-02-24BLF: Optimize text rendering and cachingGermano Cavalcante
The current code allocates and transfers a lot of memory to the GPU, but only a small portion of this memory is actually used. In addition, the code calls many costly gl operations during the caching process. This commit significantly reduce the amount of memory by allocating and transferring a flat array without pads to the GPU. It also calls as little as possible the gl operations during the cache. This code also simulate a billinear filter `GL_LINEAR` using a 1D texture. **Average drawing time:** |before:|0.00003184 sec |now:|0.00001943 sec |fac:|1.6385156675048407 **5 worst times:** |before:|[0.001075, 0.001433, 0.002143, 0.002915, 0.003242] |now:|[0.00094, 0.000993, 0.001502, 0.002284, 0.002328] Differential Revision: https://developer.blender.org/D6886
2020-02-15Fix T73763: Laggy when zooming a node editor with International Fontsmano-wii
Two main reasons for the lag: - Allocation of memory with transfer to GPU. - BLF_cache_clear(); The (partial) solution is to avoid memory allocating in some setups through the `GPU_texture_clear`. Differential Revision: https://developer.blender.org/D6837
2020-02-15Revert "Fix T73763: Laggy with nodes Editor + International Fonts"Clément Foucault
This reverts commit a21f5ec56245f7f1fbede4aa3c140a582c3a6a1b.
2020-02-14Fix T73763: Laggy with nodes Editor + International Fontsmano-wii
Two main reasons for the lag: - Allocation of memory with transfer to GPU. - BLF_cache_clear(); The memory allocation seems to be unnecessary, so I removed it. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6837
2020-01-23Merge branch 'blender-v2.82-release'Sergey Sharybin
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
2020-01-20Cleanup: use existing helper for float to uchar color conversionJames Fulop
Differential Revision: https://developer.blender.org/D6617
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-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-11-22Fix T71273: Bad encoding of utf-8 for Text objectsmano-wii
`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits which is not the case on windows. The solution is to replace `wchar_t` with `char32_t`. Thanks to @robbott for compatibility on macOS. Differential Revision: https://developer.blender.org/D6198
2019-10-17Cleanup: spellingCampbell Barton
Also remove historic bftgl reference.
2019-09-14BLF: make library glyph cache handling thread-safeRichard Antalik
Functions that utilize glyph cache should lock and unlock cache by calling `blf_glyph_cache_acquire()` and `blf_glyph_cache_release()`. Function `blf_glyph_cache_acquire()` will create glyph cache, if it doesn't exist. Locking mutex is global and shared by all fonts. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5701
2019-09-13Cleanup: compiler warningsBrecht Van Lommel
2019-09-13Cleanup: unused headers (GPU)Campbell Barton
2019-08-30Cleanup: 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-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-24Fix T67117: Font thumbnails crash to desktopSebastian Parborg
We were missing a null pointer check for invalid fonts.
2019-05-02BLF: pass code-point to BLF_has_glyphCampbell Barton
Avoid BLF having to be concerned with decoding the string (which can fail). Also remove redundant extra zero byte from strings.
2019-05-01UI: use Mac key symbols in menus on macOS, instead of text like "Cmd"Harley Acheson
On Windows "Cmd" is also replaced with "Win". Differential Revision: https://developer.blender.org/D4689
2019-04-29Cleanup: comments (long lines) in misc librariesCampbell Barton
2019-04-24Cleanup: sort CMake include pathsCampbell Barton
2019-04-22Cleanup: style, use braces for blenfontCampbell Barton
2019-04-21Cleanup: comments (long lines) in avi, blf & bltCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-16CMake: add library deps to CMakeLists.txtCampbell Barton
Tested to work on Linux and macOS. This will be enabled once all platforms are verified. See D4684
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
2019-04-14Cleanup: doxy commentsCampbell Barton
Use doxy references to function and enums, also correct some names which became out of sync.
2019-03-26Fix T62887: When searching for fonts, thumbnail display mode will crash BlenderSebastian Parborg
We do not support special color fonts (like colored emoji fonts), so don't crash when trying to create a preview for unsupported fonts. Reviewed By: Brecht Differential Revision: http://developer.blender.org/D4590
2019-03-20Fix T62678: better glyph clipping testJacques Lucke
Reviewers: billreynish, brecht Differential Revision: https://developer.blender.org/D4550
2019-03-19Cleanup: comment blocksCampbell Barton
2019-03-17Fix T62678: Wrong text clippingJacques Lucke
There are two issues at play here. First, BLF_width computed a width that was not wide enough to actually hold the text. Second, blf_glyph_calc_rect_test computed an incorrect rect->xmax when the glyph was moved to the left a bit. We ignore the overlap on the left, but the right side should still be adjusted accordingly.
2019-03-14Fix T61300: First letter truncatedJacques Lucke
The main problem was that the character `J` has "negative kerning". It was cut off because it started outside of the clipping rectangle. Reviewers: brecht Differential Revision: https://developer.blender.org/D4513
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-26Correct build error removing includesCampbell Barton
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-23Cleanup: use eGPU prefix for GPU enum typesCampbell Barton
2019-01-22Cleanup: Remove unused variableSergey Sharybin
2019-01-22Cleanup: minor changes to reduce code duplicationCampbell Barton
D4236 by @sobakasu w/ edits.
2019-01-22Cleanup: de-duplicate font loading codeCampbell Barton
Part of D4236 by @sobakasu