Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-06-04 17:39:12 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-08-12 17:33:20 +0300
commitdc8844f8ef6a5cfa2be1035162d39e6d83c83d7c (patch)
tree70b3b54eee6ade761ce7111dba009118bdf5e798
parentd6891d9bee2bd2073cb45e1ac9a04b2f03f05a9a (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
-rw-r--r--source/blender/editors/object/object_relations.c2
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 c0b954f3cff..ec72ff11683 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -570,6 +570,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: {