diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-06-04 17:39:12 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-08-23 10:33:24 +0300 |
commit | 60dbbaac42f5a0cf35ac488df4f051f355269cc1 (patch) | |
tree | 875348975a723476e5167bbf4345a2a770a41ffe /source | |
parent | 47618781d8d7bd1a1c6481857fcf982dc393d781 (diff) |
Fix T88498: 'Clear Parent' does not clear parent_bone
Clearing the parent from the UI using the X (or from python) clears the
`parsubstr` and set `partype` back to `PAROBJECT`.
Using the Clear Parent operator would leave the `parsubstr` (and thus
`parent_bone`) untouched even though this operator claims to "clear
parenting relationship completely" (it also removes parent deform
modifiers for example).
So now, also clear `parsubstr` and set back to `PAROBJECT` [which is
default].
Maniphest Tasks: T88498
Differential Revision: https://developer.blender.org/D11503
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index a7308002e76..52cf721a895 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -571,6 +571,8 @@ void ED_object_parent_clear(Object *ob, const int type) /* clear parenting relationship completely */ ob->parent = NULL; + ob->partype = PAROBJECT; + ob->parsubstr[0] = 0; break; } case CLEAR_PARENT_KEEP_TRANSFORM: { |