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-12-16Cycles: pointcloud renderingBrecht Van Lommel
This add support for rendering of the point cloud object in Blender, as a native geometry type in Cycles that is more memory and time efficient than instancing sphere meshes. This can be useful for rendering sand, water splashes, particles, motion graphics, etc. Points are currently always rendered as spheres, with backface culling. More shapes are likely to be added later, but this is the most important one and can be customized with shaders. For CPU rendering the Embree primitive is used, for GPU there is our own intersection code. Motion blur is suppored. Volumes inside points are not currently supported. Implemented with help from: * Kévin Dietrich: Alembic procedural integration * Patrick Mourse: OptiX integration * Josh Whelchel: update for cycles-x changes Ref T92573 Differential Revision: https://developer.blender.org/D9887
2021-12-16Revert "Cycles-X: Add hysteresis to resolution divider algorithm"Brecht Van Lommel
This reverts commit d8b42751625c915113b64f5a2d9c72f19f009fee. It causes reduced viewport render resolution. Revert for now until I have time to look into this more closely.
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-15Fix T93995: Cycles camera motion blur not working in right stereo viewBrecht Van Lommel
Thanks to Michael (michael64) for identifying the solution. Ref D13567
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.
2021-12-15Fix T93949: Preview Image Error When No ScreenHarley Acheson
Fix an error if "File Preview Type" is "Auto" and there is no screen. See D13574 for details. Differential Revision: https://developer.blender.org/D13574 Reviewed by Julian Eisel
2021-12-14Fix possible use-after-free on error handling during VR view drawingJulian Eisel
Whenever an exception happens in VR session code, we cancel the entire session. Alongside that, we removed the "surface" item used to draw into an offscreen context. This would mess up the iterator of the surface draw loop. Similar to 7afd84df409a.
2021-12-14Fix null-pointer dereference on error handling during VR view drawingJulian Eisel
2021-12-14Fix possible use-after-free on error handling during VR view drawingJulian Eisel
Whenever an exception happens in VR session code, we cancel the entire session. Alongside that, we removed the "surface" item used to draw into an offscreen context. But this may still be stored as active surface, leading to a use-after-free when deactivating this active surface, for example.
2021-12-14Fix Cycles compilation with CUDA / Optix after recent Map Range additions.Thomas Dinges
2021-12-14Nodes: Add vector support to Map Range nodeCharlie Jolly
This replaces lost functionality from the old GN Attribute Map Range node. This also adds vector support to the shader version of the node. Notes: This breaks forward compatibility as this node now uses data storage. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D12760
2021-12-14Cleanup: Remove unused argumentsHans Goudey
2021-12-14Cleanup: Remove runtime uiBlock pointer from nodesHans Goudey
Code is simpler when the uiBlocks used during drawing are simply stored in an array. Additionally, looping can be simpler when we use an vector to hold a temporary copy of the tree's linked list of nodes. This patch also slightly changes how uiBlocks are "named" in `node_uiblocks_init`. Now it uses the node name instead of the pointer, which is helpful so we rely less on the node's address. Differential Revision: https://developer.blender.org/D13540
2021-12-14Cleanup: Simplify node group input and output socket verificationHans Goudey
This commit refactors the way the socket lists for group nodes, and group input/output nodes are verified to match the group's interface. Previously the `bNodeSocket.new_sock` pointer was used to temporarily mark the new sockets. This made the code confusing and more complicated than necessary. Now the old socket list is saved, and sockets are moved directly from the old list to a new list if they match, or a new socket is created directly in the new list. This change is split from D13518, which aims to remove the `new_node` and `new_sock` pointers. In the future this code might be removed entirely in favor of using node socket declarations. Differential Revision: https://developer.blender.org/D13543