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-12-17Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-supportSiddhartha Jejurkar
2021-12-17Outliner ID Remap Users: hide ID type from the UIPhilipp Oeser
The correct type should be set by invoke already, changing it to a non- matching type (e.g. trying to remap Mesh users with a Camera block) does not really make sense afaict, reason being that we would be presented with the "Invalid old/new ID pair" message in such case anyways (code checks GS(old_id->name) == GS(new_id->name)). This alone wouldnt be a pressing issue, but since doing this with an object ID type crashes atm., it seems to make sense to clean this up now (of course the crash should be looked into, but this is for a separate patch -- if that is solved, we could also think about adding the "Remap Users" entry back in the context menu for objects as well [which was removed in rB17bd5c9d4b1e for some reason]). Part of T93799. Differential Revision: https://developer.blender.org/D13512
2021-12-17Fix (unreported): missed running versioning code in some filesJacques Lucke
The versioning code was accidentally put not at the very bottom. That lead to a situation where it wasn't run on some files that happened to be within a specific short time frame. Since the versioning code is idempotent, it can just run again on existing files. Therefore, this commit just moves it back to the bottom so that it is executed on all files again. Broken Commit: rB5b61737a8f41688699fd1d711a25b7cea86d1530.
2021-12-17Fix T94166: set handle position node crashed after refactorJacques Lucke
This was an oversight in rB8e2c9f2dd3118bfdb69ccf0ab2b9f968a854aae4.
2021-12-17GPU: Sort SSBOs In Shader Interface.Jeroen Bakker
SSBOs weren't sorted, but other types were. This was an oversight when SSBOs were introduced (GPU compute pipeline). Issue identified by @fclem.
2021-12-17Cleanup: Silenced unused var warnings.Jeroen Bakker
2021-12-17UI: move "undo history" from a custom popup to a menu typeCampbell Barton
This lets the undo history expand as a regular sub-menu instead of being a popup. Also disable the active undo step menu item as this is a no-op.
2021-12-17Cleanup: spelling in commentsCampbell Barton
2021-12-17Cleanup: use more common naming suffix for item callbacksCampbell Barton
2021-12-17UI: Correct "QuickTime" SpellingJohannes Jakob
Change the spelling of the QuickTime output video container item from "Quicktime" to "QuickTime" Differential Revision: https://developer.blender.org/D10929 Reviewed by Harley Acheson
2021-12-17Cleanup: Simplify logic in set material nodeHans Goudey
2021-12-17Geometry Nodes: Support point clouds in the set material nodeHans Goudey
Now that point clouds can be rendered with cycles, it makes sense to allow assigning a material to them. Note that like volumes, they only support a single material though.
2021-12-16Cleanup: Move curve.c to C++Hans Goudey
I need this for a refactor I'm looking into for bounding boxes. It may be helpful in the future when using `CurveEval` in more places. Differential Revision: https://developer.blender.org/D13596
2021-12-16LibOverride: Further improve creation/resync pre-process speed.Bastien Montagne
Fully get rid of `BKE_collection_object_find` in `lib_override_group_tag_data_object_to_collection_init`, even if only used a few times this function was still noticeable in profiling data. Now instead loop over collections' objects to build required object-to-collections mapping. Adds an extra 5-10% speed-up compared to previous commit rB0624fad0f3ff. Related to T94059.
2021-12-16Fix T94109: 3d cursor crash when using shortcutGermano Cavalcante
Operator was erroneously starting edge_slide operation. Revert part of the changes in rB3fab16fe8eb4 as obedit_type was being confused with object_mode.
2021-12-16LibOverride: Improve speed of resync and creation of liboverrides.Bastien Montagne
`BKE_collection_object_find` has extremely bad performances (very high time complexity). While ideally this should be fixed in that API, for now cache its results once at the beginning of the resync/creation process. This makes loading of complex production files with a lot of liboverrides to resync three to four times faster. Thanks to @brecht for the profiling in T94059.
2021-12-16LibOverride: Cleanup log about unfound subitems.Bastien Montagne
Not finding subitem when its name and index are invalid/unset is expected behavior, and does happen when e.g. inserting a new constraint or modifier at the begining of the stack.
2021-12-16Fix T94115: Selecting current action in undo history undoes allCampbell Barton
When selecting the current undo step there is no need to do anything. Fix and minor refactor to de-duplicate refreshing after running undo/redo & undo history.
2021-12-16UI: support Copy To Selected for id-properties [GN modifier properties]Philipp Oeser
Both {key Alt} editing behavior as well as `Copy To Selected` were not working on geometry nodes modifiers (even if these matched exactly - having the same nodegroup - on multiple objects) Reason is that code checks pointer equality on the discovered properties [geometry nodes modifier properties are stored as ID properties], but these are not the same across objects (since these are fetched from NodesModifierSettings - which are different on different objects). note: if general custom properties are "API defined" on existing classes, this was working, we are getting the exact property for different IDs in this case Now be more permissive with ID properties not defined on classes in general and dont check pointer equality for them. For ID properties on specific IDs (not the ones defined on classes) this //might// be undesired (havent spotted issues though, even if equally named ID properies with different types existed -- this then simply does nothing). For geometry nodes modifiers, new code also checks if the nodegroups are the same [since generic naming "Input_XXX" is shared for all modifiers -- and starting to copy over things to unrelated modifiers is not desired here]. Fixes T93983. Maniphest Tasks: T93983 Differential Revision: https://developer.blender.org/D13573
2021-12-16UI: deduplicate code for Copy To Selected and Alt-button tweakingPhilipp Oeser
This resolves an old TODO to deduplicate code in copy_to_selected_button & ui_selectcontext_begin. This is also in hindsight of adding id-property support [incl. Geometry Nodes modifier properties] for this in the next commit. No behavior change expected here. ref T93983 & D13573
2021-12-16Cleanup: correct docstring for `driver_variable_name_validate`Sybren A. Stüvel
No functional changes.
2021-12-16Docs: add doc-strings for BLI_path functionsCampbell Barton
2021-12-16Animation: send notifier when keyframe is insertedSybren A. Stüvel
`<some_id>.keyframe_insert()` now sends a notifier that animation data was changed, so that animation-related editors can properly refresh. Since this function is quite high-level (if necessary it creates the Action and FCurves), I thought this would be a suitable location for the notifier. If high keyframing speed is required, it is still recommended to use `FCurveKeyframePoints.insert(options={'FAST'})` instead.
2021-12-16Fix compile error on Windows.Thomas Dinges
2021-12-16WM: various changes to file writing behaviorCampbell Barton
Saving with only a filename (from Python) wasn't being prevented, while it would successfully write the file to the working-directory, path remapping and setting relative paths wouldn't work afterwards as `Main.filepath` would have no directory component. Disallow this since it's a corner case which only ever occurs when path names without any directories are used from Python, the overhead of expanding the working-directory for all data saving operations isn't worthwhile. The following changes have been made: - bpy.ops.wm.save_mainfile() without a filepath argument fails & reports and error when the file hasn't been saved. Previously it would write to "untitled.blend" and set the `G.main->filepath` to this as well. - bpy.ops.wm.save_mainfile(filepath="untitled.blend") fails & reports and error as the filename has no directory component. - `BLI_path_is_abs_from_cwd` was added to check if the path would attempt to expand to the CWD.
2021-12-16Cleanup: simplify file saving logicCampbell Barton
Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations.
2021-12-16Nodes: Begin splitting composite node buttons into individual filesAaron Carlisle
Currently, most node buttons are defined in `drawnode.cc` however, this is inconvenient because it requires editing many files when adding new nodes. The goal is to minimize the number of files needed to add or update a node. This commit moves most of the node layout functions for composite nodes into their respected `source/blender/nodes/composite/nodes` file. In the future, these functions will be simplified to `node_layout` once files have their own namespace. See {D13466} for more information. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D13523
2021-12-16Remove G.relbase_validCampbell Barton
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
2021-12-16Cleanup: spellingCampbell Barton
2021-12-16Cleanup: clang-formatCampbell Barton
2021-12-16Cleanup: unused variable warningCampbell Barton
2021-12-16Fix various cases of incorrect filtering in node link drag searchHans Goudey
Some nodes didn't check the type of the link's socket for filtering. Do this with a combination of manually calling the node tree's validate links function and using the helper function for declarations. Also clean up a few cases that added geometry sockets manually when they can use the simpler helper function.
2021-12-16Fix: Compare node missing from link drag searchHans Goudey
This was missing from rB11be151d58ec0ca955f. It uses the same approach as the quadrilateral node.
2021-12-16Fix: Crash in nodes modifier with missing node groupHans Goudey
We cannot depend on node->id being non-null for group nodes.
2021-12-15Cleanup: Use const arguments, referencesHans Goudey
Also slightly change naming to avoid camel case.
2021-12-15Cleanup: Remove no-op node preview function callsHans Goudey
This patch removes no-op node editor preview code (`PR_NODE_RENDER`) and most calls to `BKE_node_preview_init_tree`. The only remaining call is in the compositor. - Shader nodes previews don't seem to do anything. - In-node previews for the texture node system doesn't work either. This is a first step to refactoring to remove `preview_xsize`, `preview_ysize`, and `prvr` from nodes in DNA, aligned with the general goal of removing runtime/derived data from data structs. Differential Revision: https://developer.blender.org/D13578
2021-12-15Node Editor: Link Drag Search MenuHans Goudey
This commit adds a search menu when links are dragged above empty space. When releasing the drag, a menu displays all compatible sockets with the source link. The "main" sockets (usually the first) are weighted above other sockets in the search, so they appear first when you type the name of the node. A few special operators for creating a reroute or a group input node are also added to the search. Translation is started after choosing a node so it can be placed quickly, since users would likely adjust the position after anyway. A small "+" is displayed next to the cursor to give a hint about this. Further improvements are possible after this first iteration: - Support custom node trees. - Better drawing of items in the search menu. - Potential tweaks to filtering of items, depending on user feedback. Thanks to Juanfran Matheu for developing an initial patch. Differential Revision: https://developer.blender.org/D8286
2021-12-15Refactor: Simplify spreadsheet handling of cell valuesHans Goudey
Previously we used a `CellValue` class to hold the data for a cell, and called a function to fill it whenever necessary. This is an unnecessary complication when we have virtual generic arrays and most data is already easily accessible that way anyway. This patch removes `CellValue` and uses `fn::GVArray` to provide access to data instead. In the future, if rows have different types within a single column, we can use a `GVArray` of `blender::Any` to interface with the drawing. Along with that, the use of virtual arrays made it easy to do a few other cleanups: - Use selection domain interpolations from rB5841f8656d95 for the mesh selection filter. - Change the row filter to only calculate for necessary indices. Differential Revision: https://developer.blender.org/D13478
2021-12-15Fix T93975: add more nested instance limit checksJacques Lucke
Differential Revision: https://developer.blender.org/D13585
2021-12-15Initialize the fourth and final instance variable of MemoryProxyMichael
The constructor of MemoryProxy initializes 3 of 4 instances variables. If a MemoryProxy is constructed and MemoryProxy::free is called on this instance, buffer_ is undefined and 'delete buffer_;' causes errors. Although this misuse pattern does not exist in the current codebase it already tripped up the Address Sanitizer on various occasions while debugging unrelated problems. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13569
2021-12-15Geometry Nodes: Add Selection to Attribute StatisticsJohnny Matthews
This adds a bool field selection input to the Attribute Statistics node. This is useful for running calculations on a subset of the input field data rather that then whole set. Differential Revision: https://developer.blender.org/D13520
2021-12-15Fix T93971: "Center Cursor & Frame All" fails to redrawCampbell Barton
bda9e4238a07a72c26598ea9025e00f6ca896750 changed smooth-view not to redraw when there were no changes made. Redrawing is needed for repositioning the cursor. Subscribe to changes to the 3d cursor to ensure all view ports are updated (not just the current one).
2021-12-15Cleanup: remove disabled codeCampbell Barton
Originally pointcache wasn't supported when the file wasn't saved. Remove commented code as this hasn't been the case for a long time.
2021-12-15Cleanup: unused variable warningCampbell Barton
2021-12-15MetaBall: optimize memory allocation for meta-ball tessellationCampbell Barton
Double the allocation size when the limit is reached instead of increasing by a fixed number. Also re-allocate to the exact size once complete instead of over allocating. This gives a minor speedup in my tests ~19% faster tessellation for ~1million faces.
2021-12-15Fix meta-ball bound-box calculation reading past buffer boundsCampbell Barton
This broke "test_undo.view3d_multi_mode_select" test in "lib/tests/ui_simulate" and is likely exposed by recent changes to bounding box calculation. The missing check for DL_INDEX4 dates back to code from 2002 which intended to check this but was checking for DL_INDEX3 twice which got removed as part of a cleaned up. This could be hidden from memory checking tools as meta-balls over-allocate vertex arrays.
2021-12-15Fix compile errors on windows.Jeroen Bakker
2021-12-15Cleanup: Use pixel in stead of texels in naming.Jeroen Bakker
2021-12-15Images: 1,2,3 channel support for transform function.Jeroen Bakker
Added support for 1, 2, 3 float channel source images. Destination images must still be 4 channels.
2021-12-15Fix T94082: Curve to point empty evaluated NURBS crashHans Goudey
This is basically the same as rBee4ed99866fbb7ab04, the fix is simply to check if the spline has evaluated points when deciding the offsets into the result points array.