Douglas Paul Douglas-Paul
  • Joined on 2023-09-27
Douglas Paul deleted branch fix-gpv3-layer-reordering-customdata-bugs-with-logging from Douglas-Paul/blender 2023-10-21 23:52:23 +02:00
Douglas Paul deleted branch gpv3-customdata-reordering-alternative-approach from Douglas-Paul/blender 2023-10-21 23:16:32 +02:00
292a1893ca Inline grow_or_init_customdata()
Douglas Paul commented on pull request blender/blender#113962 2023-10-21 16:04:50 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

It's possible that the new layer order is exactly the same as the old layer order, in which case we could skip this call to reorder_customdata(). It's tempting to detect that case and skip this call as an optimization, but I'm not sure there's any practical benefit to doing that? It would arguably arguably just "complexity creep" to optimize things that don't really need to be optimized.

Douglas Paul commented on pull request blender/blender#113962 2023-10-21 16:04:50 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

If someone happened to call this method and pass in the root group as parent_group, then this call to move_node_into() is just wasted effort. I could add a check to avoid that, but all we'd really be doing is optimizing a case where the calling code was using the wrong method signature (because they should instead use the signature that implicitly adds to the root group).

Douglas Paul commented on pull request blender/blender#113962 2023-10-21 15:37:49 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

Indeed! An embarrassing oversight

Douglas Paul commented on pull request blender/blender#113962 2023-10-21 15:36:21 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

Good to know, thanks. You might consider adding that to the style guide, especially since the default linter settings in some IDEs (or at least…

Douglas Paul commented on pull request blender/blender#113962 2023-10-21 15:33:46 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

Ack, yes, very glad you caught this because I had completely forgotten to deal with it.

Most places that add a layer were adding the layer to the root group anyway, so I added some signatures…

Douglas Paul commented on pull request blender/blender#113962 2023-10-21 15:13:30 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

Great, thanks. With this change grow_or_init_customdata() is now just 2 simple lines, so maybe not worth its weight as a function? Not sure where the Blender team lands on the tradeoffs on that…

3bdb22dfea Refactor so adding a layer to the root group is the typical case
81e0201f22 Avoid unnecessarily adding a layer to the non-root group
e10f8b5651 Apply code style fixes from the code review
17060f6c6e Simplify implementation of grow_or_init_customdata()
Compare 4 commits »
Douglas Paul pushed to active-camera-node at Douglas-Paul/blender 2023-10-21 01:48:12 +02:00
b6440ae992 Geometry Nodes: Add Active Camera input node
0bde01eab5 UI: Configurable UI Font Weight
b18810d2aa Merge branch 'blender-v4.0-release'
0e9f472726 Fix #113773: repeat zone does not propagate anonymous attributes sometimes
e52b269283 Cleanup: Use simpler copying with begin iterator and count
Compare 662 commits »
Douglas Paul commented on pull request blender/blender#113962 2023-10-20 09:32:26 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered

Bah, I can't figure out how to do comments on multiple lines of code in Gitea, so I'll just ask my questions here:

  1. Could the implementation of grow_customdata() be simplified even further…
Douglas Paul commented on pull request blender/blender#113874 2023-10-20 09:15:31 +02:00
GPv3: Fix bugs in find_layer_insertion_index() and some of its usages

@filedescriptor I ended up jumping right into the coding anyway, because I'm not yet familiar enough with the codebase to have much confidence that an idea will work out. It also wasn't much work…

Douglas Paul created pull request blender/blender#113962 2023-10-20 08:45:53 +02:00
GPv3: Reimplement how customdata is updated when layers are re-ordered
1c8d11283a Reimplement how customdata is updated when layers are re-ordered
20292b016d Fix grow_customdata() to always insert at the end
a53dd6e93c GPv3: Fix rename layer group not updating RNA
3aa5644751 Merge branch 'blender-v4.0-release'
e3fc935349 I18n: disambiguate and extract a few messages
Compare 10 commits »
Douglas Paul commented on pull request blender/blender#113874 2023-10-19 14:04:17 +02:00
GPv3: Fix bugs in find_layer_insertion_index() and some of its usages

Thanks for adding yourself as a reviewer, @filedescriptor. But FYI, I plan to file a new PR within the next couple days that would supersede this one, because I thought of a different approach for…

Douglas Paul created pull request blender/blender#113874 2023-10-18 07:50:42 +02:00
GPv3: Fix bugs in find_layer_insertion_index() and some of its usages
5fa9d14440 [DO NOT MERGE] Copious printf logging for testing prior commit