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-09-07progresstemp-chunked-listJacques Lucke
2022-09-07progressJacques Lucke
2022-09-07initial vector listJacques Lucke
2022-09-07BLI: new C++ BitVector data structureJacques Lucke
This adds a new `blender::BitVector` data structure that was requested a couple of times. It also replaces usages of `BLI_bitmap` in C++ code. See the comment in `BLI_bit_vector.hh` for more details about the advantages and disadvantages of using a bit-vector and how the new data structure compares to `std::vector<bool>` and `BLI_bitmap`. Differential Revision: https://developer.blender.org/D14006
2022-09-07Cleanup: factor out "set default filepath" into a ↵Aras Pranckevicius
ED_fileselect_ensure_default_filepath Follow up to D15904, a bunch of places had exact same logic for "is filepath set? if not, set some default one", so factor all that out into a separate ED_fileselect_ensure_default_filepath function.
2022-09-07Fix T100797: C++ exporters do not remember the path on subsequent exportsAras Pranckevicius
Most/all C++ based IO code had a pattern of doing using RNA_struct_property_is_set to check whether a default path needs to be set. However, it returns false for properties restored from "previous operator settings" (property restoration code sets IDP_FLAG_GHOST flag on them, which "is set" sees and goes "nope, not set"). The fix here is to apply similar logic as 10 years ago in the T32855 fix (rBdb250a4): use RNA_struct_property_is_set_ex instead. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D15904
2022-09-07IDManagement: Add some assert to ensure lib consistency in embedded IDs.Bastien Montagne
From re-checking related code, it seems that we already always ensure consistency of the `lib` pointer between embedded IDs and their owners. This commit only adds some asserts in ambedded ID read code to double-check this.
2022-09-07Geometry Nodes: improve printing geometry set for debuggingJacques Lucke
2022-09-07Cleanup: Remove some references to proxies in comments/log messages.Bastien Montagne
Note that there are still some references to proxies left, in some cases it's unclear if the code related to the comment is even still relevant, this goes beyond mere cleanup to address then.
2022-09-07Nodes: add owner_tree method to nodesJacques Lucke
2022-09-07Fix T100862: only leading deform modifiers used in weight/vertex paint.Alexander Gavrilov
It turns out upon close inspection that the 'deform only' mesh only includes leading deform modifiers, rather than all of them like crazyspace evaluation. This reduces the effect of the change in rB9823a8f72be8 to using the fully evaluated mesh (all modifiers) when the whole stack resulted in no topology change.
2022-09-07Cleanup: comment unused INPUTCHANGE eventCampbell Barton
2022-09-07WM: don't clear modifiers when the window is de-activatedCampbell Barton
Leave the modifiers as they were so comparing with previous modifiers on window re-activation isn't detected as a state change.
2022-09-07Fix T40059: Switching windows ignores held modifier keysCampbell Barton
Re-enable workaround (USE_WIN_ACTIVATE) which should no longer cause problems as of [0]. [0]: 37d835f0bca28a7cbf577385d9828636e7811cc5
2022-09-07CMake: add missing headersCampbell Barton
2022-09-07Cleanup: de-duplicate bounding box center calculationCampbell Barton
2022-09-07Cleanup: add sections, use float literalsCampbell Barton
2022-09-07Cleanup: sort cmake file listsCampbell Barton
2022-09-07Cleanup: formatCampbell Barton
2022-09-07Cleanup: GHOST/Win32 dropCampbell Barton
- Reduce variable scope. - Use snake-case for variables. - Remove unnecessary counter when building file-list. - Remove break after return. - Use early return. - Add missing braces.
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-07UV: add new operator, uvcalc_align_rotationChris Blackbourn
Adds a new operator to automatically rotate UV Islands into alignment. Modes: * Auto (All edges) * Geometry (V direction will point in geometry direction) [1] * Edge (Rotate until selected edge is in V direction) Also adds uv_sync_selection support to UV Randomize Transform. Resolves: T78399 Differential Revision: https://developer.blender.org/D15820 [1] Listed as "World" in Task description.
2022-09-07Cleanup: rename internal types for GHOST/WaylandCampbell Barton
- Use pascel-case type names, instead of snake-case with `_t` suffix. - Use `GWL_` prefix (short for GhostWayLand), to distinguish these types from ghost (`GHOST_*`) and wayland (`wl_*`) types. - Rename `input` to `seat` (following wayland's own terminology). - Use `wl_` prefix for wayland native variables which have locally defined equivalents so `GWL_Output *output` isn't confused with `struct wl_output *wl_output`. As the locally defined types are used more often this is less verbose overall.
2022-09-07GHOST/Wayland: correct logging IDCampbell Barton
2022-09-07Cleanup: spelling in comments, correct doxy slashes, replace '/w'Campbell Barton
2022-09-07Cleanup: unused argument warningCampbell Barton
2022-09-07Fix building with MSVCCampbell Barton
Correct error from [0] which built with GCC. [0]: b8d986451805f324b0ba98f4b57b4cf89cee04ed
2022-09-07Cleanup: remove unused Main argument to RNA_path functionsCampbell Barton
Note that lib_override functions have kept the unused argument, but this may be removed too. It impacts many lib_override functions so this can be handled separately.
2022-09-07Cleanup: use 'continue' in customdata for loop, reduce right shiftCampbell Barton
2022-09-07Mikktspace: Optimized port to C++Lukas Stockner
This commit is a big overhaul to the Mikktspace module, which is used to compute tangents. I'm not calling it a rewrite since it's the result of a lot of iterations on the original code, but pretty much everything is reworked somehow. Overall goal was to a) make it faster and b) make it maintainable. Notable changes: - Since the callbacks for requesting geometry data were a big bottleneck before, I've ported it to C++ and made it header-only, templating on the data source. That way, the compiler generates code specific to the caller, which allows it to inline the data source and specialize for some cases (e.g. subd vs. non-subd in Cycles). - The one input parameter, an optional angle threshold, was not used anywhere. Turns out that removing it allows for considerable algorithmic simplification, removing a lot of the complexity in the later stages. Therefore, I've just removed the option in the new code. - The code computes several outputs, but only one (the tangent itself) is ever used in Blender. Therefore, I've removed the others to simplify the code. They could easily be brought back if needed, none of the algorithmic simplifications are conflicting with them. - The original code had fallback paths for many steps in case temporary memory allocation fails, but that never actually gets used anyways since malloc() doesn't really ever return NULL in practise, so I removed them. - In general, I've restructured A LOT of the code to make the algorithms clearer and make use of some C++ features (vectors, std::array, booleans, classes), though there's still some of cleanup that could be done. - Parallelized duplicate detection, neighbor detection, triangle tangent computation, degenerate triangle handling and tangent space accumulation. - Replaced several algorithms with faster equivalents: Duplicate detection uses a (concurrent) hash set now, neighbor detection uses Radixsort and splits vertices by index pairs etc. As for results, the exact speedup depends on the scene of course, but let's consider the file from T97378: - Blender 3.1 (before D14675): 6.07sec - Blender 3.2 (with D14675): 4.62sec - rBf0a36599007d (last nightly build): 4.42sec - With this commit: 0.90sec This speedup will mostly be noticed at the start of Cycles renders and, even more importantly, in Eevee when doing something that changes the geometry (e.g. animating) on a model using normal maps. Differential Revision: https://developer.blender.org/D15589
2022-09-07Cleanup: Move (edit)mesh_tangent.c to C++Lukas Stockner
This changes the two tangent-related files in BKE to C++ in preparation for the C++ Mikktspace port in D15589. For now, they still use the original Mikktspace. Differential Revision: https://developer.blender.org/D15636
2022-09-06Fix weight paint smoothing with vertex selection.Alexander Gavrilov
Broken in rB2480b55f216c3137 by incorrectly converting a boolean expression. There is also another suspect expression nearby.
2022-09-06Fix T100760: No color attribute initialization when created by brushHans Goudey
Caused by 25237d2625078c6d.
2022-09-06Fix T100854, T100856: Invalid shape keys when exiting edit modeHans Goudey
The `mvert` pointer was passed to `bm_to_mesh_shape` and was never reset to the beginning of the vertex array. Use spans instead to eliminate this error completely. This also has the benefit of letting the CustomData system handle allocation of mesh layers.
2022-09-06Fix: Restore fix for empty attributes after recent commitHans Goudey
3484c6d4f116409 removed parts of 6e5eb46d7339591 by mistake, returning no attribute when attribute data wasn't found. However, we want that attributes can exist even on empty geometry. This commit restores the fix and tries to make it more explicit to avoid the same mistake again. Differential Revision: https://developer.blender.org/D15899
2022-09-06Fix T99141: Crash with edit mode and copy location constraintSonny Campbell
The constraint attempted to access mesh normals on a mesh with wrapper type ME_WRAPPER_TYPE_BMESH. This commit reverses the if statements so that If there is an editmesh then we use that as the source of truth - otherwise use the evaluated mesh. Differential Revision: https://developer.blender.org/D15809
2022-09-06Cleanup: Return earlyHans Goudey
2022-09-06Cleanup: Avoid using runtime node flag, use topology cacheHans Goudey
It's easier to keep track of state in these algorithms if it's stored in a central place like a set. Plus, using flags requires clearing them beforehand. For the selected linked operators, using the topology cache means we don't have to iterate over all links.
2022-09-06Cleanup: Move select all nodes code to operatorHans Goudey
This more specific high level functionality isn't needed elsewhere. Move it to the operator and clean it up a bit.
2022-09-06Cleanup: Use more specific function for deselecting all nodesHans Goudey
2022-09-06Fix T100841: Creating a frame node with shortcut doesn't sort nodesHans Goudey
Before 58c650a44c25, the nodes span was rebuilt on every redraw. Now that it's only rebuilt as necessary, we need to tag it dirty when nodes are reordered. Relying on the order of the nodes at all isn't ideal, but it's fairly fundamental in many areas at the moment.
2022-09-06Cleanup: Remove unnecessary node sorting, rename variablesHans Goudey
Changing node colors shouldn't change the output of `node_sort`.
2022-09-06Fix T100824: Cycles GPU render broken on macOS 13 Beta and Apple siliconBrecht Van Lommel
The recent revert of Apple silicon inlining changes to avoid long compile times worked on macOS 12, but in macOS 13 Beta it results in render errors. This may be a compiler bug and perhaps get fixed in time, but try to be on the safe side and ensure Blender 3.3.0 works regardless. This brings part of the inlining back, which brings improved performance but also longer compiler times again. Compile time is around 2min now, where the previous full inlining was about 5-7min. Patch by Michael Jones. Differential Revision: https://developer.blender.org/D15897
2022-09-06Fix T100823: Do Not Load Non-Scalable FontsHarley Acheson
Do not allow the loading of old-style non-scalable fonts. See D15884 for more details. Differential Revision: https://developer.blender.org/D15884 Reviewed by Brecht Van Lommel
2022-09-06Cleanup: IDManagement: Simplify `owner_get` calllback of IDTypeInfo.Bastien Montagne
Now that all embedded IDs have a loopback pointer to their owner, we do need anymore extra parameters for this accessor.
2022-09-06Address to some extent issues with invalid embedded IDs in existing files.Bastien Montagne
Many existing .blend files (including startup ones) seem to have invalid embedded IDs (they are not properly tagged with `LIB_EMBEDDED_DATA`). We cannot `do_version` this so just fix it on the fly when detecting the issue. User then need to re-save these files. We also need to update some release files (default factory startup is OK, but e.g. the VSE template one is not). Keeping the assert is important here, as such missing flag is a critical data corruption that can potentially have many serious consequences throughout the ID management code.
2022-09-06BLI: Add new `blender::Pool` containerClément Foucault
A `blender::Pool` can construct and destruct elements without reordering. Freed items memory will be reused by next allocations. Elements are allocated in chunks to reduce memory fragmentation and avoid reallocation. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D15894
2022-09-06Cleanup: Remove unused update custom data pointers in attribute APIHans Goudey
Unused after 05952aa94d33eeb, 410a6efb747f188, and e9f82d3dc7eebad.
2022-09-06Fix (unreported) bad handling of embedded IDs on owner copying.Bastien Montagne
Completely forgot in rBcd49fee74114 to handle the owner ID copying case (this code now also needs to re-assign to `owner_id` pointer of the newly copied embedded IDs to their rightful owner).
2022-09-06Fix T100850: Regression: Gpencil: crash on material color and other ↵Bastien Montagne
properties change. rBcd49fee74114 forgot to add proper support for calls to `ntreeAddTree` with a NULL Main (which should generate `NO_MAIN` ntrees).