Add function to retrieve all transforms in one batch#4792
Open
scorpion81 wants to merge 5 commits into
Open
Conversation
Add B3_PyArray_DATA macro that casts PyObject* to PyArrayObject* for NumPy 2.0+ where PyArray_DATA expects PyArrayObject*. Maintains backward compatibility with older NumPy versions. Fixes build errors on Ubuntu Resolute with NumPy 2.x where PyArray_DATA calls had incompatible pointer types.
Author
|
merged #4787 into my branch, since it properly fixes the numpy related compile errors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This function is useful in scenarios with larger numbers of rigidbodies ( > 500) in order to retrieve a numpy transforms array in one go. Querying all transforms in a frame loop in order to update a render representation, e.g. a shattered blender mesh one by one is a significant performance bottleneck.
Unfortunately, i had to deactivate 2 sections of different numpy related code via #if 0 due to compilation errors i couldnt easily fix. (I didnt change anything else of that code, I added only my C loop function)
If you may find this function useful, feel free to integrate it. Maybe i have overlooked a "Better" way tho, but this improved the performance significantly if you need to use a lot of transformation data.