April 22, 2014, 09:23 (GMT) |
Fix for rigid body removal methods: Flag new rigid bodies for particles as used to prevent freeing. Also remove bodies if they already exist, to prevent double adding and subsequent assert failure. Conflicts: source/blender/blenkernel/intern/rigidbody.c |
April 22, 2014, 09:23 (GMT) |
Fix for RigidBodyWorld reading: initialize empty body mempool when reading blend files, this is not actually stored. |
April 22, 2014, 09:23 (GMT) |
Removed rigidbody build/apply functions from NParticle API. It's better to keep this functionality inside RigidBody blenkernel for now. |
April 22, 2014, 09:23 (GMT) |
Cleanup: Separate function for details of the object 'apply' method. |
April 22, 2014, 09:23 (GMT) |
Added inline comment about possible memory management optimization. |
April 22, 2014, 09:23 (GMT) |
Cleanup: Separated object and constraint build loops into own functions. Renamed some more API methods to follow the new naming scheme. Conflicts: source/blender/blenkernel/intern/rigidbody.c |
April 22, 2014, 09:23 (GMT) |
Cleanup: Renamed a number of internal rigidbody functions to clarify the procedure: world_build: create rbRigidBody instances for stuff in Scene validate_*: ensure a rbRigidBody exists for an Object/particle/etc. sync_*: define Bullet settings for an Object/particle/etc. based on Blender Scene data world_apply: copy back data from Bullet after a step to the Blender Scene data Conflicts: source/blender/blenkernel/intern/rigidbody.c |
April 22, 2014, 09:23 (GMT) |
Fix potential issue from early exit when no constraints exist. |
April 22, 2014, 09:23 (GMT) |
Particle validate function for adding particle rigid bodies. |
April 22, 2014, 09:23 (GMT) |
Removed unused variables. |
April 22, 2014, 09:23 (GMT) |
Added collision shape pointer attribute for particles. This will change soon, for now is the easiest way to keep track of things. |
April 22, 2014, 09:23 (GMT) |
Pointer attribute get/set functions for particles. |
April 22, 2014, 09:23 (GMT) |
Use the rigidbody_world_free_bodies function for freeing bodies when destroying the world, instead of looping over the object group. This is in line with the memory ownership being at the RigidBodyWorld now instead of the individual Objects and will ensure all RBs get destroyed properly when using particles etc. later. |
April 22, 2014, 09:23 (GMT) |
Basic mempool usage for creating and removing rbRigidBody instances. This uses flags to indicate used rbRigidBodies and then loops over the mempool to remove orphaned bodies. The same should eventually be done for shapes and constraints. |
April 22, 2014, 09:23 (GMT) |
Shortcut variable for rbRigidBody, avoids repetitive rbo->physics_object access. |
April 22, 2014, 09:23 (GMT) |
Generic flags for rbRigidBody. These can be used by the blenkernel API to tag used rigid bodies and automatically remove unused bodies. |
April 22, 2014, 09:23 (GMT) |
Use the mempool in RigidBodyWorld instead of allocating memory inside the Bullet CAPI. NOTE: this is broken atm because to free an Object's rigid body data the RBW needs to be passed along, which would require a Scene argument in the blenkernel function. This will get fixed by moving ownership of the rigid body away from object and into the RBW memory management sync procedure. Conflicts: intern/rigidbody/RBI_api.h |
April 22, 2014, 09:23 (GMT) |
Make the btRigidBody a direct component of the rbRigidBody wrapper struct. This avoids one pointer indirection and makes future memory management possible. Requires a constructur/destructor pair to initialize the 'body' member correctly. |
April 22, 2014, 09:23 (GMT) |
Added a mempool to RigidBodyWorld as a memory manager for bodies. Conflicts: intern/rigidbody/rb_bullet_api.cpp |
April 22, 2014, 09:23 (GMT) |
Added a new attribute type 'POINTER', for storing rigid body pointers. This may not be the best way to map rigid bodies to particles, eventually a nicer way could be to make use of the userpointer in Bullet btRigidBody and store a weak reference to Blender types there instead. Storing rigid body pointers in the particles just mimicks the way the Object RBs work atm. The pointer attribute gets a flag 'TEMPORARY' to prevent it from being stored in the cache and .blend files, since it's only valid during the Bullet stepping anyway. |
|
|
|


Master Commits
MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021