Page MenuHome

Transform: initialize proportional editing through a callback
Changes PlannedPublic

Authored by Germano Cavalcante (mano-wii) on Jul 22 2022, 4:40 PM.

Details

Summary

Instead of listing the convert types that support PET within the
ELEM(...) macro, create a callback in TransConvertTypeInfo
which, if it exists, initializes proportional editing.


To avoid long lists of convert types in resource initialization checks, it is good to identify which types support the resource in the TransConvertTypeInfo itself.

For PET we have two main solutions:

  • create a flag identifying if the type supports PET
  • initialize the PET through a callback

In this patch the callback solution was chosen because:

  • allows compartmentalization of custom PET initializations
  • facilitates optimization
  • simplifies the application of this feature to new types

The disadvantages compared to the flag, as far as I could identify, are:

  • need to expose generic functions
  • increases code size

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 23109
Build 23109: arc lint + arc unit

Event Timeline

Germano Cavalcante (mano-wii) requested review of this revision.Jul 22 2022, 4:40 PM
Germano Cavalcante (mano-wii) created this revision.
  • Transform: create type-specific proportional edit initialization callbacks

Need more tests as some dangerous changes were made:

  • removal of the apparently superfluous dists_index which map to the nearest selected vertex in order to "detect" islands.# Updating D15517: Transform: initialize proportional editing through a callback
  • implementation of td->extra for UVs
  • Code duplication in Action and Graph initialization
  • Warnings

The advantage of this change is that the code is more organized and compartmentalized.