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-09-16GPencil: Fix dash modifier reading error.YimingWu
The reference for parent modifier in segment data is not assigned. Now fixed.
2021-09-16Add skeletal beginnings of C++ sculpt refactorJoseph Eagar
design study (note that it's #ifdef'd out). Basic idea is to put all the sculpt brush code in a single large template. This template takes a PBVH adaptor class (of which there would be three, one per PBVH_XXX type) as a template argument. Basically we're using the compiler to generate three complete copies of every brush implementation. C++20 concepts are used to validate the pbvh classes. An example brush implementation: pbvh->forVertsInRange( { .brush = ss->cache->brush, .radius = radius, .use_threads = true, .use_original = false }, [&offset](auto viter, int node_i, void *userdata) { //add offset to vertex coordinates madd_v3_v3fl(viter.co, offset, viter.fade); }, [](PBVHNode *node, int node_i, void *userdata) { BKE_pbvh_node_mark_update(node); });
2021-09-15Cleanup: Use function to mark mesh normals dirtyHans Goudey
2021-09-15Cleanup: Remove duplicate warning from subdivision surface nodeHans Goudey
2021-09-15Geometry Nodes: Hide values for selection inputsHans Goudey
Toggling the selection off in the node is the same as muting it, so exposing it there doesn't help, and makes it less clear that it's meant to be used as a field.
2021-09-15Fix: Division by zero in curve spiral primitive nodeHans Goudey
2021-09-15Splines: Add a method for reversing a SplineJohnny Matthews
This moved the spline reversing logic out of the Curve Reverse geometry node and into the spline class. This allows a spline to reverse itself with a call to `my_spline.reverse()` The base class will reverse position, radii & tilt, while specialized versions are created for Bezier and Nurbs splines to reverse the additional data that these classes encapsulate. Differential Revision: https://developer.blender.org/D12501
2021-09-15Fix broken WorkSpace use after recent refactor of append code.Bastien Montagne
Essentially, Workspace (and Screen) types were defined as not localizable. In previous code it happended to work by mere chance (code path taken in `BKE_library_make_local` was conviniently skipping the call to `BKE_lib_id_make_local` in that case, hence not checking for `IDTYPE_FLAGS_NO_MAKELOCAL` flag of the localized ID type). This is a total abuse of this IDType flag, for now removing it. That specific case (IDtype appendable but nor linkable) requires its own proper flag, this will be tackled in a later commit. Issue introduced in rB3be5ce4aad5e.
2021-09-15Fix missing passes result when rendering multiple viewsSergey Sharybin
Caused by the lazily pass pixels allocation which didn't reset allocation state of the render result. Demo file: XXX
2021-09-15Fix crash in 'drag asset' case in new append code from yesterday.Bastien Montagne
Scene and related pointer parameter can be NULL in link/append code, in which case there is no instantiation of new objects/collections/obdata. Link code in blendloader was already checking that, new instantiation code in WM area from yesterday did not. Issue introduced by rB3be5ce4aad5e.
2021-09-15BLI: Add a reverse method to MutableSpanJohnny Matthews
Add a method that allows a MutableSpan to reverse itself. This reverses the data in the original span object. This is a first step in extracting some functionality from nodes and making it more general. Differential Revision: https://developer.blender.org/D12485
2021-09-15Geometry Nodes: Add fields version of material nodesHans Goudey
This commit moves the old material nodes to a "legacy" folder and adds versions of the nodes that work with fields. The "Select by Material" node is a field node now, so it doesn't have a geometry output. This is an improvement because there are fewer links to connect, and it's more easily usable in different situations. It's also called "Material Selection", since it's more of an input than an action now. It's sometimes necessary to use the attribute capture node to get a more predictable interpolation to mesh faces. This is because the selection field input is always evaluated on the face domain, so attribute inputs are interpolated before they are booleans, so they cannot use the new interpolations from rB5841f8656d9580d7b9. Differential Revision: https://developer.blender.org/D12456
2021-09-15Geometry Nodes: Add special domain interpolation for selectionsHans Goudey
The generic domain interpolation algorithms didn't quite work for selections. The interpolation would do unexpected things that were different than the results in edit mode. The new behavior is supposed to be the same as edit mode, although we also have to handle face corner selections here. Currently the code assumes that all boolean attributes should be handled that way. I'm not sure of why that wouldn't be the case, but if we ever need non-selection boolean attributes, that could be supported too. Differential Revision: https://developer.blender.org/D12488
2021-09-15Cleanup: avoid passing redundant parameterJacques Lucke
2021-09-15Nodes: refactor socket declarationsJacques Lucke
This commits adds a few common flags to `SocketDeclaration` so that they are available for all socket types (hide label, hide value, is multi input). This allows porting over the remaining geometry nodes to the new declaration system. Furthermore, this commit separates the concepts of the socket declaration and corresponding builders. The builders are used by nodes to declare which sockets they have (e.g. `FloatBuilder`). The ready build socket declarations can then be consumed by other systems such as the versioning code. Both use cases need different APIs and those will change for independent reasons, so it makes sense to separate the classes.
2021-09-15Gizmo: add flag to hide the gizmo group during interactionCampbell Barton
This allows a hack to be removed that temporarily overwrote the 3D views gizmo display flag. Also reverse change from fb27a9bb983ce74b8d8f5f871cf0706dd1e25051 that runs poll on modal gizmo groups as there is some risk that the poll function unlinks the gizmo.
2021-09-15Cleanup: unused variableCampbell Barton
2021-09-15Fix T91421: Length modifier bake influence check.YimingWu
Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12496
2021-09-15Sculpt dyntopo: Fix a few issues from last commitJoseph Eagar
* Fixed crashing on entering sculpt mode * Fixed transitioning between sculpt and another undo system type sometimes corrupting stack.
2021-09-15Sculpt dyntopo: fix missing bit from last commitJoseph Eagar
* BM_mesh_bm_to_me now saves id layers by default.
2021-09-15Geometry Nodes: multi threaded field evaluationJacques Lucke
This adds a new `ParallelMultiFunction` which wraps another multi-function and evaluates it with multiple threads. The speeds up field evaluation quite a bit (the effect is most noticeable when the number of evaluations and the field is large). There are still other single-threaded performance bottlenecks in field evaluation that will need to be solved separately. Most notably here is the process of copying the computed data into the position attribute in the Set Position node. Differential Revision: https://developer.blender.org/D12457
2021-09-15Sculpt dyntopo:Joseph Eagar
Seperate enabling PBVH_BMESH from enabling DynTopo: * Created a new option to globally disabled DynTopo. * The DynTopo panel header now reads "Dynamic Mode", to hopefully signal that turning on PBVH_BMESH is a seperate step from enabling or disabling DynTopo itself. * The first checkbox in the panel is "DynTopo" so it should be clear enough (it's on by default, with multiple layers of file versioning checks). PBVH_BMesh's undo system: * CD_MESH_ID layers are now permanently saved once they are created (by default they are not). This fixed a *lot* of bugs: Before this the undo system had to save maps between mesh indices and mesh IDs on transitioning between sculpt and global undo steps. This was extremely error prone, and it simply wasn't possible to cover all of the corner cases * Note that there is still an odd bug where the first global undo push after a sculpt step gets ignored, I dunno what's up with this. * Dyntopo undo should be nearly (hopefully completely) bug-free after this commit. C++20 * Made a few small changes to get blender to compile with c++20. std::result_of was removed, had to replace a couple of usages of it with std::invoke_result. * I'm planning to do some design studies on rewriting sculpt into C++. * I strongly suspect we are going to need C++20'a new concepts feature if we move sculpt into C++. I'm planning to do some design studies on how that might work.
2021-09-15Gizmo: show groups flagged with SHOW_MODAL_ALL during interactionCampbell Barton
Follow up to fix for T73684, which allowed some modal gizmos to hide all others. Also resolve an issue from 917a972b56af103aee406dfffe1f42745b5ad360 where shear the shear gizmo would be visible during interaction. Internally there are some changes to gizmo behavior - The gizmo with modal interaction wont draw if it's poll function fails. - The WM_GIZMOGROUPTYPE_DRAW_MODAL_ALL flag now causes these gizmo groups to draw when another group is being interacted with.
2021-09-15Cleanup: replace defines with functionsCampbell Barton
2021-09-15Cleanup: correct tracker ID in commentCampbell Barton
2021-09-15GPencil: Dot dash modifier.YimingWu
Create dot-dash effect for grease pencil strokes. User can manually edit the length, gap and styles for each segment of dashed lines. The values in each segment can all be key-framed to make animations. Reviewed By: Hans Goudey (HooglyBoogly), Antonio Vazquez (antoniov) Differential Revision: http://developer.blender.org/D11876
2021-09-15LineArt: Automatic crease with flat/smooth faces.YimingWu
This allows crease lines to be automatically hidden on smooth surfaces, also provided options for: - Showing crease on marked sharp edges. - Force crease detection on smooth surfaces. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: http://developer.blender.org/D12051
2021-09-15Fix T89241: Scale to fit overflows into a second lineCampbell Barton
2021-09-15Cleanup: spellingCampbell Barton
2021-09-15Cleanup: doxy sections, parameter syntaxCampbell Barton
2021-09-15Fix: Use after free in spreadsheet attribute column IDHans Goudey
A temporary string was created in the attribute_foreach callback and used in a map at a higher scope. When the callback finished, the string went out of scope, was freed, then the elements in the set pointed to freed memory.
2021-09-14Fix T89027: "factor" field in pose breakdowner not updatedChristoph Lendenfeld
After applying the pose breakdowner, the "factor" slider in the redo panel wasn't set to the correct value This would cause the pose to jump around once you start dragging the slider Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D12187 Ref: D12187
2021-09-14LibLink: New Append code.Bastien Montagne
This commit fully refactors the way linked IDs are made local when appended. Previously, `BKE_library_make_local` was (ab)used for this task, but it was missing some contextual data and doing complex processing to try to work around this, with limited sucess. Further more, it was nearly impossibe to extend (e.g. to get new append behaviors necessary for the asset project). The new code is a dedicated append step in WM linking process. NOTE: BPY API (`libray.load()` context manager) uses its own code here, which still relies on `BKE_library_make_local` for appending. Unfortunately, merging those two different code paths is not trivial so for now this API will remain unchanged. Fix T55629: Append already linked Data is impossible.
2021-09-14ID management: Add new version of `relink_to_newid` using proper new ↵Bastien Montagne
remapping code. Current `BKE_libblock_relink_to_newid` is using its own simplistic, limited and not really correct version of ID remapping. While doing a full replacement would have been ideal, this is risky/time-constrained for Blender 3.0 release, so for now we'll have both versions co-existing.
2021-09-14Cleanup: fix inconsistent parameter nameJacques Lucke
Found by clang-tidy.
2021-09-14Nodes: cache node declaration on nodeJacques Lucke
Previously, it was necessary to rebuild the node declaration every time it was used. Now it is cached per node for easy and fast access. For more details on what this is, look at the comment in `DNA_node_types.h`. Differential Revision: https://developer.blender.org/D12471
2021-09-14Cleanup: simplify resource scope methodsJacques Lucke
Previously, a debug name had to be passed to all methods that added a resource to the `ResourceScope`. The idea was that this would make it easier to find certain bugs. In reality I never found this to be useful, and it was mostly annoying. The thing is, something that is in a resource scope never leaks (unless the resource scope is not destructed of course). Removing the name parameter makes the structure easier to use.
2021-09-14Fix: use type name instead of variable nameJacques Lucke
That was a typo in rBfd60f6713a9d9e6f7d706b53bf1311f2f1cd9031.
2021-09-14Functions: support optional outputs in multi-functionJacques Lucke
Sometimes not all outputs of a multi-function are required by the caller. In those cases it would be a waste of compute resources to calculate the unused values anyway. Now, the caller of a multi-function can specify when a specific output is not used. The called function can check if an output is unused and may ignore it. Multi-functions can still computed unused outputs as before if they don't want to check if a specific output is unused. The multi-function procedure system has been updated to support ignored outputs in call instructions. An ignored output just has no variable assigned to it. The field system has been updated to generate a multi-function procedure where unused outputs are ignored.
2021-09-14Geometry Nodes: fix memory leak for multi input socketsJacques Lucke
2021-09-14Fix T90862: Texts in Outliner can have wrong iconPhilipp Oeser
In contrast to the Filebrowser, the Outliner (Blender File view) did not distinguish icons for text-based formats (if they have a filepath this can be done though). Maniphest Tasks: T90862 Differential Revision: https://developer.blender.org/D12347
2021-09-14Doc: expand on comment for why bound-box access could cause issuesCampbell Barton
2021-09-14Sculpt dyntopo: fix nasty node splitting bugJoseph Eagar
2021-09-14UI: keep navigation gizmos visible during modal operatorsCampbell Barton
Hiding viewport navigation gizmos caused the UI to "flicker" unnecessarily, the axis could also be useful as a reference. Resolves T73684
2021-09-14Sculpt dyntopo:Joseph Eagar
* Fixed noise on using autosmooth with tools that use original coorinates. While this was most prominent with DynTopo, it did happen with other tools. * The solution is to smooth the original coordinates as well as the explicit coordinates if the active tool requires original data. * I decided to replace the original coordinates system for PBVH_FACES and PBVH_GRIDS with the same MDynTopoVert structure DynTopo uses. The alternative would have been extremely messy code. * Todo: Rename MDynTopoVert to. . .SculptInfoVert? * Todo: Cache boundary flag and corner info in MDynTopoVert->flag for PBVH_FACES/GRIDS similar to PBVH_BMESH.
2021-09-13Asset Template: Extra UI optionsDalai Felinto
This allow users to show/hide: * Library name / refresh. * Assets names. * Filter. To set them in Python use: display_options={'NO_NAMES', 'NO_FILTER', 'NO_LIBRARY'} With contributions by Julian Eisel. Differential Revision: https://developer.blender.org/D12476
2021-09-13Fix T90736: Problem applying scale to curvesGermano Cavalcante
Curve Points of handle of type `Auto` on curves not uniformly scaled cause the shape of the curve to be modified after applying the scale. So change these handles to `Aligned` in these cases. Reviewed By: campbellbarton Maniphest Tasks: T90736 Differential Revision: https://developer.blender.org/D12281
2021-09-13Cleanup: fix typo in commentPhilipp Oeser
2021-09-13Fix T91320: Support flipping sides in mesh bisectPhilipp Oeser
Changing active side was introduced in {rB7ff6bfd1e0af} but was never working for tools/operators other than the sculpt line mask tool. While for most tools/operators this actually does not make sense, the bisect tool/operator can actually benefit from it. thx @campbellbarton for additional input! Maniphest Tasks: T91320 Differential Revision: https://developer.blender.org/D12473
2021-09-13Fix straightline gesture snapping not working for modal toolsPhilipp Oeser
This was implemented in {rB14d56b4217f8} but was never working for tools/operators other than the sculpt line mask tool. To be precise, the preview actually snapped but the operations (e.g. mesh bisect, vertex weight gradient) still happened "unsnapped" in modal. For the sculpt line mask tool this wasnt a problem, because it only draws a preview while modal, the actual mask was only applied later. This solves part one of T91320 (snapping), sculpting also introduced flipping in {rB7ff6bfd1e0af} which does not make much sense for all tools, but in bisect this could actually be supported, will add that in a separate Diff. ref T91320 Maniphest Tasks: T91320 Differential Revision: https://developer.blender.org/D12470