Page MenuHome

T57855 Drag and drop to set parent in the Outliner for multiple objects - part 1
Needs RevisionPublic

Authored by Mateusz Grzeliński (brezdo) on Dec 25 2018, 10:08 PM.



I would like to work on this task, but I need help.

This patch allows multiple object to be parented to mesh (and only mesh).


  • actual parenting is done in 2 places: in parent_drop_invoke and parent_drop_exec depending if UI popup is needed or not. Is it acceptable?
  • I need to pass list of objects to parent_drop_exec. How to do it correctly? Is it ok if I:
    • pass parent with RNA_string_set
    • pass children as op->customdata. I would set this data in parent_drop_invoke something like this: op->customdata = event->customdata

Diff Detail

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Dec 26 2018, 1:56 PM

The reason this was not implemented yet is because it's not clear to me how to do it. It likely needs changes to the operator/drag&drop implementation itself. You can't pass data through op->customdata, because the menu will call a new operator, not use the same one.

For that reason, I don't think this is a good task to work on, it's better for someone familiar with the internals of how the window manager / UI code.


You can't cancel the operator here, because some parenting may have already been done. You should only cancel if you have made no changes at all.

This revision now requires changes to proceed.Dec 26 2018, 1:56 PM

That's ok, I will find another task. Thank you for your time.