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-10Anim: Keylist drawing optimization by using arrays.Jeroen Bakker
Change data structure of keylists. Reducing the balancing overhead and therefore increases performance. | **Function** | **Master** | **Patch** | |`draw_summary_channel`| 0.202105s| 0.083874s | When adding items to the keylist it will store it in a linked list. This linked list is accompanied with the length (key_len) and a `last_accessed_column`. last_accessed_column is a cursor that improve the performance when adding new items as they are mostly ordered by frame numbers. last_accessed_column is reset when a new fcurve/mask/... is added to the keylist. Before searching or array access. the listbase needs to be converted to an array. `ED_keylist_prepare_for_direct_access`. After that the caller can use `ED_keylist_find_*` or `ED_keylist_array*` functions. The internal array can also be accessed via the `ED_keylist_listbase` function. The items inside the array link to the previous/next item in the list. Reviewed By: sybren Differential Revision: https://developer.blender.org/D12052
2021-09-09Sculpt dyntopo: Added a 'hard edge mode' optionJoseph Eagar
to forcibly set autosmooth_fset_slide to zero (i.e. treat face set boundaries as hard edges and not project them on the surface).
2021-09-09Geometry Nodes: fields and anonymous attributesJacques Lucke
This implements the initial core framework for fields and anonymous attributes (also see T91274). The new functionality is hidden behind the "Geometry Nodes Fields" feature flag. When enabled in the user preferences, the following new nodes become available: `Position`, `Index`, `Normal`, `Set Position` and `Attribute Capture`. Socket inspection has not been updated to work with fields yet. Besides these changes at the user level, this patch contains the ground work for: * building and evaluating fields at run-time (`FN_fields.hh`) and * creating and accessing anonymous attributes on geometry (`BKE_anonymous_attribute.h`). For evaluating fields we use a new so called multi-function procedure (`FN_multi_function_procedure.hh`). It allows composing multi-functions in arbitrary ways and supports efficient evaluation as is required by fields. See `FN_multi_function_procedure.hh` for more details on how this evaluation mechanism can be used. A new `AttributeIDRef` has been added which allows handling named and anonymous attributes in the same way in many places. Hans and I worked on this patch together. Differential Revision: https://developer.blender.org/D12414
2021-09-09Fix smooth-view failure to add mouse-move eventsCampbell Barton
View operations that left the cursor over a gizmo were not being updated because the mouse-move event was added while the view was animated instead of once the animation had completed. Mouse-move events were also missing when smooth-view was disabled. This fixes a glitch with the 3D view navigation gizmo where multiple clicks on the view aligned axis failed to switch to the opposite side unless the user moved the cursor between clicks.
2021-09-09Gizmo: warn when 2D projection fails with non-invertable matricesCampbell Barton
Add a warning to quickly pinpoint the problem. This would have simplified tracking down this problem in D12105.
2021-09-09Sculpt dyntopo:Joseph Eagar
* Collapse now uses code from decimate to detect degenerate cases. * Remaining, unknown (and rare) degenerate cases are now detected (via presence of duplicate verts in faces) and fixed. * DynTopo fills in undo size properly now, so undo memory limiting works.
2021-09-08Sculpt dyntopo:Joseph Eagar
* BLI_table_gset now internally uses a SmallHash instead of a GHash. Profiling revealed this to be quite a bit faster. * This is something of a stopgap until C++-afication of pbvh, when we'll have our pick of a bunch of really nice C++ hashmap libs. * pbvh_collapse_edge bites the dust; dyntopo now uses BM_collapse_edge. Of the three topology operations (subdivide edge, collapse edge, dissolve 3/4 valence vertex) only dissolve still has a dyntopo-specific implementation. * Fixed a bunch of annoying memory corruption bugs. * Non-manifold triangles are now detected in more places. SmallHash changes: * Enabled removal * Fixed infinite loop bug caused by improperly counting free*d* cells versus free cells. * Added a BLI_smallhash_ensure_p method that works just like the GHash version. Sculpt replay system * Roughed out a simple system to record and play back sculpt strokes using a simple text format. * This is exclusively for performance profiling and unit tests. * For each brush stroke the system saves a copy of the active StrokeCache and PaintStroke and parts of Sculpt. This should make profiling DRAM thrashing a lot easier.
2021-09-08Asset: Dropping Material assets on material slot under mouse cursor.Jeroen Bakker
This patch allows dropping material assets from material slot under the mouse cursor. Before this change the material slot had to be hand-picked from the properties panel. For consistency it is chosen to do this in any shading mode as the tooltip shows what is exactly going to happen during release. The feature also works for other object types than Meshes as it uses the drawn surface on the GPU to detect the material slots. Performance of this patch has been tested with AMD GCN3.0 cards and are very responsive. Reviewed By: fclem, Severin Differential Revision: https://developer.blender.org/D12190
2021-09-08Cleanup: VSE select operatorRichard Antalik
Operator combines more features and it wasn't very transparent which properties are used in which feature and how they are used. Features linked_time, side_of_frame and linked_handle are isolated, logic moved into own function. deselect_all property was removed as it practically equals to !extend in all cases. Functional change: Dragging existing selection will not change active strip. Previously this could happen if click happened on strip that wasn't active. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12320
2021-09-08Fix T90967: Snapping not working with single stripRichard Antalik
Even if `snap_targets` `SeqCollection` is empty, there can be static snap points defined, so don't condition snapping on non-zero target count. Differential Revision: https://developer.blender.org/D12400
2021-09-07Animation: Implement generic slider in graph_slider_opsChristoph Lendenfeld
This patch implements the generic slider from `ed_draw.c` to the `GRAPH_OT_decimate` operator This draws a useful UI and enables precision mode and stepping Overshoot is disabled The status message is moved to the workspace footer Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9361 Ref: D9361
2021-09-07Fix T91219: Crash canceling scale keyframes in dope sheet grease pencilGermano Cavalcante
Caused by {rBb0d9e6797fb8} Ideally `td->loc` should always be set and point to a 3d array.
2021-09-06UI: Area Split and Join Mouse Cursor FeedbackHarley Acheson
This patch just changes the mouse cursor to a "stop sign" when dragging to an unsupported location during Join or Split operations. See D11396 for details and examples. Differential Revision: https://developer.blender.org/D11396 Reviewed by Campbell Barton
2021-09-06Geometry Nodes: support for geometry instancingJacques Lucke
Previously, the Point Instance node in geometry nodes could only instance existing objects or collections. The reason was that large parts of Blender worked under the assumption that objects are the main unit of instancing. Now we also want to instance geometry within an object, so a slightly larger refactor was necessary. This should not affect files that do not use the new kind of instances. The main change is a redefinition of what "instanced data" is. Now, an instances is a cow-object + object-data (the geometry). This can be nicely seen in `struct DupliObject`. This allows the same object to generate multiple geometries of different types which can be instanced individually. A nice side effect of this refactor is that having multiple geometry components is not a special case in the depsgraph object iterator anymore, because those components are integrated with the `DupliObject` system. Unfortunately, different systems that work with instances in Blender (e.g. render engines and exporters) often work under the assumption that objects are the main unit of instancing. So those have to be updated as well to be able to handle the new instances. This patch updates Cycles, EEVEE and other viewport engines. Exporters have not been updated yet. Some minimal (not master-ready) changes to update the obj and alembic exporters can be found in P2336 and P2335. Different file formats may want to handle these new instances in different ways. For users, the only thing that changed is that the Point Instance node now has a geometry mode. This also fixes T88454. Differential Revision: https://developer.blender.org/D11841
2021-09-06Fix T90414: New GPencil iconsAntonio Vazquez
Designed by @mendio The new icons are: * Dot-Dash modifier * Length Modifier * Line Art modifier
2021-09-06Cleanup: clang-formatAaron Carlisle
2021-09-04Fix T91143: Gpencil Set Vertex Color not using LinearAntonio Vazquez
The color was not converted to Linear from Brush color.
2021-09-04Python: Allow Area Close via ScriptingHarley Acheson
Screen area maintenance "Close" function allowed to be scripted. See D12307 for usage example. Differential Revision: https://developer.blender.org/D12307 Reviewed by Campbell Barton
2021-09-04RNA: support extracting names from paths without allocating memoryCampbell Barton
Support extracting identifiers RNA paths into fixed size buffer since the maximum size of the identifier is known all cases. - Add BLI_str_unescape_ex to support limiting the destination buffer. - Add BLI_str_quoted_substr to copy values into a fixed size buffer.
2021-09-03Fix T88411: Draw frame node text when label is emptyLeon Leno
This patch fixes the issue described in T88411, that the text in frame nodes is only shown, when the node has a label. This has been caused by rB8f04ddbbc626, because `node_draw_frame_label` not only draws the label, but also all the other text. Therefore skipping it, when the label is empty, also skips drawing the other text. This is fixed by moving the check for the empty label into `node_frame_draw_label`. **Patch:** Frame nodes show text despite not having a label. {F10286204, size = full} **Same setup in master:** {F10128099, size = full} **Test file** {F10128102} Reviewed By: #user_interface, pablovazquez Maniphest Tasks: T88411 Differential Revision: https://developer.blender.org/D11315
2021-09-03GPencil: Smooth thickness when joining strokesAntonio Vazquez
When joining two strokes in paint mode using the auto merge option, the join was very hard if the thickness was too different. This patch adds a smooth to the join in order to get better transition. Also fixed the problem to join existing strokes very far from actual stroke. Some cleanup and rename of old code is included in order to make code more readable. Reviewed By: pepeland Differential Revision: https://developer.blender.org/D12362
2021-09-03Docs: add note to skip_fcurve_selected_data sequence strip checkCampbell Barton
Without an explanation the sequencer logic looked wrong since other selection checks don't skip data that can't be found.
2021-09-02Sculpt dyntopo: change brush defaults and fix bugJoseph Eagar
* Changed brush defaults a bit. New defaults are for organic modeling. * autosmooth_fset_slide now defaults to 1, so face set boundaries are smoothed but stick to mesh surface (if 0 they would function as hard edges). * Weight by area smooth mode is on by default for all brushes. * Cleaned up versioning code and made it kick in at 3.00:21, with some simple checks to try and detect existing data from beta testers. * Also fixed a small crash bug.
2021-09-02Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
2021-09-02Docs: improve the error when undo poll failsCampbell Barton
Calling undo in from Python background-mode would raise an exception without any information about how to initialize undo.
2021-09-02EditMesh: recalculate normals after running ripCampbell Barton
Failure to calculate normals caused an assertion since face tessellation was being calculated with invalid normals. In practice the rip-drag action would recalculate normals anyway, however mesh tessellation should always be performed with valid normals.
2021-09-02Cleanup: remove redundant alloc argument to SEQ_editing_getCampbell Barton
Callers that require lazy initialization can use SEQ_editing_ensure.
2021-09-02Fix T90798: calc_loop_triangles is not updated after joining objectsCampbell Barton
2021-09-02Cleanup: spelling in commentsCampbell Barton
2021-09-01Sculpt dyntopoJoseph Eagar
* Wrote a simple fix for drawing face sets in inverse (ctrl) mode with face set automasking on. * Various fixes related to hard edges and smoothing. * Started writing some code to defragment bmesh mempools. Need to figure out how to avoid triggering excessive PBVH node rebuilds.
2021-09-01BPY-Docs: Add missing file context members documentationJulian Eisel
Context members of the file space would not be shown in the context API docs.
2021-09-01File Browser/BPY: Expose list of selected files in contextJulian Eisel
Since recently it's possible to query the active file (as object, not just the name), but it's quite useful for scripting to have access to all selected files. This introduces `bpy.context.selected_files`, returning a list of file objects representing files in the File Browser.
2021-09-01Fix errors pasting flipped names in the action editorCampbell Barton
Use BLI_str_quoted_substr_range instead of in-line quote extraction to resolve: - Bone names containing quotes caused flip to fail. - Missing NULL check if a matching quote could not be found.
2021-09-01Cleanup: remove redundant strstr callsCampbell Barton
Rely on BLI_str_quoted_substrN to detect if the prefix exists since this function exists early there is no need to check before calling.
2021-08-31Texture Paint: sync changing active texture in the Node Editor to thePhilipp Oeser
Image Editor When changing to another texture paint slot, the texture displayed in the viewport changes accordingly (as well as the image displayed in the Image Editor). When changing the active texture in the Node Editor though, only the texture displayed in the viewport changes. This was mentioned in T88788 and I am not 100% sure this is desired in all scenarios (or at all), it should be seen in tandem of D11497. This change makes it so that the Image Editor changes to the image we changed to in the Node Editor (keeping them in sync). If this is not desired in all cases, this could be made an option. ref T88788 ref D11496 ref D11497 Maniphest Tasks: T88788 Differential Revision: https://developer.blender.org/D11498
2021-08-31Texture Paint: sync changing active texture in the node editor to thePhilipp Oeser
active paint slot When changing to another texture paint slot, the texture displayed in the viewport changes accordingly (as well as the image displayed in the Image Editor). When changing the active texture in the Node Editor though, only the texture displayed in the viewport changes. This _can_ be confusing because you can end up painting on a texture that you are not looking at in the viewport (so you dont have any feedback whatsoever). Not 100% sure this is desired in all scenarios, but this change makes it so that the active paint slot changes to the one that uses the texture we chaged to in the Node Editor (keeping them in sync). If this is not desired in all cases, this could be made an option. ref T88788 ref D11496 Maniphest Tasks: T88788 Differential Revision: https://developer.blender.org/D11497
2021-08-31Cleanup: remove unnecessary obedit argument from ED_space_image_setCampbell Barton
This was left over from when changing the image set the faces texture.
2021-08-31Measure tool: Add support to restrict dimension to one axisEric Abrahamsson
Support axis constraints for the measure tool. Press X, Y or Z to restrict the dimension to that axis, it's also possible to toggle between orientations matching transform. Reviewed By: campbellbarton Ref D10872
2021-08-31Transform: avoid passing the context to extended orientation functionsCampbell Barton
This makes it possible to calculate orientation from functions that don't have the context.
2021-08-31Cleanup: add CTX_data_pointer_set_ptr & CTX_data_list_add_ptrCampbell Barton
Many callers expanded a PointerRNA argument, so add a version of these functions that takes a PointerRNA.
2021-08-31Fix assigning shortcuts that include array indicesCampbell Barton
Assigning a shortcut to bone layers for example, raised a Python exception when used.
2021-08-31Fix logical error resolving RNA pathsCampbell Barton
Only append RNA_path_from_ID_to_struct to context attributes if those paths resolve to ID types. Also simplify creating RNA paths by adding utility functions: - WM_context_path_resolve_property_full - WM_context_path_resolve_full Part of fix for T90723.
2021-08-31Context: add "active_nla_track" & "active_nla_strip" context membersCampbell Barton
Selection was already accessible but not active. Add utility functions: - ANIM_nla_context_track to access the active track, following the convention of ANIM_nla_context_strip. - ANIM_nla_context_*_ptr versions of these functions, needed to for creating context members to access the ID pointer. Part of fix for T90723.
2021-08-31Sculpt dyntopo: Dynamic field-propegated topology rakeJoseph Eagar
I might write a paper on this. Topology rake now locally updates a vector field, which it uses to smooth the input and constrain to mesh (including face set) boundaries. This can make an enormous difference for things like smoothing. Note that this is different from the existing 'curvature rake' mode, which also builds a field and which is fed into the input of this new one. The only oddity is that the field is stored in a CD_PROP_COLOR since we don't have a CD_PROP_FLOAT4, and this shows up in the UI (not sure if I'm messing up the CD_TEMPORARY flags or if the UI doesn't check for them).
2021-08-31Context: add "active_sequence_strip" context memberPhilipp Oeser
This is an alternative to context.scene.sequence_editor.active_strip which could be verbose, especially with additional None checks. Part of fix for T90723, extracted from D12297.
2021-08-30Fix T91056: GPencil merge layers doesn't preseve Keyframe type.Antonio Vazquez
Now if the frame does not exist in destination layer, the frame type of merge layer is used. For existing frames in destination layer, the existing type is not changed.
2021-08-30Sculpy dyntopo: fixed various topology bugsJoseph Eagar
* Fixed crash in dyntopo collapse. The loops around vertex iterator dyntopo uses doesn't actually work on non-manifold meshes, or meshes with invalid normals, this was not being checked in pbvh_bmesh_collapse_edge. * Rotate tool now works with dyntopo.
2021-08-29Sculpt dyntopo: another bugfix from today's earlier commitsJoseph Eagar
2021-08-29Fix a few bugs in lat commitJoseph Eagar
2021-08-28fix missing curly bracesJoseph Eagar