This make the limited wireframe not a performance problem anymore.
However, this does change the number of edges displayed as the threshold
is now computed per vertex instead of per edges.
For this reason we extended (internaly) the range of the slider so that the
users can hide more edge.
Before that copied collection in copy-on-write were running out
of sync with original ones. This was causing crash with the
following scenario:
- Delete some objects from scene
- Add particle system to an object
- Change particle mode to Hair
Thanks Dalai for debug session! Pair programming ftw!
We now remove the shader for every update.
So at the moment the whole point of UBO (Uniform Buffer Objects) is that they
are more efficient than individual uniforms.
Next steps is a harmless refactor to stopping UBO from referring to original
data in the UBO, and simply copying it.
It would also be interesting to make the final shader more granular as far as
the library and required functions are concerned. Even if this doesn't impact
performance, it should give us smaller easy to debug shaders
(a simple shader now has > 5k lines!).
If performance for animated values is measureable slower after this commit we
can port the shader creation CPU side to the depsgraph - localizing the tree,
hashing, lookup, ...
Additionally we can stick to update the UBO when the material changes but not
its topology. This is very trick because of localized trees. So we will only
re-visit this if profiling hints at any benefit from it.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
When calling the bpy.ops.poselib.apply_pose() operator from Python, Blender
would deadlock when the rig has drivers.
Similar BPy_{BEGIN,END}_ALLOW_THREADS calls were already in place in the
rna_Scene_update_tagged() function.
This is part of the work needed to refactor the material parameters update.
Now the gpupass cache is polled before adding the gpumaterial to the
deferred compilation queue.
We store gpupasses in a single linked list grouped based on their hashes.
This is not the most efficient way but it can be improved upon later.
Not sure why exactly it is called a cleanup, the code was much more clear
and robust against possible missing return statements which are MANDATORY.
Missing return statement will:
- Cause two different BVH traversals to be run.
Not is happening currently, but if more BVH layouts are added, it will
become a problem.
- It is already causing assert() statements to fail, since functions are
no longer returning when they are supposed to.
If there is any measurable reason to keep this change, let me know.
Otherwise just stick to reliable/tested/robust code.
This reverts commit ba65f7093b39a8e5f1fb869cbc347fb810a05ab9.
The issue is that children drawing is done by object mode,
which operates with data from evaluated context. But that
data needs edit mode's cache to be properly updated first.
Makes ADD brush to work.
At some point children particles draw got broken, children are not
visible for until first stroke is done. Still looking into it.
Experiment: let the user be in control of the alpha channel as some rigs
are hard too see during bone selection. Especially rigs that were
designed for 2.79 wireframe mode.