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
2022-03-09Cleanup: rename wmEvent.prev_click_* to prev_press_*Campbell Barton
At the time of naming these members only some event types generated click events so it made some sense to differentiate a click. Now all buttons support click & drag it's more logical to use the prefix "prev_press_" as any press event will set these values. Also update doc-strings.
2022-03-09Fix T92331: Duplicated Window Should Not Be ModalHarley Acheson
Operator area_dupli_invoke should not create modal windows. See D14253 for details. Differential Revision: https://developer.blender.org/D14253 Reviewed by Brecht Van Lommel
2022-03-09Attributes: Implement CustomData interpolation for boolean data typeAleksi Juvani
This commit fixes an issue, where for instance, when merging vertices with the "Merge by Distance" geometry node, the resulting vertices had their boolean attributes set unpredictably. Boolean attributes are implemented as custom data, and when welding vertices, the custom data for the resulting vertices comes from interpolating the custom data of the source vertices. This commit implements the missing interpolation function for the boolean custom data type. This interpolation function is implemented in terms of the logical or operation, that is to say, if any of the source vertices (with a weight greater than zero) have the boolean set, the boolean will also be set on the resulting vertex. This logic matches 95981c9876483256b28. In geometry nodes, attribute interpolation generally does not use the CustomData API for performance reasons, but other areas of Blender still do. Differential Revision: https://developer.blender.org/D14172
2022-03-09Fix T96146: Subdivide curve node uninitialized dangling handlesHans Goudey
Handles of non-cyclic bezier curves were not initialized. Now properly copy the dangling handle positions and types from the source curve.
2022-03-09Event System: drag events no longer default to the drag start locationCampbell Barton
This avoids transform jumping which is a problem when tweaking values a small amount. A fix for T40549 was made box-select used the location when the key was pressed. While it's important for box-select or any operator where it's expected the drag-start location is used, this is only needed in some cases. Since the event stores the click location and the current location, no longer overwrite the events real location. Operators that depend on using the drag-start can use this location if they need. In some cases the region relative cursor location (Event.mval) now needs to be calculated based on the click location. - Added `WM_event_drag_start_mval` for convenient access to the region relative drag-start location (for drag events). - Added `WM_event_drag_start_xy` for window relative coordinates. - Added Python property Event.mouse_prev_click_x/y Resolves T93599. Reviewed By: Severin Ref D14213
2022-03-08Geometry Nodes: Tiny optimization to UV Sphere primitiveHallam Roberts
Prevents a few unneeded calls to `std::sin`, with an observed performance improvement of about 1 percent. Differential Revision: https://developer.blender.org/D14279
2022-03-08Cleanup: Clang tidyHans Goudey
2022-03-08Cleanup: Correct commentHans Goudey
Normals aren't stored in custom data anymore, nor are they stored in MVert for comparisons.
2022-03-08Merge branch 'blender-v3.1-release'Hans Goudey
2022-03-08Fix T95843: Invalid mesh runtime data after sculpt undov3.1.0Hans Goudey
When the geometry of the sculpt mesh was replaced when restoring from a full undo step, the runtime data was not cleared (including any normals, triangulation data, or any other cached derived data). In the report, only the invalid normals were observed. The fix is to simply clear these caches. Later they will be reallocated and recalculated if necessary. Since the whole mesh replaced here anyway, this should be a safe fix. Differential Revision: https://developer.blender.org/D14282
2022-03-08Blender 3.1 - version bump -> releaseThomas Dinges
2022-03-08Cleanup: Remove extra . at the end of RNA stringAntonio Vazquez
The strings must not end with point.
2022-03-08Cleanup: Use ELEM macroAntonio Vazquez
2022-03-08Cleanup: Make formatAntonio Vazquez
2022-03-08GPencil: New "Additive" mode for build modifierMarc Chéhab
The new mode only builds the new strokes in each frame. The code is assuming somebody uses "additive" drawing, so that each frame is different only in its NEW strokes. Already existing strokes are skipped. I used a simple solution: Count the number of strokes in the previous frame and ignore this many strokes in the current frame. Differential Revision: https://developer.blender.org/D14252
2022-03-08Geometry Nodes: fix spline length node after recent refactorJacques Lucke
Differential Revision: https://developer.blender.org/D14276
2022-03-08UI: Minor tweaks to IDTemplate operations.Bastien Montagne
2022-03-08LibOverride: Do not assert when root ID is not object/collection.Bastien Montagne
While uncommon, this is still a valid case...
2022-03-08Cleanup: fix compiler warningBrecht Van Lommel
2022-03-08Merge remote-tracking branch 'origin/blender-v3.1-release'Kévin Dietrich
2022-03-08Fix T96224: GPU subdiv crash with smooth normals and tangentsKévin Dietrich
Tangents are computed from UVs on the CPU side when using GPU subdivision and require that the normals are available there as well (at least for smooth shading, flat normals can be computed on the fly). This simply adds the missing normals update call for the `MeshRenderData` setup for the subdivision case. Differential Revision: https://developer.blender.org/D14278
2022-03-08GPU: disable compute shader for problematic driversKévin Dietrich
Some drivers for legacy platforms seem to have issues with compute shaders, as revealed by T94936. This disables compute shader for the known drivers where this issue is present. It is not clear if the issue is Windows only or not, so this disable them for all operating systems. See T94936 for a list of configurations where the issue is reproducible or not. Differential Revision: https://developer.blender.org/D14264
2022-03-08Simplify sound property handlingRichard Antalik
Sound properties like volume, pitch and muting are handled in `BKE_sound_add_scene_sound()`. This is unnecessary, because in properties are then set to real values in `SEQ_edit_update_muting()` and `seq_update_seq_cb()`. Alternatively, it may be better to remove all other updates leave them in `BKE_sound_add_scene_sound()`. But I want to add muting per channel, whhich is easier and probably cleaner to do with function `SEQ_edit_update_muting()`. Reviewed By: sergey Differential Revision: https://developer.blender.org/D14269
2022-03-08PyAPI: optimize depsgraph use in PyDriversCampbell Barton
Avoid re-creating & freeing the depsgraph for every driver evaluation. Now the depsgraph is kept in the name-space (matching self), only re-created when the value changes. In a contrived test-case with many drivers this gave ~15% overall speedup for animation playback.
2022-03-08Fix (unreported) liboverride rules from linked data disapearing.Bastien Montagne
Code cleaning up no-more-needed override data during diffing process would systematically remove override data from linked IDs. While this is not a critical issue in theory, it has bad consequences at the very least on user UI/UX, and potentially can cause bugs in some corner-cases scenarii.
2022-03-08LibOverrides: Tweak to ensure no overrides can be created on linked data.Bastien Montagne
Was already mostly the case, but from RNA API there was no proper check.
2022-03-08Fix memory leak evaluating PyDriversCampbell Barton
Missed decref in 686ab4c9401a90b22fb17e46c992eb513fe4f693 caused every driver evaluation to create the BPy_StructRNA depsgraph without freeing the previously allocated depsgraph.
2022-03-08Curves: add initial comb, grow and shrink brushJacques Lucke
The exact behavior of the brushes is still being iterated on, but it helps having a base implementation that we can work upon. All of that is still hidden behind an experimental feature flag anyway. The brushes will get a name in the ui soon. Differential Revision: https://developer.blender.org/D14241
2022-03-08Fix T96213: Crash when texture painting across multiple materials.Jeroen Bakker
Issue only happens in release builds on windows. That said it was an actual error in the code. This class is compiled inline in release builds. When updating multiple textures it would reuse the same memory to collect the changes. When the previous loaded tilenumber was exactly the same but from a different image the tile buffer wasn't loaded. Reviewed By: sergey Maniphest Tasks: T96213 Differential Revision: https://developer.blender.org/D14274
2022-03-08Curves: increase default viewport resolution for curves objectJacques Lucke
This part has to be refactored soon anyway, because more types curves have to be drawn for the new Curves object. For now, 3 is a better default than 2, because that matches the actual resolution of the curve currently.
2022-03-08Curves: disable stroke spacing for curve sculpt brushesJacques Lucke
This makes the brushes more smooth, because the brush has an effect after every mouse move, instead of only every x pixels. For this to work well, the brushes have to look at the stroke segments instead of at the mouse positions separately. A more fine grained check might be added in the future.
2022-03-08Fix: add missing case in switch statement for curvesJacques Lucke
2022-03-08Fix T92861: Transform fails for multiple pose object sharing ob-dataCampbell Barton
Support transforming two pose objects at once even when they share object data as this is per-object.
2022-03-08Cleanup: pass const scene argument to UV selection functionsCampbell Barton
2022-03-08Cleanup: spelling in commentsCampbell Barton
2022-03-08Cleanup: prefer UNUSED_VARS_NDEBUG for debug only variablesCampbell Barton
Otherwise it's possible to accidentally use these variables in debug builds, breaking release builds.
2022-03-08Event System: remove unused NDOF buttonsCampbell Barton
GHOST always converts NDOF keyboard buttons into keyboard events so there is no need to expose their values for Blender event types.
2022-03-08Event System: support changing NDOF button shortcutsCampbell Barton
2022-03-08Event System: click/click-drag support for NDOF buttonsCampbell Barton
Support this for completeness, as it's simpler to support click-drag for all events types that support press/release instead of having to document which kinds buttons support click-drag.
2022-03-08Event System: add ISKEYBOARD_OR_BUTTON macroCampbell Barton
This simplifies checking for event types that support press & release.
2022-03-08Event System: refactor click detection into functionCampbell Barton
Also simplify modifier & keymodifier assignment.
2022-03-08Event System: exclude cursor & NDOF motion from ISHOTKEY() macroCampbell Barton
In practice this didn't cause a bug since assigning hot-keys was also checking for "press" events (which NDOF_MOTION doesn't generate). Add ISNDOF_BUTTON macro which is now used by ISHOTKEY to avoid problems in the future.
2022-03-08Cleanup: spelling in comments, use C++ comments for disabled codeCampbell Barton
2022-03-08Curves: Port mesh to curve node to new data-blockHans Goudey
The main improvement is a code simplification, because attributes don't have to be transferred separately for each curve, and all attributes can be handled generically. Performance improves significantly when the output contains many curves. Basic testing with a 2 million curve output shows an approximate 10x performance improvement.
2022-03-08Fix: Curves cyclic access function duplicates attributeHans Goudey
This was an oversight in 6594e802ab94ff11. First it must check if the attribute exists before adding it.
2022-03-08Cleanup: Rename geometry set "curve" to "curves"Hans Goudey
Similar to 245722866d6977c8b, just another function I missed before.
2022-03-07Merge branch 'blender-v3.1-release'Hans Goudey
2022-03-07Fix T93573: Curve evaluated mesh selected in edit modeHans Goudey
This fixes the second part of T93573 that 8506f3d9fe9359518e didn't properly address. Specifically, outlines of instances still had the selected color in edit mode in wireframe view. This change is the same as that commit, just in a different place. Differential Revision: https://developer.blender.org/D14229
2022-03-07Fix memory leak when reading ffmpeg video frames.Sebastian Parborg
We had forgotten to unref packets after reading them. This lead to a memory leak inside of ffmpeg.
2022-03-07UI: align labels of number fields and value slidersLeon Schittek
Previously the labels and values in number fields and value sliders used different padding for the text. This looks weird when they are placed underneath each other in a column and, as noted by a comment in the code of `widget_numslider`, they are actually meant to be aligned. This patch fixes that by using the same padding that is used for the number field for the value slider, as well. This also has the benefit, that the labels of the value sliders don't shift anymore when adjusting the corner roundness. Differential Revision: https://developer.blender.org/D14091