Page MenuHome

Refactor out BKE ID copy functions
Closed, ResolvedPublicTO DO

Description

Currently there are many copy functions which are a little misleading since you can call BKE_mesh_copy, to create a new mesh but not BKE_mesh_free to free it.

Looking into it these just wrap BKE_id_copy, after some discussion, this is the proposal.

  • Remove all BKE_*_copy functions which are only wrapping ID copy (rB253dbe71dcef).
  • Make BKE_id_copy & BKE_id_copy_ex return ID * instead of a boolean, since this complicates API use when the return value is used as input for another function (rB7c9131d11eb0, rB03ef0cfe3c33).
  • Refactor a bit specific LOCALIZE type of copying, move it to generic copying handling code, and remove relevant specific callbacks (BKE_*_localize()) (rB94f91827f893, rB874cf52c10d7).

Event Timeline

Bastien Montagne (mont29) closed this task as Resolved.Oct 7 2020, 6:12 PM
Bastien Montagne (mont29) updated the task description. (Show Details)