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-11-11Fix T100969: Memory leak GPU subdivision during rendering.Jeroen Bakker
The viewport cleans up old subdivision buffers right after drawing. During rendering this was not done and when rendering many frames this lead to memory issues. This patch will also clear up the GPU Subdivision buffers after any offscreen render or final render. There is already a mutex so this is safe to be done from a non main thread. Thanks to @kevindietrich to finding the root cause.
2022-11-10Fix strict compiler warningsSergey Sharybin
2022-11-10Cleanup: spelling in commentsCampbell Barton
2022-11-10Fix T102385: Set frame node active after joining nodesLeon Schittek
Set the created frame node to be the active node when joining nodes with the `NODE_OT_join` operator. This behavior was unintentonaly changed in rB545fb528d5e1 when the operator's execute function was simplified by utilizing the node tree topology cache. Reviewed By: Hans Goudey Differential Revision: http://developer.blender.org/D16440
2022-11-09Fix T101906: Modifier apply not working if target object is in excluded ↵Sergey Sharybin
collection The issue was introduced by the optimization of hidden objects and modifiers in the f12f7800c296. The solution here detects that either an object is hidden or the modifier is disabled and does special tricks to ensure the dependencies are evaluated. This is done by constructing a separate minimal dependency graph needed for the object on which the modifier is being applied on. This minimal dependency graph will not perform visibility optimization, making it so modifier dependencies are ensured to be evaluated. The downside of such approach is that some dependencies which are not needed for the modifier are still evaluated. There is no currently an easy way to avoid this. At least not without introducing possible race conditions with other dependency graphs. If the performance of applying modifiers in such cases becomes a problem the possible solution would be to create a temporary object with a single modifier so that only minimal set of dependencies is pulled in the minimal dependency graph. Differential Revision: https://developer.blender.org/D16421
2022-11-09Hide ratio when using error margin mode in decimate keyframes operatorColin Basnett
This fixes a bug in the function that determines what properties to show on the Decimate Keyframes operator. Before the fix, the "Remove" (i.e., `factor`) slider was visible no matter what "Mode" was being used. This meant that the slider was visible and modifiable when it had no effect, creating confusion. Reviewed By: sybren Differential Revision: https://developer.blender.org/D16318
2022-11-08Fix VSE: Effect strip flickers when moving left handleRichard Antalik
The issue was caused by refactoring, see 7afcfe111aacc8bc. Function `SEQ_transform_fix_single_image_seq_offsets` modified offsets after handle was moved, but this was not done correctly. Remove function mentioned above and move strip start when moving left handle of strips that have only single frame of content by design (image, text, color, ...).
2022-11-08Fix T102318: crash smoothing vertex weights in editmodePhilipp Oeser
Not quite sure why {rBd37d17019c52} forcefully set the Mesh to NULL if in editmode, but this caused the attribute lookup to fail/crash. Now only use the attribute if we have the mesh (reducing the scope where it is used), bmesh editmode case does not rely on it. Maniphest Tasks: T102318 Differential Revision: https://developer.blender.org/D16406
2022-11-08Fix T101894: only do FCurve-select if no keys have been touched previouslySybren A. Stüvel
Change the behaviour of circle select on FCurves: - Before any key is touched, the behaviour is as it was (key included in circle-select area → select it; otherwise → select entire curve) - If any key has been touched, an internal option (`use_curve_selection`) is flipped and selecting the entire curve is disallowed. This ensures that once a key changes selection state, it's no longer possible to select the entire curve. This allows dragging over keys and subsequently drag over a keyless part of the curve. Reviewed By: RiggingDojo, troopy28 Maniphest Tasks: T101894 Differential Revision: https://developer.blender.org/D16307
2022-11-08Fix T102312: anchored brush texture overlay draws in wrong placePhilipp Oeser
Rotation and scale was done around the wrong center (always around mouse position) in paint_draw_tex_overlay [on the other hand, paint_draw_cursor_overlay already got the center right]. Now make the center dependent on UnifiedPaintSettings "draw_anchored". Maniphest Tasks: T102312 Differential Revision: https://developer.blender.org/D16418
2022-11-08Fix T85870: ColorRamp Keyframes crash BlenderJulian Eisel
The color-band needs to do some special, rather awkward updating of the UI state when certain values are changed. As @lichtwerk noted in the report, this was done to the wrong buttons. Now lookup the proper buttons, and don't assume that `uiItemR()` only adds a single button (which often isn't the case).
2022-11-08Fix deprecation warnings about printf() on macOSSergey Sharybin
The new Xcode 14.1 brings the new Apple Clang compiler which considers sprintf unsafe and geenrates deprecation warnings suggesting to sue snprintf instead. This only happens for C++ code by default, and C code can still use sprintf without any warning. This changes does the following: - Whenever is trivial replace sprintf() with BLI_snprintf. - For all other cases use the newly introduced BLI_sprintf which is a wrapper around sprintf() but without warning. There is a discouragement note in the BLI_sprintf comment to suggest use of BLI_snprintf when the size is known. Differential Revision: https://developer.blender.org/D16410
2022-11-08Fix T100988: flickering when using sculpt brush in drag dot modeJacques Lucke
Differential Revision: https://developer.blender.org/D16305
2022-11-08Fix T102242: Underline shortcut keys not working/appearing in sub-menuJulian Eisel
Upon closer inspection, looks like `UI_BLOCK_NUMSELECT` was previously set for all code paths and 99e5024e97f1 removed it from one.
2022-11-08Cleanup: format, remove commented code & unused variableCampbell Barton
2022-11-07Fix T102329: assert when cutting node tree linkJacques Lucke
2022-11-07Fix T101526: assert due to wrong node tree owner idJacques Lucke
2022-11-07Fix T102311: crash when opening node add menu with assetsJacques Lucke
2022-11-07Fix T102053: snap fails with instances of geometry nodesGermano Cavalcante
As instances are often generated geometries, we cannot rely on the data provided by `DupliObject::ob`. Use `DupliObject::ob_data` when possible. This required a major refactor in the code as the output variables are now gathered in context and easier to access.
2022-11-07Fix potentially uninitialized memory usageGermano Cavalcante
`nearest_world_tree_co` allows null parameter, so the `index` variable isn't really needed and doesn't even need to be initialized.
2022-11-07Transform: remove SnapData cache for meshesGermano Cavalcante
All cache needed is already stored in `Mesh.runtime`.
2022-11-07Fix File Browser Move Bookmark malfunction if no item is selectedPhilipp Oeser
The operator was acting on non selected items (wasnt checking SpaceFile bookmarknr for being -1) which could end up removing items even. Now sanatize this by introducing proper poll (which returns false if nothing is selected). Fixes T102014. Maniphest Tasks: T102014 Differential Revision: https://developer.blender.org/D16385
2022-11-04Fix T99641: Assert hit when splitting video sequencer area horizontallyRichard Antalik
Don't draw channels region when height is 0.
2022-11-04Fix T102218: Baked f-curves display incorrectly when normalizedColin Basnett
This fixes T102218, where baked f-curves would display incorrectly when normalized. This bug was a result of the code making no effort to determine the y-range of baked f-curves, so it fell back to a default that looked horrible. I've added specific handling for finding the y-range of each f-curve (I extracted this functionality out to a new function, `fcurve_scene_coord_range_get`, for organization purposes). In addition, a minor optimization was made to eliminate redundant range-checks when in preview range mode. {F13838304} Reviewed By: sybren Maniphest Tasks: T102218 Differential Revision: https://developer.blender.org/D16363
2022-11-04Fix missing call to AttributeWriter::finish with paint vertex selectionCampbell Barton
2022-11-04Fix T101686: WPaint + Pose select fails with GPU depth-picking disabledCampbell Barton
Regression in [0], however the primary purpose of that code was to cycle away from the active object (behavior which was intentionally removed, see: T96752). This broke weight-paint + pose-selection (Ctrl-LMB) when the GPU depth picking preference was disabled. Causing selection to pick the mesh object instead of the pose bones. This de-selected the armature, making the pose bones unselectable instead of selecting the pose bone as intended. Adding the old code back (restricting it to weight-paint mode) fixes the bug but reintroduces fairly involved logic unnecessarily. Instead, prioritize bone selecting when in weight-paint & pose mode (previously this was only done in pose-mode). [0]: b1908f2e0b23988627772f6a6d968d8351dca6d7
2022-11-03Cleanup: replace BLI_join_path with BLI_join_stringCampbell Barton
There is no need to use path joining logic here.
2022-11-03BLI_string: C++ support for string joining macrosCampbell Barton
C++ doesn't support taking the temporary address of a temporary array, use inline functions instead. Also change array joining functions to return the length of the string instead of returning the pointer (matching BLI_path_join).
2022-11-03UI: Bevel: Specify the width type as "Width Type" in the status bar.Aaron Carlisle
Part of T102224
2022-11-02Fix empty menu title in some menus (e.g. Text Editor context menu)Julian Eisel
2022-11-02Fix arrow key menu navigation using wrong directionJulian Eisel
Steps to reproduce were: * Right click in 3D View (context menu) press up or down arrow. Or: * Ctrl+Shift+O (Open Recent menu) press up or down arrow.
2022-11-02Refactor: Rename Object->imat to Object->world_to_objectSergey Sharybin
The goal is to improve clarity and readability, without introducing big design changes. Follows the recent obmat to object_to_world refactor: the similar naming is used, and it is a run-time only rename, meaning, there is no affect on .blend files. This patch does not touch the redundant inversions. Those can be removed in almost (if not all) cases, but it would be the best to do it as a separate change. Differential Revision: https://developer.blender.org/D16367
2022-11-02Nodes: Reuse input sockets when creating new node groupsCsaba Boncsér
**Problem** Currently multiple input sockets are created when a new node group is made from selected nodes. Some of these are linked from the same source. It is not convenient to sort out and remove multiple input sockets that represent the same input. These inputs usually have meaningless names like 'value', 'x', etc. **Solution** Create common input sockets for each link starting from the same input. Move links inside the new group's node tree and reroute it to connect the common input socket to the original nodes. This is done by building up a mapping between the incoming link sources to the input interfaces created for them. The input interfaces are reused by the rest of the links having the same source. This patch also changes the way the input sockets get their names. Output socket names of the group nodes usually are specific and are given consciously. Use the output socket names from group nodes instead of the inputs where the links point to. Differential Revision: https://developer.blender.org/D15802
2022-11-02Fix use-after-free in asset library storage destructionJulian Eisel
Would only appear when more than 4 asset libraries were loaded, because small buffer optimization would hide the issue.
2022-11-01UI/Nodes: Update node add menu as assets get loadedJulian Eisel
Adds a listener to the node add menu so that it refreshes as assets get loaded asynchronously. Followup to cf985180551d, also see 99e5024e97f1 and the previous commit.
2022-11-01UI: Support C defined menu types to listen to notifiersJulian Eisel
Needed to dynamically load assets as menu items, see cf985180551d and 99e5024e97f1. The next commit will add the listener for the node add menu.
2022-11-01UI: Support refreshing menu popupsJulian Eisel
This allows us to asynchronously load items into the menu, see cf985180551d. All menus spawned from Python using the `wm.call_menu` operator will be affected by this. We could avoid that and only refresh the menu we need to, but it's worth trying to get this to work as a general menu feature. This is a slightly risky change, so keeping an eye open for bugs.
2022-11-01Nodes: Add node group assets in add menuHans Goudey
This patch builds on the work from bdb57541475f to add node group assets directly in the node editor add menu. Assets are added after separators to distinguish them, but otherwise they look like any other node. The catalog trees from all configured libraries are used to build the menu hierarchy. Only catalogs with matching asset types are used though. There are a few limitations of this initial version. For now this only supports geometry nodes. Support for other built-in node systems just requires some refactoring of the corresponding add menu though. Lazy loading will be added in a followup commit. For now there is a label the first time the menu is opened. Like the search menu integration, re-saving asset library files in 3.4 is required, if it hasn't been done already. Implementation wise, there is a some ugly code here. A lot of that is because the asset system isn't complete. The RNA API doesn't work well yet, and the system isn't built to interact with multiple libraries at once. It's also ugly because of the way we combine automatic menu generation with builtin menus. As noted in a code comment, these two systems could be merged completely so that the menus for builtin nodes are also generated in the same way. Differential Revision: https://developer.blender.org/D16135
2022-11-01Fix T101062: sculpt curves crash using a paintcurve brushPhilipp Oeser
For one, paintcurves were not considered in curves sculpt mode at all (so you couldnt draw them). This is now enabled. And the second issue was that since curves sculpt mode uses the reguar paint_stroke_modal() [which handles paintcurves], this was actually excuted, freeing the PaintStroke from SculptCurvesBrushStrokeData (but not the CurvesSculptStrokeOperation) and immediately return OPERATOR_FINISHED from modal (resulting in a double MEM_delete of SculptCurvesBrushStrokeData -- in both invoke and modal). There might be better ways to handle the memory free, for now the double freeing is prevented by setting the operator customdata to NULL (and check for that later). Maniphest Tasks: T101062 Differential Revision: https://developer.blender.org/D16099
2022-11-01Refactor: Rename Object->obmat to Object->object_to_worldSergey Sharybin
Motivation is to disambiguate on the naming level what the matrix actually means. It is very easy to understand the meaning backwards, especially since in Python the name goes the opposite way (it is called `world_matrix` in the Python API). It is important to disambiguate the naming without making developers to look into the comment in the header file (which is also not super clear either). Additionally, more clear naming facilitates the unit verification (or, in this case, space validation) when reading an expression. This patch calls the matrix `object_to_world` which makes it clear from the local code what is it exactly going on. This is only done on DNA level, and a lot of local variables still follow the old naming. A DNA rename is setup in a way that there is no change on the file level, so there should be no regressions at all. The possibility is to add `_matrix` or `_mat` suffix to the name to make it explicit that it is a matrix. Although, not sure if it really helps the readability, or is it something redundant. Differential Revision: https://developer.blender.org/D16328
2022-11-01Cleanup: spelling in commentsCampbell Barton
2022-11-01Cleanup: doxy comment formattingCampbell Barton
2022-11-01Cleanup: fix translation for rare UV unwrapping with unit scaleChris Blackbourn
Fixes very rare cases where the UV Cylinder Project, UV Sphere Project and UV From View might not set the translation correctly if the scale is exactly 1.0. Mainly fixed because this code might later be reused elsewhere.
2022-10-31Fix variable value assigned twice in successionGermano Cavalcante
Error introduced in rBa7aa0f1a0c24 Mentioned in https://pvs-studio.com/en/blog/posts/cpp/1004/ It could cause the absolute snap to the y direction to fail in some editor.
2022-10-30Fix T102163: GPencil:Set start point Operator make stroke deletedAntonio Vazquez
There were two problems: * The stroke was deleted if the last point was selected. Now the stroke is flipped because is faster. * If the second point was selected, the first point was removed because the internal api, removed one point strokes by default. This was done becaus ethe tools that used this API did not need one point strokes as result. Now this optional and keep one point strokes.
2022-10-30Cleanup: replace BLI string copy & append with BLI_path_join(..)Campbell Barton
Copying and appending is unnecessarily verbose with each call having to pass in the buffer size.
2022-10-30BLI_path: add BLI_path_append_dir (appends and ensures trailing slash)Campbell Barton
Avoid copying the string then calling BLI_path_slash_ensure afterwards.
2022-10-30Fix potential buffer overflow with BLI_path_slash_ensure useCampbell Barton
BLI_path_slash_ensure was appending to fixed sized buffers without a size check.
2022-10-30Fix T102132: Directory selection fails to add trailing slashCampbell Barton
Regression in [0], accessing the path from the file selector relied on BLI_join_dirfile adding a trailing "/" when the filename was empty. [0]: 9f6a045e23cf4ab132ef78eeaf070bd53d0c509f
2022-10-29Cleanup: use STREQ macroCampbell Barton