Will do some testing of this and the other pending PR tomorrow, otherwise small comments, nothing major.
I think it's worth adding a comment to the doc here, or maybe in the file, saying that the invert_strength
is what differentiates the BLOB
and CREASE
brush. Alternatively, I don't think it would be a bad idea to make two functions:
I noticed the sculpt_project_v3_cache_init
function has a conditional checking against FLT_EPSILON
to seemingly prevent it from causing len_sq_inv_neg
to be extremely large if the value is nearly 0
. I think we probably need a similar check somewhere.
Minor nit: Any reason to prefer writing this out over calling pow
? Here and below on line 277
As far as I understand it, the main reason we add the Scene
parameter here and elsewhereis so that we eventually can call this method so we can get either the brush value or the unified value. This doesn't seem to me like a thing that we want long term, though passing it in is certainly better than retrieving it from SculptSession
-> ViewContext
-> Scene
Doesn't this comment contradict the BLI_NOINLINE
?
Minor nit: It seems like the only reason we pass down the entire Sculpt object is so we can access the .flags
for clipping - do we want to extract this somehow?
We can just skip
SculptOrigVertData
completely, usingSpan<float3> positions = undo::get_node(...)->position
My only issue with this is that I think having an explicit named method like…