I was trying to fix some bugs in this code and found is tricky to read. I think it could use a large refactor to avoid so much copy-pasted content and improve legibility. But as a start, I did this, using defines to set up the magic numbers used, and to not use two separate references to the same block of memory. (*res and *lres are the same set of data, cast as different types)
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
let me know if the reviewer would like a sample test .blend file. Before and after this change, there is no difference in operation, just no more magic number use in this file.
Comment Actions
Using proper constant names is surely good, but i'm not sure about lres/res change. It doesn't really make things easier to follow, and even if it's the same block, semantically code in some places easier to follow with more clear separation..
| source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp | ||
|---|---|---|
| 33 | Can this constant be less cryptic (as in, avoid manual bitfield here)? | |
| 1006 | As far as i can follow, lres was supposed to be something more like a runtime flag storage, res was supposed to be an actual node output. From such point of view there are following issues here:
| |