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
path: root/source
AgeCommit message (Collapse)Author
2021-08-26Simplified runtime node type definition.temp-runtime-node-defLukas Tönne
2021-08-25Merge branch 'master' into temp-runtime-node-defLukas Tönne
2021-08-25Correct error in 38630711a02e553f209ace9a8627a7a851820a2dCampbell Barton
2021-08-25BLI_string_utf8: remove unnecessary utf8 decoding functionsCampbell Barton
Remove BLI_str_utf8_as_unicode_and_size and BLI_str_utf8_as_unicode_and_size_safe. Use BLI_str_utf8_as_unicode_step instead since it takes a buffer bounds argument to prevent buffer over-reading.
2021-08-25BLI_string_utf8: simplify utf8 stepping logicCampbell Barton
There were multiple utf8 functions which treated errors slightly differently. Split BLI_str_utf8_as_unicode_step into two functions. - BLI_str_utf8_as_unicode_step_or_error returns error value when decoding fails and doesn't step. - BLI_str_utf8_as_unicode_step always steps forward at least one returning the byte value without decoding (needed to display some latin1 file-paths). Font drawing uses BLI_str_utf8_as_unicode_step and no longer check for error values.
2021-08-25Cleanup: Use shorter enum item namesHans Goudey
2021-08-25LineArt: Fix (Unreported) Crash when loading objects.YimingWu
Fix mesh freeing call for obi->original_me so the address is correct.
2021-08-25Cleanup: Remove unecessary variablesHans Goudey
Instead of passing separate booleans for whether to store the locations and distances, check if the spans are empty. And instead of passing a separate boolean for whether there is valid tree data, pass a pointer to the data.
2021-08-24Fix T90900: Crash when rendering geometry nodes created curveHans Goudey
The comment for data_eval mentions that it should contain a mesh for curve objects, however with geometry nodes, objects can evaluate to curves as well (though they are only containers for the `CurveEval`. That is a larger issue, but with the upcoming geometry instancing patch the situation changes, so this commit does not correct that. I also hope to remove this code in favor of the new curve to mesh code soon. Instead, just check the evaluated data type in this case, which prevents the crash, though it is hacky.
2021-08-24Cleanup: Make function static, remove unused argumentsHans Goudey
2021-08-24Nodes: Improvements to edge panning in the node editor.Lukas Tönne
- New operator property to toggle edge panning in the keymap: This is disabled by default to avoid edge-panning in cases where it gets distracting, such as adding a new node. Only the explicit translate operator(s) (GKEY or drag) have this enabled now. - Restore the initial view rect on edge pan cancel: The initial view rect is now stored in the edge pan operator data. When an operator with edge panning is cancelled it can now call the `UI_view2d_edge_pan_cancel` function to restore the original View2D rect. - Less delay in node editor scrolling: Delay is useful when scrolling through long lists, such as in the outliner, but makes node scrolling feel sluggish and unresponsive. The lower scroll speed here makes a faster response the better option. - Zoom influence feature: Somewhat slower scrolling in UI-space when zoomed out. With the 0.5 zoom influence factor nodes behave as if zoom factor is halved, otherwise it gets too fast when zoomed out. Previously scrolling would always be constant-speed in UI space, now it's half-way between UI space and node (view) space.
2021-08-24Fix T90715: Remove correct particle modifier through Python APIRobert Guetzkow
Before this patch attempting to remove a particle modifier programmatically through Python would fail, because it deleted the modifier associated with the currently active particle system instead of the one passed as an argument to `bpy.types.ObjectModifiers.remove()`. This fix adds an additional argument for the particle system to `object_remove_particle_system`. This allows to specify which particle system and its associated modifier shall be removed. In case of `particle_system_remove_exec` it will remain the currently active particle system, whereas `object_remove_particle_system` passes the particle system of the modifier. Hence, the correct modifier will be removed. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D12234
2021-08-24Cleanup: ID management: Remove useless internal for ↵Bastien Montagne
`BKE_lib_id_clear_library_data`. This static internal `_ex` function was not doing anything extra, just move back whole code to public API `BKE_lib_id_clear_library_data`.
2021-08-24Cleanup: Remove useless Camera `make_local` callback.Bastien Montagne
Not sure why this one was still there, probably just escaped a previous cleanup somehow.
2021-08-24Cleanup: Simplify logicHans Goudey
2021-08-24Render: Lazily allocate render passes pixels storageSergey Sharybin
The idea is to only allocate pixel storage only when there is an actual data to be written to them. This moves the code forward a better support of high-res rendering when pixel storage is not allocated until render engine is ready to provide pixel data. Is expected to be no functional changes for neither users no external engines. The only difference is that the motion and depth passes will be displayed as transparent for until render engine provides any tile result (at which point the pixels will be allocated and initialized to infinite depth). Differential Revision: https://developer.blender.org/D12195
2021-08-24FFMPEG: Fix building with older versions that need ↵Sebastian Parborg
FFMPEG_USE_DURATION_WORKAROUND
2021-08-24Disable Fade Inactive Geometry overlay by defaultPablo Dobarro
This overlay was intended to identify the active objects in modes like Sculpt Mode, where you don't have any extra visual indication of what is the current and target object when switching directly between them. After having flash on mode transfer on the transfer mode operator, the visual information this overlays provides is redundant. It is still available in case some users want to use it like a way of focusing on the active object. Reviewed By: JulienKaspar, JacquesLucke Differential Revision: https://developer.blender.org/D12303
2021-08-24Fix T90840: Can't duplicate or copy (Ctrl-C) object from linked file.Bastien Montagne
We need to separate the flag telling duplicate code to not handle remapping to new IDs etc., from the one telling the code that we are currently duplicating a 'root' ID (i.e. not a dependency of another duplicated ID). This whole duplicate code/logic is still fairly unsatisfying, think it will need further refactor, or maybe even re-design, at some point...
2021-08-24Fix invalid mask use for the UV-project modifierCampbell Barton
Mistake in a30a8179331d689c9e599fb9a530c0b6b155f689.
2021-08-24PyAPI: remove active area test for script.python_file_run operatorCampbell Barton
There is no reason running a Python file should require an active area.
2021-08-24Fix buffer size mismatch in SCRIPT_OT_python_file_runCampbell Barton
Reading paths over 512 bytes would cause a buffer overrun.
2021-08-24Fix reporting Python reference leaks with WITH_PYTHON_SAFETYCampbell Barton
Error in f3e26c847b6ba0924cfd02641345164c54234425
2021-08-24Fix BLI_str_utf8_as_unicode_step reading past intended boundsCampbell Barton
Add a string length argument to BLI_str_utf8_as_unicode_step to prevent reading past the buffer bounds or the intended range since some callers of this function take a string length to operate on part of the string. Font drawing for example didn't respect the length argument, potentially causing a buffer over-read with multi-byte characters that could read past the end of the string. The following command would read 5 bytes past the end of the input. `BLF_draw(font_id, (char[]){252}, 1);` In practice strings are typically null terminated so this didn't crash reading past buffer bounds. Nevertheless, this wasn't correct and could cause bugs in the future. Clamping by the length now has the same behavior as a null byte. Add test to ensure this is working as intended.
2021-08-24Cleanup: spellingCampbell Barton
2021-08-24Cleanup: quiet clang-format warnings, unused argumentCampbell Barton
2021-08-24VSE: Add Sequence.parent_meta() python API functionFélix
This function can be used to find metastrip parent of nested strip. Reviewed By: ISS Differential Revision: https://developer.blender.org/D11985
2021-08-24VSE: Cleanup speed effect mathRichard Antalik
Simplify logic of speed effect frame calculation by using discrete math where possible. Only `SEQ_SPEED_MULTIPLY` mode with animation requires frame map to be built. Frame map building was simplified by removing unused branches. Functional change: Animating strip in negative range will reverse playback. I assume this was limitation of previous system, where each frame map item was limited to be within correct frame range. Now frame map can contain values that point beyond usable range and they are limited by `seq_speed_effect_target_frame_get`. This way it is possible to control playback rate in both directions. Mostly fixes T89120 apart from offset handling. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11939
2021-08-24Fix T88237: Prefetch crash on rendering scene stripRichard Antalik
Prefetch needs to avoid rendering scene strips, because - Rendering in background needs own dependency graph, which fails to initialize from evaluated data. - This locks UI and can make it unresponsive for long time periods. In T88237 prefetch failed to avoid scene strip, because of effect strip was attached to scene strip. Ensure, that no effect that is attached to scene strip either directly or indirectly would be rendered. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11247
2021-08-24Fix T90407: Split fails on transition stripsRichard Antalik
When splitting strips, first they are duplicated and then offsets adjusted. This can fail on cross transitions, because some strips don't overlap with split frame. All strips, that relate to each other must be duplicated to ensure correct relations after splitting, so solution is to delete non overlapping strips from left or right side respectively. Since cross transition don't have to overlap with source strips, splitting such strips would lead to effect being deleted, which could cause crash when iterating over strips in python. Therefore splitting of such strips is now forbidden and will generate error. Splitting of transition will also generate error solely because such operation is illogical. Reviewed By: sergey Differential Revision: https://developer.blender.org/D12121
2021-08-24Fix T90646: VSE hangs when strips overlapRichard Antalik
When all strips are selected and overlap is caused, this causes VSE to hang in infinite loop, because such situation should never happen. To prevent infinite loop, ensure, that strip overlap is not tested against single overlapping strip itself. Prevent overlap that can not be handled because of issue described above by moving overlapping strip between channels. Reviewed By: campbellbarton Differential Revision: D12209
2021-08-24Fix T90467: Initialize CurveMapping on demandRichard Antalik
`CurveMapping.evaluate` function expectes `CurveMapping` to be initialized, while this wasn't documented. I don't see any reason for not initializing `CurveMapping` on demand. Initialization was added in rBf16047c2df1e8be56bf76524f9eb1fa5ecde2176 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12145
2021-08-23Using relative threshold for floats in mesh comparisonHimanshi Kalra
Changes the threshold comparison from absolute to relative. Removes threshold for MLoopCol comparison. Adds a compare relative threshold function. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D12273
2021-08-23Cleanup: move the buffer list to 'MeshBufferCache'Germano Cavalcante
The cache is used to fill the buffer list.
2021-08-23Cleanup: Isolate the batch list struct into a struct called MeshBatchListGermano Cavalcante
This allows for a simplification of macros and combines with `MeshBufferList`.
2021-08-23Cleanup: rename 'MeshBufferExtractionCache' to 'MeshBufferCache'Germano Cavalcante
Matches the existing `MeshBatchCache`.
2021-08-23Cleanup: rename 'MeshBufferCache' to 'MeshBufferList'Germano Cavalcante
`MeshBufferList` is more specific and can avoid confusion with `MeshBufferExtractionCache`.
2021-08-23Cleanup: Move 'tris_per_mat' member out of 'MeshBufferCache'Germano Cavalcante
`MeshBufferCache` is a struct representing a list of buffers. As such, `GPUIndexBuf **tris_per_mat` is out of place as it does not represent one of the buffers in the list. In fact this member should be close to `GPUBatch **surface_per_mat` as they are related. The code for dependencies between buffer and batch had to be reworked as it relies on the member's position. Differential Revision: https://developer.blender.org/D12227
2021-08-23Fix T89998: Cryptomatte node output values doubled with Multi-ViewManuel Castilla
When using a Cryptomatte node and selecting 2 views in Multi-View, its output values are doubled. When selecting 3 tripled and so on. This causes incorrect compositing results for all the views. The node creates an input operation for each rendered cryptomatte pass. In Multi-View, passes are rendered for each view but compositor is executed per view and should only create operations for those corresponding to the current view being executed. Otherwise duplicated operations add up later in cryptomatte operation. Reviewed By: jbakker Maniphest Tasks: T89998 Differential Revision: https://developer.blender.org/D12216
2021-08-23Compositor: Fix crash enabling buffer groups on full frameManuel Castilla
Full frame doesn't support this option as all operations are already buffered. UI option will be removed in the future.
2021-08-23Compositor: Fix incorrect copying of uchar buffersManuel Castilla
Row stride and the area x coordinate offset were not taken into account.
2021-08-23Compositor: Full frame matte nodesManuel Castilla
Adds full frame implementation to Channel Key, Chroma Key, Color Key, Color Spill, Cryptomatte, Difference Key, Distance Key, Keying, Keying Screen and Luminance Key nodes. The other nodes in "Matte" sub-menu are submitted separately. No functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12220
2021-08-23Compositor: Full frame Bokeh Blur and Blur nodesManuel Castilla
Adds full frame implementation to these nodes operations. When enabling "extend bounds" node option, tiled implementation result is slightly different because it's using `TranslateOperation` with bilinear sampling for centering. Full frame always uses nearest to don't lose image quality. It has the disadvantage of causing image jiggling on backdrop when switching size values as it's not pixel perfect. This is fixed by rounding to even. No functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12167
2021-08-23Compositor: Full frame distort nodesManuel Castilla
Adds full frame implementation to "Displace", "Crop", "Flip", "Plane Track Deform", "Corner Pin", "Movie Distortion", "Lens Distortion" and "Map UV" nodes. The other nodes in "Distort" sub-menu are implemented separately in other commits. No functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12166
2021-08-23Compositor: Full frame transform nodesManuel Castilla
Adds full frame implementation to "Rotate", "Transform" and "Stabilize2D" nodes. To avoid sampling twice when concatenating scale and rotate operations, a `TransformOperation` is implemented with all the functionality. The nodes have no functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12165
2021-08-23Compositor: Add sampling methods for full frameManuel Castilla
Current sampling methods have off by one issues on full frame: - Bilinear sampling do not fully sample bottom and left image border, creating edges. - Single elem buffers are not sampled at all when they should be at least on the borders to smooth edges. - EWA filtering is partially implemented on `ReadBufferOperation`, it needs to be moved to `MemoryBuffer` on full frame. In order to not affect tiled implementation, this commit creates specific sampling methods for full frame needs. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12164
2021-08-23Compositor: Full frame convert nodesManuel Castilla
Adds full frame implementation to all nodes in "Converter" sub-menu except "ID Mask" which is implemented separately. No functional changes. Part of T88150. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12095
2021-08-23Fix T88107: rename Convertor to Converter nodes to correct spellingJames Partsafas
Differential Revision: https://developer.blender.org/D11198
2021-08-23Cleanup: rename parameter in transform utilityGermano Cavalcante
`inv_unit_scale` is not descriptive.
2021-08-23Fix T90872: Dopesheet messes up keyframe handlesGermano Cavalcante
Y coordinate was not being constrained. Caused by {rBb0d9e6797fb866e7a58876c7977c98a190070310}