Page MenuHome

Fix cloth filter creating incorrect constraints
Needs RevisionPublic

Authored by Pablo Dobarro (pablodp606) on Mon, Sep 14, 12:57 AM.

Details

Summary

data->brush is set from the Sculpt struct directly without considering
if the simulation is being creating for the cloth brush or for any other
tool. When the simulation is not created for a brush, the brush
parameters are irrelevant and should be ignored.
This was not causing any incorrect behaivour af the constrinat
properties for the filter and snake hook were the same, but the code is
still wrong.

Diff Detail

Repository
rB Blender
Branch
fix-filter-constraints (branched from master)
Build Status
Buildable 10169
Build 10169: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Mon, Sep 14, 12:57 AM
Pablo Dobarro (pablodp606) created this revision.
Sergey Sharybin (sergey) requested changes to this revision.Mon, Sep 14, 2:06 PM

data->brush is set from the Sculpt struct directly without considering if the simulation is being creating for the cloth brush or for any other tool.

This sounds correct, as the brush is generic and does not indicate anything to do with the simulation.

Usage of data->cache to optionally set brush to nullptr seeps too implicit to me, prone to errors. Please use more explicit logic to see whether one codepath is to be taken on another.

This revision now requires changes to proceed.Mon, Sep 14, 2:06 PM