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
2021-09-18Merge branch 'master' into temp_bmesh_multirestemp_bmesh_multiresJoseph Eagar
2021-09-17WM: expose the "any" state of KeyMapItem modifiersCampbell Barton
Change KeyMapItem.alt/ctrl/shift/oskey to integer types, where -1 is used to ignore the modifier when matching key-map items. It was only possible to set all modifiers to -1 at once from RNA using the 'any' property. Afterwards individual modifiers could be set back to true/false. Although these key-map items could not be exported/imported. Exposing the values directly avoids the need for cumbersome workarounds.
2021-09-17Sculpt dyntopo: Roughed out skeleton of new brush engine APIJoseph Eagar
Command Lists * The new system will be based on command lists generated by (eventually) a node editor. * For now, the lists will be hardcoded. * Idea is to make a minimal viable brush engine that won't cause file breakage when the upgrade to node-based brushes happen. Brush Channels * Wrote new structures and API to wrange brush parameters: BrushChannel. * Supports, floats, ints, enums, bitmasks, with plans for vec3 and vec4. * This will replace UnifiedPaintStruct, most of the members of Brush and the DynTopoSettings struct. * Brush channels can be mapped to various input device channels (e.g. pen pressure); each mapping has its own associated curve (CurveMapping instance) and bounds. Brush channel inheritence chaining * Brush channels can form inheritence chains * Channel sets are stored in three places: in the scene toolsettings, in Brush, and in individual brush commands. * Node groups will also have a channel set. * Channels in each set can be flagged to inherit from the parent set. * Inheritence happens in seperate merged channel sets at runtime. The final Brush channels live in Brush->channels_final, while the final command channels live in BrushCommand->params_final.
2021-09-17UI: expose "Lasso Select" & "Extrude to Cursor" in menusCampbell Barton
- Show "Lasso Select" in menus (along with Box & Circle select) - Show "Extrude to Cursor" (along with other extrude actions). - Rename operators that add/extrude on Ctrl-Click since their names were inconsistent. This is mainly for discoverability.
2021-09-17UI: enable the depend-on-cursor flag for some operatorsCampbell Barton
- Bend (Transform). - Extrude to Cursor. - Lasso Select (related operators such as node-cut links, mask.. etc). - Rip Mesh / UV's. - Vertex/Edge Slide.
2021-09-17UI: split screenshot area into a separate operatorCampbell Barton
While the screenshot operator showed an "Area" option, it wasn't usable from the main menu (unless accessed via menu search). Split screenshot area into an operator that depends on cursor.
2021-09-17UI: wait for input for operators that depend on cursor locationCampbell Barton
Support waiting for input so operators that depend on the cursor location are usable from menus / buttons. Use an operator type flag which the user interface code checks for, waiting for input when run from a menu item. This patch only supports this feature, there are no functional changes. The motivation for this change is discoverability since some actions were either hidden or broken when accessed from menus (where the behavior of the operator depended on the menu location). In general, waiting for input is *not* an efficient way to access tools, however there are over 50 operators with a "wait_for_input" property so this isn't introducing a new kind of interaction, rather exposing this in a way that does not need to be hard-coded into each operator, or having modal callbacks added for the sole purpose of waiting for input. Besides requiring boiler plate code using a "wait_for_input" property has the added down-side of preventing key shortcuts from showing. Only the menu items will enable the property, causing them not to match key-map items. Reviewed By: Severin Ref D12255
2021-09-17Geometry Nodes: Add a toggle to use attributes as input valuesHans Goudey
This adds a toggle to node group inputs exposed in the modifier to use an attribute instead of a single value. When the toggle is pressed, the button switches to a text button to choose an attribute name. Attribute search isn't implemented here yet. One confusing thing is that some values can't be driven by attributes at all, like the size of a primitive node. In that case, we should have a node warning, but that will be separate since it's more general. We can also have an option to turn off this toggle in node group input settings. The two new properties for each input are stored with the same name as the value, but with `"_use_attribute"` and `"_attribute_name"`` suffixes. The properties are not added for socket types that don't support attribute input, like object sockets. Differential Revision: https://developer.blender.org/D12504
2021-09-16Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
2021-09-16commit prior to mergeJoseph Eagar
2021-09-16Assets: Recursive reading of asset librariesJulian Eisel
With this, asset libraries can be directory structures and all assets in sub-directories will show up in an Asset Browser. With complex directory structures and many .blend files inside, asset library reading will be quite slow for now. There's initial work being done to introduce indexing for this (T82979), other optimizations are being discussed as well. Addresses T91406. Differential Revision: https://developer.blender.org/D12139
2021-09-16App Settings: Edge ResizeDalai Felinto
This prevents both editor resize as well as regions (e.g., the toolbar). Note: This option is not visible in the UI. Differential Revision: D12516
2021-09-16App Settings: Regions Visbility ToggleDalai Felinto
The toggle that allow users to "show" the region (header, toolbar, ...) when it is collapsed can now be configured for the apps. Note: This option is not visibile in the UI. Differential Revision: D12516
2021-09-16Cleanup: Rename USER_APP_LOCK_UI_LAYOUTDalai Felinto
There will be other settings that lock other aspects of the UI layout (e.g., resizing of editors). So better to name this setting what it actually handles (the corners). New name: USER_APP_LOCK_CORNER_SPLIT Differential Revision: D12516
2021-09-16Cleanup/Fix outliner 'make local' code.Bastien Montagne
While likely harmless, this code was doing extremely bad thing, by-passing the whole lower-level `BKE_lib_id_make_local` call in case it would fail and deciding by itself to forcefully make the given ID local. Bad. Very, very, very bad.
2021-09-16Cleanup: no need to clear new flags and pointers from whole Main when making ↵Bastien Montagne
a single ID local.
2021-09-16IDManagement: refactor: Remove 'test' part from `BKE_lib_id_make_local`.Bastien Montagne
Mixing testing and actual action in a single function is just not a good way to do things, and the 'testing' feature is not used anywhere anymore, time to get rid of it.
2021-09-16IDType: Add `BKE_idtype_idcode_is_localizable`.Bastien Montagne
This is the same as `BKE_idtype_idcode_is_linkable` currently, used only in one place in UI code of IDtemplate.
2021-09-16Fix bisect gizmo offset while draggingCampbell Barton
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-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-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-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-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-15Cleanup: spellingCampbell 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-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 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-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-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-13Various UI messages fixes and updates.Bastien Montagne
2021-09-13Sculpt dyntopo: more collapse fixesJoseph Eagar
The edge cases just never end.
2021-09-13Fix T84638: Wrong scale for primitives with radiusFalk David
Creating some primitives allows for a scale value (via python) that will scale the object accordingly. For objects with a radius parameter (like cylinders, spheres, etc.) passing a scale different to (1,1,1) would result in unexpected behavior. For example: `>>> bpy.ops.mesh.primitive_uv_sphere_add(radius=2, scale=(1,1,2))` We would expect this to create a sphere with a radius of 2 (dimensions 4,4,4) and then be scaled *2 along the z-axis (dimensions 4,4,8). But this would previously create a scaled sphere with dimensions (2,2,4). The scale was simply divided by two. Maybe because the "radius" parameter for creating the primitives was confusingly named "diameter" (but used as the radius). The fix adds a scale parameter to `ED_object_new_primitive_matrix` and also renames the wrongly named "diameter" parameters to "radius". Reviewed By: campbellbarton Maniphest Tasks: T84638 Ref D10093
2021-09-12Cleanup: early return from smoothview when the view is unchangedCampbell Barton
2021-09-12Cleanup: spellingCampbell Barton
2021-09-11Geometry Nodes: Support modifier on curve objectsHans Goudey
With this commit, curve objects support the geometry nodes modifier. Curves objects now evaluate to `CurveEval` unless there was a previous implicit conversion (tessellating modifiers, mesh modifiers, or the settings in the curve "Geometry" panel). In the new code, curves are only considered to be the wire edges-- any generated surface is a mesh instead, stored in the evaluated geometry set. The consolidation of concepts mentioned above allows remove a lot of code that had to do with maintaining the `DispList` type temporarily for modifiers and rendering. Instead, render engines see a separate object for the mesh from the mesh geometry component, and when the curve object evaluates to a curve, the `CurveEval` is always used for drawing wire edges. However, currently the `DispList` type is still maintained and used as an intermediate step in implicit mesh conversion. In the future, more uses of it could be changed to use `CurveEval` and `Mesh` instead. This is mostly not changed behavior, it is just a formalization of existing logic after recent fixes for 2.8 versions last year and two years ago. Also, in the future more functionality can be converted to nodes, removing cases of implicit conversions. For more discussion on that topic, see T89676. The `use_fill_deform` option is removed. It has not worked properly since 2.62, and the choice for filling a curve before or after deformation will work much better and be clearer with a node system. Applying the geometry nodes modifier to generate a curve is not implemented with this commit, so applying the modifier won't work at all. This is a separate technical challenge, and should be solved in a separate step. Differential Revision: https://developer.blender.org/D11597
2021-09-11Calm Warning: Unused VariableHarley Acheson
Calms warning for unused variable in `constraint_copy_to_selected_poll` by using UNUSED_VARS. See D12453 for further details Differential Revision: https://developer.blender.org/D12453 Reviewed by Campbell Barton
2021-09-11Geometry Nodes: add field support for socket inspectionJacques Lucke
Since fields were committed to master, socket inspection did not work correctly for all socket types anymore. Now the same functionality as before is back. Furthermore, fields that depend on some input will now show the inputs in the socket inspection. I added support for evaluating constant fields more immediately. This has the benefit that the same constant field is not evaluated more than once. It also helps with making the field independent of the multi-functions that it uses. We might still want to change the ownership handling for the multi-functions of nodes a bit, but that can be done separately. Differential Revision: https://developer.blender.org/D12444
2021-09-10Fix Constraints not updating on move in stackHenrik Dick
Flag the changed object and its bones to update after moving a constraint in the stack up or down. The two operators for move up and move down seem to be unused, but I notices they had the same problem, so I added the update there as well. Reviewed By: sybren Differential Revision: https://developer.blender.org/D12174
2021-09-10Geometry Nodes: Add versioning to change legacy node ID namesHans Goudey
Recently we have decided to avoid fancier versioning for nodes with string inputs for attribute names when updating the attribute workflow for 3.0. In that case we would just duplicate any node that will have an updated version to work with fields. We want to be able to use the "proper" ID names for the new versions of the nodes though, so this patch adds "Legacy" to the IDs of all nodes that will be replaced in 3.0. This commit also removes the nodes from the add menu when the fields experimental preference is enabled, in order to make it clear what has been updated and what hasn't. Nodes in the "Maybe" categories in versioning_300.c can be renamed later if necessary. For now it's probably better to be conservative, and to keep the list complete. Differential Revision: https://developer.blender.org/D12420
2021-09-10Add missing bit to own previous commitJulian Eisel
Amendment to 7a5216497cc3. Removed this before committing, because I thought it wasn't needed. Of course it was...
2021-09-10Cleanup: Fix comment in recent commit.Jeroen Bakker
A task is created for each item in a list base. It used to say that a thread was created for each item.
2021-09-10Fix possible crash displaying asset preview from current fileJulian Eisel
For some reason the asset preview isn't created or loaded correctly in some instances. This could be addressed with D9974, but hard to tell since I only have a failing .blend file, no steps to recreate it from scratch. Would crash when opening an Asset Browser, selecting an object asset (that has an invalid preview stored) and opening the Asset Browser sidebar, so that the preview is visible there.
2021-09-10T78995: Enable keylist threaded drawing.Jeroen Bakker
This enabled multithreaded building of the keys that needs to be drawn in the timeline (and other action editors). On an AMD Ryzen 3800 using a mocap data test file (available in patch) the performance went from 2fps to 8fps. The performance increase depends on the number of rows of keyframes that is shown in for example the timeline editor. Each row will be using a different thread. Currently the bottleneck is the summary channel that we could split up in the future even more ( although that is a complex refactoring work). Reviewed By: sybren Differential Revision: https://developer.blender.org/D12198