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-27GLFramebuffer: Add assert to check if framebuffer has the expected dataClément Foucault
It came to light that there is no error checking when trying to read a framebuffer plane without anything attached to it.
2022-01-27USD Preview Surface material export.Michael Kowalski
Add `USD Preview Surface From Nodes` export option, to convert a Principled BSDF material node network to an approximate USD Preview Surface shader representation. If this option is disabled, the original material export behavior is maintained, where viewport setting are saved to the Preview Surface shader. Also added the following options for texture export. - `Export Textures`: If converting Preview Surface, export textures referenced by shader nodes to a 'textures' directory which is a sibling of the USD file. - `Overwrite Textures`: Allow overwriting existing texture files when exporting textures (this option is off by default). - `Relative Texture Paths`: Make texture asset paths relative to the USD. The entry point for the new functionality is `create_usd_preview_surface_material()`, called from `USDAbstractWriter::ensure_usd_material()`. The material conversion currently handles a small subset of Blender shading nodes, `BSDF_DIFFUSE`, `BSDF_PRINCIPLED`, `TEX_IMAGE` and `UVMAP`. Texture export is handled by copying texture files from their original location to a `textures` folder in the same directory as the USD. In-memory and packed textures are saved directly to the textures folder. This patch is based, in part, on code in Tangent Animation's USD exporter branch. Reviewed By: sybren, HooglyBoogly Differential Revision: https://developer.blender.org/D13647
2022-01-27Fix crash on older platform due to unsupported clear commandClément Foucault
Clearing using GPU_texture_create_2d for unorm texture needs to use GPU_DATA_FLOAT to match the conversion requirements.
2022-01-27Cleanup: Fix const correctness warningClément Foucault
2022-01-27Cleanup: Add more const correctness to some functionsClément Foucault
These are functions that are used by eevee-rewrite which has more strict const correctness.
2022-01-27GPUShaderCreateInfo: Add optionnal check for optimized out resourcesClément Foucault
This opt-in functionnality enabled developper keep track of unused resources present in the `GPUShaderCreateInfo` descriptors of their shaders. The output is pretty noisy at the moment so we do not enforce its usage.
2022-01-27GPUShaderCreateInfo: Remove push_constant indexingClément Foucault
This is too much impractical and offers no real benefit.
2022-01-27Geometry Nodes: String to Curves Line/Pivot PointErik
Adds two new attribute outputs: "Line" outputs the line number of the character. "Pivot Point" outputs the selected pivot point position per char. Some refactoring of the text layout code. Differential Revision: https://developer.blender.org/D13694
2022-01-27Cleanup: Workbench: Remove extern shader stringsClément Foucault
This is not needed anymore with the new dependency system.
2022-01-26Cleanup: Move specific node tree execution functions into respective moduleAaron Carlisle
`node_exec` had some code that was specific to texture/shader nodes. These functions arent used outside there module so limit there declarations. Also make a function static that is only used in `node_exec.c` Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13899
2022-01-26Geometry Nodes: Add or improve various socket descriptionsHans Goudey
2022-01-26Cleanup: Remove RNA data from TreeElement, get via type specific classJulian Eisel
The `TreeElement.rnaptr` was only needed for RNA tree-elements. Now it can be gotten through the new type specific classes, e.g. `TreeElementRNAProperty.getPointerRNA()`.
2022-01-26Cleanup: Improve function name, introduced in own recent commitJulian Eisel
I prefer it this way around now, especially since I'm adding a `getPointerRNA()` too. Good to keep it match the actual struct names.
2022-01-26Cleanup: Small improvements to Outliner RNA path build functionJulian Eisel
Smaller cleanups to improve readability of a complex function.
2022-01-26Fix incorrect index-key in RNA path built from OutlinerJulian Eisel
Bug introduced in 7cbcfb7f492d.
2022-01-26Cleanup: Reduce `void *` reliance of new RNA C++ Outliner elementsJulian Eisel
Continuation of the previous commit, this time addressing the same for RNA tree-elements.
2022-01-26Cleanup: Reduce `void *` reliance of new sequencer C++ Outliner elementsJulian Eisel
Plan is to remove things like `TreeElement.directdata` and to instead expose specific queries in the new type specific tree-element classes. e.g. like here: `TreeElementSequence.getSequence()` For now uses `tree_element_cast<>()` to get the new type specific tree-element, later these should replace `TreeElement` all together.
2022-01-26Outliner: Function to "cast" C-style TreeElement to typed C++ pendantJulian Eisel
Add function to safely request the type-specific C++ element from a C-style `TreeElement`. Looks like this: ``` TreeElementFoo *te_foo = tree_element_cast<TreeElementFoo>(te); ``` The "cast" will return null if the tree-element doesn't match the requested type. This is useful for the transition from the C-style type to the new ones.
2022-01-26Outliner: Port sequencer elements to new tree-element designJulian Eisel
Continuation of work started in 2e221de4ceee and 249e4df110e0. Adds new tree-element classes for sequences, strips and strip duplicates.
2022-01-26Outliner: Add missing sanity checks for RNA tree-elementsJulian Eisel
Forgot to add these in 9bce134e56c2. Also tweaked assert to print a message that was previously communicated via a comment only.
2022-01-26DRW: Fix builtin uniform name mismatchClément Foucault
This lead to severe unreported regression, like volume rendering broken in workbench.
2022-01-26Cleanup: GPUShaderShared: Complete vector supportClément Foucault
Move some declaration from `GPU_shader_shared.h` to the main common file and add missing vector declarations.
2022-01-26GPUShader: Add GLSL source modification pass to support enumsClément Foucault
This uses a light parser / string modification pass to convert C++ enum declaration syntax to GLSL compatible one. GLSL having no support for enums, we are forced to convert the enum values to a series of constant uints. The parser (not really one by the way), being stupidly simple, will not change anything to the values and thus make some C++ syntax (like omitting the values) not work. The string replacement happens on all GLSL files on startup. I did not measure significant changes in blender startup speed. There is plans to do all of this at compile time. We limit the scope of the search to `.h` and `.hh` files to prevent confusing syntax in `.glsl` files. There is basic error reporting with file, line and char logging for easy debuggabiliy. The requirements to use this enum sharing system are already listed in `gpu_shader_shared_utils.h` and repeated on top of the preprocessor function.
2022-01-26BLI_string_ref: Add back missing rfind()Clément Foucault
Must have been removed in a bad merge or something.
2022-01-26Fix T95222: Crash selecting vertices with modifier applied on cageSergey Sharybin
Caused by 0f89bcdbebf where it was needed for cage and evaluated mesh to have same behavior in respect of having edit_mesh pointer assigned. This change makes it so that edit_data is not implied to exist when the edit_mesh pointer is not null. This was already the case in some other code.
2022-01-26LibOverride: Resync: Do not process overrides that should already have been ↵Bastien Montagne
resynced. Those cases are almost always synptoms of either bug in code, or broken files. Re-doin resync on them only costs time and causes extra trash data as a result, without really helping in any way.
2022-01-26Fix (unreported) missing 'override-exclusion' flag on new RNA mesh data ↵Bastien Montagne
accessors. Both new normals (from rBb7fe27314b25) and vpaint (from rBf7bbc7cdbb6c) RNA arrays were missing the `PROPOVERRIDE_IGNORE`. Those huge blobs of geometry data should never be processed by liboverride code.
2022-01-26Assets: enable node group assetsJacques Lucke
This enables support for node group assets. Previously, node group assets only worked when the "extended asset browser" experimental features is enabled. Differential Revision: https://developer.blender.org/D13748
2022-01-26Assets: allow creating preview image by rendering active objectJacques Lucke
For node groups there is no good default preview generation. Nevertheless, t would be useful to generate a preview image for a node group by rendering an object in some cases. This commit adds a new operator that allows updating the preview image for the active asset by rendering the active object. Note, the operator can also be used for other asset types, not just node groups. The operator can be found in a menu right below the refresh-preview button. Currently it is the only operator in that menu. In the future, more operators to create previews may be added. Differential Revision: https://developer.blender.org/D13747
2022-01-26Fix T94900: Fix drawing artifacts sequencer+node editor.Jeroen Bakker
The VSE and node editor only uses an overlay buffer to draw to the screen. The GPUViewport assumes that platforms clears all textures during creation, but they do not on selected platforms. What would lead to drawing from uncleared memory. This patch fixes this by clearing all viewport textures during creation.
2022-01-26D13910: Workbench: Port shaders to use GPUShaderCreateInfoClément Foucault
Also adds a few things to GPUShader for easily create shaders. Heavy usage of macros to compose the createInfo and avoid duplications and copy paste bugs. This makes the link between the shader request functions (in workbench_shader.cc) and the actual createInfo a bit obscure since the names are composed and not searchable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13910
2022-01-26Outliner: Port RNA elements to new tree-element designJulian Eisel
Continuation of work started in 2e221de4ceee and 249e4df110e0. Adds new tree-element classes for RNA structs, properties and array elements. This isn't exactly a copy and paste, even though logic should effectively be the same. Further cleanups are included to share code in a nice way, improve code with simple C++ features, etc.
2022-01-26ID: Fix failing test cases.Jeroen Bakker
This fixes failing test cases when using `make test`. See {D13615} for more information. The fix will perform the id remapping one item at a time. Although not really nice, this isn't a bottleneck. The failing test cases is because space_node stores pointers multiple times and didn't update all pointers. It was not clear why it didn't do it, but changing the behavior more to the previous behavior fixes the issue at hand. I prefer to remove the double storage of the node tree pointers (in snode and path) to reduce pointer management complexity.
2022-01-26Performance: Remap multiple items in UIJeroen Bakker
During sprite fright loading of complex scenes would spend a long time in remapping ID's The remapping process is done on a per ID instance that resulted in a very time consuming process that goes over every possible ID reference to find out if it needs to be updated. If there are N of references to ID blocks and there are M ID blocks that needed to be remapped it would take N*M checks. These checks are scattered around the place and memory. Each reference would only be updated at most once, but most of the time no update is needed at all. Idea: By grouping the changes together will reduce the number of checks resulting in improved performance. This would only require N checks. Additional benefits is improved data locality as data is only loaded once in the L2 cache. It has be implemented for the resyncing process and UI editors. On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went from 170 seconds to 145 seconds (during hotspot recording). After this patch has been applied we could add similar approach to references (references between data blocks) and functionality (tagged deletion). In my understanding this could reduce the resyncing process to less than a second. Opening the village production file between 10 and 20 seconds. Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`) * Master {F12769210 size=full} * This patch {F12769211 size=full} Reviewed By: mont29 Maniphest Tasks: T94185 Differential Revision: https://developer.blender.org/D13615
2022-01-26Revert "CMake: include BROTLI_LIBRARIES in FREETYPE_LIBRARIES on UNIX"Campbell Barton
This reverts commit 086f1911698154edd4cc19dc966e966bb0060917. There was apparently a problem using APPEND which wasn't referenced in the commit log. Added comment noting the reason for the discrepancy.
2022-01-26Gizmo: optimize intersection tests, fix selection biasCampbell Barton
Use more efficient logic for detecting when gizmos are under the cursor. Even though this isn't a bottleneck, it runs on cursor motion in the 3D viewport, so avoiding any lag here is beneficial. The common case for cursor motion without any gizmos was always drawing two passes (one small, then again if nothing was found). Now a single draw call at the larger size is used. In isolation this gives around 1.2x-1.4x speedup. When there are multiple gizmos a depth-buffer picking is used (similar to object / bone selection) which is more involved but still only performs 2x draw calls since the result is cached for reuse. See note in gizmo_find_intersected_3d for a more detailed explanation. Also restore the depth values in the selection result as they're needed for gizmos to use selection bias. Broken since support for GL_SELECT was removed.
2022-01-26Fix T94794: Gizmo selection doesn't pick the front-most gizmoCampbell Barton
Early on in 2.8x development gizmo-depth used GL_SELECT, which has been removed. Bind the depth buffer so occlusion queries use the front-most gizmo. While this report only mentions face-maps, gizmo depth was ignored in all cases. This wasn't noticeable in most cases though since the transform gizmo for example was placed so gizmos didn't overlap.
2022-01-26Fix error using GPU selection cache for selection pickingCampbell Barton
When calling GPU_select_cache_begin, checking the selection mode used the last used selection mode, not the one about to be used. Using border select, then picking would not use the selection cache. This wasn't noticeable by users as failing to use cache just completes the selection without it (drawing the depth buffer unnecessarily).
2022-01-26Cleanup: spelling in commentsCampbell Barton
2022-01-26Cleanup: unused variable warning, formattingCampbell Barton
2022-01-26CMake: include BROTLI_LIBRARIES in FREETYPE_LIBRARIES on UNIXCampbell Barton
This was already done for APPLE & WIN32, which would reference these libraries twice. Now append BROTLI_LIBRARIES to FREETYPE_LIBRARIES when they're required for linking. No functional changes as all references to FREETYPE_LIBRARIES also used BROTLI_LIBRARIES.
2022-01-26GLShader: Fix crash caused by redundant uniform declarationClément Foucault
This slipped through during a rebase.
2022-01-26Fix T94149: Incorrect sound strip lengthRichard Antalik
Fix formula in function `SEQ_sound_update_length`. Formula for sound strip length was changed in commit ded68fb1027, when strip is added to timeline, but it was not changed in function mentioned above.
2022-01-26Cleanup: Remove useless commentsHans Goudey
2022-01-26VSE: Build proxies only for slow moviesRichard Antalik
This change applies only for automatic proxy building, when strip is added to timeline. Manual building process is not affected. Don't build proxy file if movie is already fast enough to seek. To determine seek performance, check if whole GOP can be decoded in 100 milliseconds. To consider some variation in GOP size, large number of packets are read, assuming that each packet will produce 1 frame. While this is not technically correct, it does give quite accurate estimate of maximum GOP size. This test will ensure consistent performance on wide array of machines. Check should be done in order of few milliseconds. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11671
2022-01-25Fix T95169: Assert in weld modifier codeGermano Cavalcante
Return early before accessing the array when all edges are merged.
2022-01-25Cleanup: Remove leftover hair fade code in CyclesAaron Carlisle
Missed in rB1687903fb813f6656453fbc7c49237b06437370c
2022-01-25Workbench: Use GPU_ARB_gpu_shader5 instead of GL variantClément Foucault
This is to be able to turn off the extension usage on demand.
2022-01-25GLShader: Fix buffer overflow caused by workaround uniformClément Foucault
In order to use a workaround builtin uniform, we need to count it just like other uniforms and give it some space in the name buffer. This also fixes extensions being added after the uniform declaration. All `#extension` directives are now part of the gl backend.
2022-01-25Cleanup: Remove unused variableHans Goudey
Mistake in a18bd403bf3edb495ee05