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-08-27Cleanup: rename filename to filepath when used for full pathsCampbell Barton
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-27Fix T84369: Fluid: Missing cache invalidation when properties on non-domain ↵Germano Cavalcante
objects change The `DEG_OB_COMP_TRANSFORM` and `DEG_OB_COMP_GEOMETRY` relations between the **Domain** object and the **Flow**, **Effector** and **Force Field** objects are added in the `updateDepsgraph` callback of the Fluid modifier, more specifically in `DEG_add_collision_relations`. The node linked to these components is the `POINT_CACHE` whose assigned function is `BKE_ptcache_object_reset`. So include the `eModifierType_Fluid` modifier in outdated cache checks. Reviewed By: sergey, zeddb Maniphest Tasks: T84369 Differential Revision: https://developer.blender.org/D15210
2022-06-07Cleanup: spelling in comments, additional white spaceCampbell Barton
2022-05-17Cleanup: use term 'filepath' for full file pathsCampbell Barton
2022-05-04Fix T95527: wrong motion blur with rigid bodiesBrecht Van Lommel
This index is not meant for the point cache data array, it's already offset.
2022-04-26Cleanup: use boolean arguments and return valuesCampbell Barton
2022-04-14Fix T68290: Baked particles don't render in final frameCampbell Barton
Particles baked into memory would never load the final frame because of an off-by-one error calculating the particles `dietime`. This value indicates the frame which the particle ceases to exist but was being set to the end-frame which caused this bug as the scenes end-frame is inclusive. While the last frame was properly written and read from memory, the `dietime` was set to the last frame causing all the particles to be considered dead when calculating the cached particle system.
2022-03-09Cleanup: use ELEM macroCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-01-20Fix T93520: wrong subframe motion blur with rigid body physicsBrecht Van Lommel
The code here was using velocity based interpolation copied from particles. However there is no velocity cached in the rigid body point cache so the results were non-sensical.
2021-12-28Fix loss of cloth disk cache on reload in library overrides.Alexander Gavrilov
If the override system creates an override record for the cache name (no idea why though), it trashes the disk cache on file load. The reason is that it tries to rename cache files in update handler when assigning the name, and BLI_rename deletes the target file even if both names are the same. This is a safe fix that simply aborts the pointless rename attempt. Differential Revision: https://developer.blender.org/D13679
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-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-07Cleanup: remove BKE_ptcache_removeCampbell Barton
No longer needed as the temporary directory is cleared on exit.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-03Cleanup: Replace int with bool for pointcache functionJulian Eisel
Was using an int for boolean return value.
2021-07-12Cleanup: improve naming and comments of scene frame/ctime functionsBrecht Van Lommel
Confusingly, BKE_scene_frame_get did not match the frame number as expected by BKE_scene_frame_set. Instead it return the value after time remapping, which is commonly named "ctime". * Rename BKE_scene_frame_get to BKE_scene_ctime_get * Add a new BKE_scene_frame_get that matches BKE_scene_frame_set * Use int/float depending if fractional frame is expected
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-04-30Cleanup: avoid ambiguous parenthesisCampbell Barton
2021-01-05Fix: tried to set error message on modifier that does not existJacques Lucke
Without this, the example file in T83730 crashes in a debug build when deleting the hair edit bake in the particle settings.
2021-01-04Fix T83876: blender crashes when baking particles + smoke simJacques Lucke
This was introduced in rBe5c0d4613a8943c712b57fb336997ecd78e6508e. The issue is that the new fluid system does not use the pointcache system for caching anymore, but still relies on pointcache for other things. For example, it uses DEG_add_collision_relations which internally creates relations with pointcache. Not sure if there are other issues. Ideally, this dependence should be resolved in one way or another at some point, but that is out of scope for this fix. Differential Revision: https://developer.blender.org/D9984 Reviewers: brecht
2020-12-02Geometry Nodes: initial scattering and geometry nodesJacques Lucke
This is the initial merge from the geometry-nodes branch. Nodes: * Attribute Math * Boolean * Edge Split * Float Compare * Object Info * Point Distribute * Point Instance * Random Attribute * Random Float * Subdivision Surface * Transform * Triangulate It includes the initial evaluation of geometry node groups in the Geometry Nodes modifier. Notes on the Generic attribute access API The API adds an indirection for attribute access. That has the following benefits: * Most code does not have to care about how an attribute is stored internally. This is mainly necessary, because we have to deal with "legacy" attributes such as vertex weights and attributes that are embedded into other structs such as vertex positions. * When reading from an attribute, we generally don't care what domain the attribute is stored on. So we want to abstract away the interpolation that that adapts attributes from one domain to another domain (this is not actually implemented yet). Other possible improvements for later iterations include: * Actually implement interpolation between domains. * Don't use inheritance for the different attribute types. A single class for read access and one for write access might be enough, because we know all the ways in which attributes are stored internally. We don't want more different internal structures in the future. On the contrary, ideally we can consolidate the different storage formats in the future to reduce the need for this indirection. * Remove the need for heap allocations when creating attribute accessors. It includes commits from: * Dalai Felinto * Hans Goudey * Jacques Lucke * Léo Depoix
2020-11-20Merge branch 'blender-v2.91-release'Jeroen Bakker
2020-11-19Fix T82769: remove thread local data from PTCacheMemJacques Lucke
The issue was that the same point cache was read by multiple threads at the same time (the same object was evaluated for render and for the viewport). Both threads incremented PTCacheMem->cur which lead to the crash. The fix is to remove the PTCacheMem->cur and store it on the stack instead. This way every thread has its own cur. Reviewers: brecht Differential Revision: https://developer.blender.org/D9606
2020-11-16Fix broken pointcache on disk in some cases.Bastien Montagne
Root of the issue is that point caches are added to the object's list on-demand, which often ends up with them being added only during depsgraph evaluation, i.e. on COW objects. This could result in having 'orig' data caches with invalid/unset stack index at some points (e.g. when reading a file and applying liboverrides), leading to discarding valid existing disk cache files. Fact that one of those index is signed, and the other not, does not help... While this is very weak, fixing broken PointCache code is out of the scope of a bug fix, so this patch merely: * Simplifies and factorizes the code generating the 'extension' part of caches filenames; * Ensures `BKE_object_insert_ptcache` is called when needed so that we always have a valid stack index to generate that filename extension. This is only a bandaid, but it is simple and should be safe enough for now. Related to T82503.
2020-11-16Fix (unreported) potential buffer overflow in PointCache code.Bastien Montagne
2020-11-06Refactor: move PointCache .blend I/O to blenkernelJacques Lucke
Ref T76372.
2020-11-06Cleanup: use ELEM macroCampbell Barton
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-10-26Modifiers: include the object & modifier when logging errorsCampbell Barton
Without this, there was no way of finding out which object, modifier combination caused the error, making the logs not very useful for debugging.
2020-10-19Spelling: Then Versus ThanHarley Acheson
Corrects incorrect usages of the words 'then' and 'than'. Differential Revision: https://developer.blender.org/D9246 Reviewed by Campbell Barton
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-23Cleanup: remove dead code in point cache and openvdb wrapperJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D8988
2020-09-23Cleanup: remove last uses of WITH_SMOKEJacques Lucke
2020-09-23Cleanup: remove smoke code from pointcacheJacques Lucke
This code is not used by the new fluid simulation system. Therefore, it does not make sense to keep it around. We do want to integrate the fluid system with the generic cache system eventually, but refactoring the system is easier when there is less dead code that has to be refactored. Note, I could not remove BKE_ptcache_id_from_smoke entirely yet, because the depsgraph seems to expect that object that uses DEG_add_collision_relations also has a pointcache. That is because it wants to reset the point cache when any of the other objects changed (this does not work with fluids currently). Reviewers: sebbas Differential Revision: https://developer.blender.org/D8987
2020-09-21Fix T59272: dead particles not included in render, but visible in viewportJacques Lucke
The issue was that the pointcache was not storing dead particles, even though they are displayed. This lead to the rendering issue, because only alive particles can be read from the point cache in the frame that is rendered. This also fixes an issue unrelated to rendering: when dead particles are displayed, their position is incorrect when some frames are skipped during playback. Reviewers: brecht Differential Revision: https://developer.blender.org/D8907
2020-09-19Cleanup: consistent TODO/FIXME formatting for namesCampbell Barton
Following the most widely used convention for including todo's in the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
2020-09-09Fix T80596: Convert to Curve from Mesh crashes BlenderSebastian Parborg
The point cache code needs a non NULL rbw pointer. This could have been avoided if there was a sanity check in the convert function, so added a check there as well.
2020-08-18Cleanup: remove bmain argument from BKE_scene_graph_update_for_newframeJacques Lucke
Reviewers: sergey Differential Revision: https://developer.blender.org/D8613
2020-08-08Cleanup: use array syntax for sizeof with fixed valuesCampbell Barton
Also order sizeof(..) first to promote other values to size_t.
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-07-30Add compound shape for rigid body simulationDavid Vogel
This patch adds a new compound shape entry to the shape selection dropdown. It also corrects wrong inertia calculation for convex hulls, that resulted in strange behavior for small objects. The compound shape take the collision shapes from its object children and combines them. This makes it possible to create concave shapes from primitive shapes. Using this instead of the mesh collision shape is often many times faster. Reviewed By: Sergey, Sebastian Parborg Differential Revision: http://developer.blender.org/D5797
2020-07-22Particles: give emitter its own stateJacques Lucke
High quality emitters need to maintain state themselves. For example, this it needs to remember when it spawned the last particle. This is especially important when the birth rate is changing over time. Otherwise, there will be very visible artifacts. It is quite likely that other components of the simulation need their own state as well. Therefore, I refactored the `SimulationState` type a bit, to make it more extensible. Instead of using hardcoded type numbers, a string is used to identify the state type. Also, instead of having switch statements in many places, there is a new `SimulationStateType` that encapsulates information about how a specific state is created/freed/copied/... I removed the integration with the point cache for now, because it was not used anyway in it's current state.
2020-07-15Particles: use CD_PROP_FLOAT3 instead of CD_LOCATIONJacques Lucke
`CD_LOCATION` was only used temporarily due to the lack of a better alternative. This also removes the name from `CD_LOCATION` again, because at most one layer of this type should exist.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-09Particles: Create a simulation state for every Particle Simulation nodeJacques Lucke
Every Particle Simulation node has a name (or a path when it is in a node group). This name has to be used in the Simulation modifier on a point cloud to see the particles. Caching has been disabled for now, because it was holding back development a bit. To reset the simulation, go back to frame 1. Currently, there is no way to influence the simulation. There are just some randomly moving points. Changing that is the next step.