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-06-14Fix T98168: Meta strips do not copy animation to another sceneRichard Antalik
Copy animation for strips that are inside metas.
2022-06-14Fix T98718: Face Is Planar Node Not handling Certain ConditionsJohnny Matthews
The comparison between dot products of each point of the poly were not taking into consideration negative values. FLT_MIN was used rather than -FLT_MAX due to a misunderstanding of the FLT_MIN definition. Maniphest Tasks: T98718 Differential Revision: https://developer.blender.org/D15161
2022-06-14Fix T98879: PBVH active attrs only optimization is buggyJoseph Eagar
PBVH draw has an optimization where it only sends the active attribute to the GPU in workbench mode. This fails if multiple viewports are open with a mix of workbench and EEVEE mode; it also causes severe lag if any workbench viewport is in material mode. There are two solutions: either add the code in sculpt-dev that checks for EEVEE viewports at the beginning of each frame, or integrate pbvh draw properly inside the draw manager and let it handle which attributes should go to the GPU.
2022-06-14Cleanup: Fix const correctness of attribute search functionHans Goudey
Retrieving a mutable custom data layer from a const ID should not be possible.
2022-06-14Fix T98875: Adding camera background image shows errorJulian Eisel
Don't show an error if no operator property is set at all that can be used to find an image file or ID for dropping. The caller can decide if this is an error that needs reporting or a valid case, like it is here.
2022-06-14Fix T98797: VSE Slip Strip Contents doesn't work properlyRichard Antalik
Caused by oversight in 7afcfe111aac - code relied on fact, that strip boundary holds old value until updated. Calculate new offsets based on stored orignal offsets.
2022-06-14Cleanup: Snake case for variable nameHans Goudey
2022-06-14Attributes: Add null check in color attribute duplicate operatorHans Goudey
It's potentially possible that the attribute duplication could fail, for whetever reason. There is no great reason not to be safe in this high-level code.
2022-06-14Attributes: Adjustments to duplicate attribute API functionHans Goudey
Use a name argument, for the same reasons as 6eea5f70e3b79e3c668. Also reuse the layer and unique name creation in `BKE_id_attribute_new` instead of reimplementing it. Also include a few miscellaneous cleanups like using const variables and `std::string`.
2022-06-14Fix T98700: Regression: Crash when recursively nesting NLA meta stripsSybren A. Stüvel
The `update_active_strip_from_listbase()` function took meta-strips in the "source" list into account, but didn't recurse into the corresponding meta-strip of the "destination" list. This is now fixed. `update_active_strip_from_listbase()` needed a few changes to resolve the issue: - It was renamed to `find_active_strip_from_listbase()` to limit its reponsibility to just finding the active strip. It now leaves the assignment to the caller. This reduces the number of parameters by 1 and makes recursion simpler. - The destination strips are now, like the source strips, passed as `ListBase`, so that both source & dest can be recursed simultaneously.
2022-06-14Outliner: Sanitize material unlinking callback, report errorsJulian Eisel
The callback would just assume that it's only called on materials, which may in fact not be the case. It could also be called for other ID types and layer collections (see `outliner_do_libdata_operation()`). Properly check this now. Also avoid faling silently when the object or object-data to unlink from couldn't be determined. Report this to the user. Operators that just do nothing are confusing.
2022-06-14Fix T98753: Outliner Unlink material in Blender File mode crashesJulian Eisel
This issue was only exposed by ba49345705a3. The ID pointer of the material's parent tree-element wasn't actually pointing to an ID, but to the list-base containing the IDs. It was just unlikely to cause issues in practice, although an assert was thrown. Just don't do anything if the object or object-data to unlink the material from could not be found. The following commit will introduce a error message about this.
2022-06-14Fix: Don't allow duplicate color attribute operator in edit modeHans Goudey
The internal function relies on `CustomData_copy_data_layer` currently, which doesn't work for BMesh. Support could be added as a special case for BMesh, but in the meantime avoid bugs by just changing the poll.
2022-06-14Fix T98813: crash with GPU subdiv in edit mode and instanced geometryBrecht Van Lommel
Instancing with geometry nodes uses just the evaluated Mesh, and ignores the Object that it came from. That meant that it would try to look up the subsurf modifier on the instancer object which does not have the subsurf modifier. Instead of storing a session UUID and looking up the modifier data, store a point to the subsurf modifier runtime data. Unlike the modifier data, this runtime data is preserved across depsgraph CoW. It must be for the subdiv descriptor contained in it to stay valid along with the draw cache. As a bonus, this moves various Mesh_Runtime variables into the subsurf runtime data, reducing memory usage for meshes not using subdivision surfaces. Also fixes T98693, issues with subdivision level >= 8 due to integer overflow. Differential Revision: https://developer.blender.org/D15184
2022-06-14Fix T85729: Crash when exporting for USD and AlembicSonny Campbell
Ensure the "null" node graph, which is the root node of the export graph, always exists. The crash occured when "Use Settings For" was set to Render, "Visible Objects Only" was ticked, and a single parent object is in the scene but disabled for render. Because the only object attached to the root of the project was disabled for export, there was no "null" root node added to the export graph. This change will always add an empty "null" node with no children to the graph at the start. Other objects will get added to its children as required. Reviewed By: sybren Maniphest Tasks: T85729 Differential Revision: https://developer.blender.org/D15182
2022-06-14Cleanup: Variable name style in STL importerHans Goudey
Designate private variable names as described by the style guide, and also add `num` at the end of variable names rather than at the beginning, as discussed in T85728.
2022-06-14Fix T98715: Crash drag-dropping collection from outliner to ID propertyJulian Eisel
The value of disabled buttons shouldn't be changed through dropping onto it. Check for the disabled state in the drop operator poll, so the dragging code will change the cursor to show that dropping isn't possible at the given cursor location.
2022-06-14obj: disable vertex color tests until it produces identical results across ↵Aras Pranckevicius
platforms
2022-06-14Curves: support adding keymap items for operatorsJacques Lucke
* Add a new keymap for `curves.*` operators. This is mainly for edit mode operators, but since we don't have edit mode yet, these operators are also exposed in sculpt mode currently. * Fix the naming of the "sculpt curves" keymap.
2022-06-14Fix T98782: ignore OBJ face normal indices if no normals are presentAras Pranckevicius
Some OBJ files out there (see T98782) have face definitions that contain vertex normal indices, but the files themselves don't contain any vertex normals. The code was doing a "hey, that's an invalid index" and skipping these faces. But the old python importer was silently ignoring these normal indices, so do the same here. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D15177
2022-06-14obj: vertex colors support in importer and exporterAras Pranckevicius
Adds support for vertex colors to OBJ I/O. Importer: - Supports both "xyzrgb" and "MRGB" vertex color formats. - Whenever vertex color is present in the file for a model, it is imported and a Color attribute is created (per-vertex, full float color data type). Color coming from the file is assumed to be sRGB, and is converted to linear upon import. Exporter: - Option to export the vertex colors. Defaults to "off", since not all 3rd party software supports vertex colors. - When the option is "on", if a mesh has a color attribute layer, the active one is exported in "xyzrgb" form. If the mesh has per-face-corner colors, they are averaged on the vertices. Colors are converted from linear to sRGB upon export. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D15159
2022-06-14Cleanup: spellingCampbell Barton
2022-06-14Cleanup: redundant function callsCampbell Barton
2022-06-14Cleanup: remove the need for image scale using a contextCampbell Barton
Scaling an image shouldn't depend on the current context.
2022-06-14Cleanup: quiet unused variable warningCampbell Barton
2022-06-14Fix T98866: GPU subdiv crash in edit mode with loose geometryKévin Dietrich
The BMesh case was missing when extracting the loose edges flags used for display, so the code was crashing on unitialized `MEdge` pointer.
2022-06-13Outliner performance: Only expand sub-trees if neededJulian Eisel
Before this, we would build the sub-trees of some elements, just to remove them afterwards. In big files, this would sometimes build ten thousands of elements unnecessarily. Now support not building those sub-trees in the first place. Performance tests in a Sprite Fright production file (release build): - View Layer display mode, reduced Outliner tree rebuilding from ~45ms to 12-17ms - Library Overrides display mode, Hierarchies view, reduced tree rebuilding from 5-6s(!) to 220ms
2022-06-13Fix T93500: Sequence.fps returns 0 when proxy is usedRichard Antalik
Caused by `seq_open_anim_file` early returning if anim struct exists, exen if it's not initialized. To ensure `anim` struct is initialized when `openfile` argument is true, don't do early return.
2022-06-13Fix T94499: Knife missed clipping checkCian Jinks
The knife BVH raycast functionality was missing a check to discard points which were clipped.
2022-06-13Fix T93469: Image not moving in proportion to mouseRichard Antalik
Apply scale factor when preview aspect ratio is not 1:1.
2022-06-13Fix VSE: Effect strip has length of 1 frame when addedRichard Antalik
Length was set properly when added, but it was clamped by function `seq_time_effect_range_set` Add early return for generator effects where offsets can be used normally.
2022-06-13UI: Use "bl_order" for UI child panelsErik
The "bl_order" property on add-on UI panels can be used to put them in a specific order regardless of the order of registering. This patch makes this ordering also possible for panels inside panels. Differential Revision: https://developer.blender.org/D15174
2022-06-13IO: update documentation for `HierarchyIterator::weak_export`Sybren A. Stüvel
The documentation for `HierarchyIterator::weak_export` mentions a feature that was removed at some point. Another example is used to illustrate its functionality. No functional changes.
2022-06-13GPencil: Use better sampling limits.Yiming Wu
The problem with T98683 is that sampling interval can be set to very small, resulting in very dense points. This patch attempts to optimize that a little bit. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D15180
2022-06-13LineArt: General code cleanups.Yiming Wu
- Use uintxx_t for all 8/16/64 bit integer types. - Removed prepend_edge_direct thingy which is no longer needed in current edge iterator model. - Minor code path adjustments like only copies view vector when necessary etc. - Correctly handle ies==NULL in edge cutting function. - White spaces and comments etc. Reviewed By: Sebastian Parborg (zeddb) Differential Revision: https://developer.blender.org/D15181
2022-06-13Cleanup: Use more specific includes for grease pencil modifiersHans Goudey
Also remove unused includes in some cases. This should make these files recompile less often.
2022-06-13Cleanup: fix various typosBrecht Van Lommel
Found via codespell -q 3 -S ./intern,./extern -L ans,ba,bording,datas,eiter,fiter,hist,inout,lod,ot,parm,parms,pixelx,pres,te Contributed by luzpaz. Differential Revision: https://developer.blender.org/D15155
2022-06-13Cleanup: Remove unused variable and parameter in pbvh_update_draw_buffersJoseph Eagar
2022-06-13Cleanup: Move dragging code for buttons to own fileJulian Eisel
Moves code for managing dragging data from buttons to a separate file. This way all this closely related code is in one location, making it easier to see how it all relates, and easier to find.
2022-06-13Fix T98735: GPU subdiv displays normals for all elementsKévin Dietrich
The normals flags were not setup properly which made normals for all elements (vertices, faces) to be drawn when using the normals overlay. Also remove usage of uints for the flag in the APIs.
2022-06-12Fix T98745: Anchored mode not working for sculpt smear brushJoseph Eagar
2022-06-12Fix T98784: PBVH gpu layout check being ignoredJoseph Eagar
Moved gpu vert format checking outside of pbvh_update_draw_buffers, which isn't called in every code path of BKE_pbvh_draw_cb. This led to the draw cache being partially populated by old draw buffers that were subsequently freed, causing a crash.
2022-06-12Cleanup (GPU): Improve efficiency of circle drawing.Chris Blackbourn
2022-06-12Fix unreported: Choose nsegments for 2D rotation gizmo based on screen scale.Chris Blackbourn
This mostly affects large rotation gizmos at high DPI. Without this patch, they appear as 32-gons instead of circles.
2022-06-12Fix unreported: 2D Gizmo bounding box updated to use gizmo scale.Chris Blackbourn
2022-06-11Fix T98517: Curve Fill Node creating extra edges.Howard Trickey
The delaunay2d function, with mode CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES sometimes didn't eat away all of the edges. Doing a prepass to remove the outer edges until they hit the constraints solves this problem.
2022-06-10Fix T97362: forward slashes in USD texture pathsMichael Kowalski
Ensuring that relative paths to textures in exported USDs use forward slash separators, for cross-platform compatibility.
2022-06-10LineArt: Clean up `LineartRenderBuffer`.Yiming Wu
This patch does code clean ups in `LineartRenderBuffer` because it's grown kinda big and we need better way to organize those variables inside. Reviewed By: Sebastian Parborg (zeddb) Differential Revision: https://developer.blender.org/D15172
2022-06-10USD import: Handle material name collisionsMichael Kowalski
This is a partial fix for T90535. Added Material Name Collision USD import menu option, to specify the behavior when USD materials in different namespaces have the same name. The Material Name Collision menu options are - Make Unique: Import each USD material as a unique Blender material. - Reference Existing: If a material with the same name already exists, reference that instead of importing. Previously, the default behavior was to always keep the existing material. This was causing an issue in the ALab scene, where dozens of different USD materials all have the same name, usdpreviewsurface1, so that only one instance of these materials would be imported. Reviewed by: Sybren Differential Revision: https://developer.blender.org/D14869
2022-06-10LibOverride: Consider animated/driven properties as part of the 'system ↵Bastien Montagne
override' ones in the Outliner. Conceptually animated/driven properties are not controlled by the liboverride system anymore, even though they may generate override operations. So consider them as part of the 'system overrides' category, and hide them by default in the Outliner.