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-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-09Cleanup: remove redundant checks which have already been testedCampbell Barton
Note that these changes are limited simple cases as these kinds of changes could allow for errors when refactoring code when the known state is not so obvious.
2021-05-18Fix T88026: Repeated switch to rendered viewport crashesCampbell Barton
Resolve ownership ambiguity with shared physics pointers. Previously, LIB_ID_CREATE_NO_MAIN allowed pointer sharing with the source ID so physics caches can be shared between original and evaluated data: (Object.soft.shared & Object.rigidbody_object.shared). This only worked properly for LIB_TAG_COPIED_ON_WRITE ID's, as LIB_TAG_NO_MAIN can be used in situations where the original ID's lifetime limited by it's original data. This commit adds `LIB_ID_COPY_SET_COPIED_ON_WRITE` so ID's only share memory with original data for ID's evaluated in the depsgraph. For all other uses, a full copy of physics data is made. Ref D11228#287094
2021-02-02Force Fields: implement early filtering by the Affect flags.Alexander Gavrilov
Most fields have Affect Location and Rotation options that switch off their effect, but they are only checked as the last step after the force is already computed. It is more efficient to check it when building the list of field objects, just like zero weight. It is also possible to check the strength-related fields for 0. As an aside, this adds Location to Texture fields (they don't handle rotation) and both Location & Rotation checkboxes to Fluid Flow. Boid and Curve Guide remain without options for now as they are completely different from others. Differential Revision: https://developer.blender.org/D10087
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-15Fix T54293: calculate mass does not take object scale into accountJacques Lucke
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-09-02Fix segfaults when deleting objects with upstream bullet libSebastian Parborg
Blender tried to free objects twice from the bullet world sometime. First we would implicity remove all objects when recreating the bullet world and then explicity try to remove them again from the now empty world. This would wouldn't crash older bullet versions, but the recent versions will as we will try to free objects that no longer exists in the bullet world. Also clear the cache on deletion as the object order changes. Fix T77181: The cache clearing will fix this issue.
2020-09-02Make rigidbody simulation handle animated objects gracefullySebastian Parborg
The animated objects was not updated for each internal substep for the rigidbody sim. This would lead to unstable simulations or very annoying clipping artifacts. Updated the code to use explicit substeps and tie it to the scene frame rate. Fix T47402: Properly updating the animated objects fixes the reported issue. Reviewed By: Brecht, Jacques Differential Revision: http://developer.blender.org/D8762
2020-08-28Fix building without bullet supportSebastian Parborg
The new BKE_rigidbody_is_affected_by_simulation function was in side the WITH_BULLET ifdef guard.
2020-08-28Fix Rigidbody depsgraph passive and constraint transform relations.Sebastian Parborg
We need to have transforms from passive objects if they are animated or driven by parent relations. This is not immediately obvious as the object transform matrix will still be available, it is just one frame behind in some cases. Fixed dependency cycles if there is a constraint between two rigid bodies. Because bullet keeps track of its simulated bodies, we do not need to supply objects transforms as bullet should already have them. I need combine these two fixes because otherwise we will get depsgraph warnings that nodes are missing that it expects to be there. Reviewed By: Sergey, Jacques Differential Revision: http://developer.blender.org/D8732
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-31Cleanup: fix function signatureJacques Lucke
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-06-19Cloth: allow forces to act parallel to cloth.Alexander Gavrilov
Currently all force effectors can only act on cloth when the force is perpendicular to the surface. This makes sense for wind, but not for other forces; and the user may want even wind to have some friction. This changes effector code to output two force vectors - although you of course can pass the same pointer for both. The force is split between the two outputs based on a new per-effector setting. Differential Revision: https://developer.blender.org/D8017
2020-06-17Cleanup: doxy commentsCampbell Barton
2020-05-25UI/Physics: Show error enabling Rigid Body if compiled without BulletJulian Eisel
Would just silently fail, which is confusing. Should only impact custom builds.
2020-04-23Fix T75991: crash when rigidbody encounters unknown constraint typeCampbell Barton
This just adds a check to prevent the crash, Versioning invalid types still needed.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-28Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. This previously caused a bug in T74283, that should be fixed now. Differential Revision: https://developer.blender.org/D6695
2020-02-28Revert "Objects: make evaluated data runtime storage usable for types other ↵Brecht Van Lommel
than mesh" This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a. Fix T74283: modifier display lost when moving object in edit mode. The cause is not immediately obvious so better to revert and look at this carefully.
2020-02-27Objects: make evaluated data runtime storage usable for types other than meshBrecht Van Lommel
This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. Differential Revision: https://developer.blender.org/D6695
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-10-15Fix T70667: crash playing animation (after deleting rigid body obj)Philipp Oeser
Was crashing due to RBW mssing shared->physics_world [which can happen when undoing the deletion of the last object in the world]. This can be gained back by BKE_rigidbody_validate_sim_world. Reviewed By: mont29 Maniphest Tasks: T70667 Differential Revision: https://developer.blender.org/D6037
2019-10-08Cleanup/fix for fix (c).Bastien Montagne
Sorry for the noise... For once building with everything hid the issue instead of revealing it.
2019-10-08Fix build error (missing BKE_global.h)Dalai Felinto
2019-10-08Fix T70588: Playing animation (after deleting rigid body obj) crashes blender.Bastien Montagne
Fixing/working around another weakness of current RBW model... This is not really nice, but it should work for now, and we cannot really do anything else but that kind of monkey patching here anyway.
2019-10-04Fix assert when deleting a RBW constraint object.Bastien Montagne
Side-reported in T70505. Code did not ensure deleted object was removed from the RBW constraints collection, leading to some invalid status (object in constraints collection but without relevant contraints data). Also fixed another issue - code deleting RBW objects would try to remove any constraint one using it as target, in a very bad and broken way, since you cannot iterate over objects of a collection while removing some... Now instead just NULLify relevant pointers... I hope it works, otherwise we'll have to take a different approach. Needless to stress again how weak the whole RBW code is in general, and regarding same object being used by RBW in more than one scene in particular, that is known broken situation anyway.
2019-09-02Cleanup: get rid of BKE_collection_master() useless accessor.Bastien Montagne
In its current version that was a totally useless extra layer of crap that we can totally avoid. Plus name was bad too.
2019-08-02Cleanup: spellingCampbell Barton
2019-07-16Fix T66944: Rigid Body Constraint in duplicated collection is not added to ↵Bastien Montagne
RigidBodyConstraints collection. We only had a very limited, specific handling of that in collection duplication code, but this has to be handled at a much more general level in Object copy code itself, since it makes no sense to duplicate rigidbody object data without adding new copy to relevant rigidbody collections... WARNING: This is a fairly risky rework of rigidbody handling logic when copying an Object data-block. It is *NOT* considered safe enough for 2.80 release. I tried to take into account copy flags to not mess with other IDs (collections) when we are copying outside of Main, and also not do deg tags when this is forbidden, but risk of something going wrong here is too high...
2019-06-25Fix building without bullet enabledCampbell Barton
2019-06-24Fix T63828, T62005: copy/paste or append loses rigid body objectBrecht Van Lommel
Previously settings were removed, now add to the rigid body world automatically even if it's a bit ill defined, since this is confusing for users. Fundamentally the concept of a rigid body world collection could be revised, and left only as an optional thing.
2019-06-13Fix T65109: Object deleted when removed from the RigidBodyWorld collection.Bastien Montagne
While user should never do that, it appears many end up using a 'view layer' instancing collection as RBW collection, and even worse, have objects in that unique collection. Therefore, when removing RB simulation from an object, which among other things has to remove it from the RBW collection, it would fully delete the object from the blend file. This fix merely checks the usercount of RB-removed object, and if it is at 1 (which means object was in a single collection), it adds it to the scene's master collection first.
2019-04-30Fix broken build from recent rBae7db030dab0.Bastien Montagne
2019-04-30Stop using deprecated ob->flag & SELECTDalai Felinto
We still have base->flag_legacy & BA_WAS_SEL for the few cases we really need to have a per-object selection check (used in the transform code).
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
Convention was not to but after discussion on 918941483f7e we agree its best to change the convention. Names now mostly follow RNA. Some exceptions: - Use 'nodetrees' instead of 'nodegroups' since the struct is called NodeTree. - Use 'gpencils' instead of 'grease_pencil' since 'gpencil' is a common abbreviation in the C code. Other exceptions: - Leave 'wm' as it's a list of one. - Leave 'ipo' as is for versioning.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-02-01Logging: Use CLOG for blenkernelCampbell Barton
Part of D4277 by @sobakasu
2019-01-31Fix T59495, T59992, T59904, T59178, T60598: broken keyframed value editing.Brecht Van Lommel
This removes a bunch of animation/driver evaluations and recalc flags that should be redundant in the new depsgraph, and were incorrectly affecting the evaluated scene in a permanent way. Still two cases that could be removed if the depsgraph is improved, in BKE_object_handle_data_update and BKE_cachefile_update_frame. For physics subframe interpolation there are also still calls to BKE_object_where_is_calc that should ideally be removed as well, though they are not known to cause keyframing bugs. Differential Revision: https://developer.blender.org/D4274
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-12-13Cleanup: replace ifdef w/ stubCampbell Barton
2018-12-12Fix (unreported) Broken rigidbody requirements when adding objects to a RB ↵Bastien Montagne
collection. We have to ensure objects get expected RB data, when they are added to a RB collection...
2018-12-12Merge branch 'master' into blender2.8Campbell Barton
2018-12-12Cleanup: use colon separator after parameterCampbell Barton
Helps separate variable names from descriptive text. Was already used in some parts of the code, double space and dashes were used elsewhere.