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:
authorAntonio Vazquez <blendergit@gmail.com>2022-03-02 19:48:20 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-03-02 19:48:35 +0300
commitca0b72852961571d0099a7274fb34291494f3b45 (patch)
tree5c3ce15d32b9b86c8e7e06f3df6248cb16adaa6f /source/blender/makesrna/intern/rna_gpencil.c
parent34267a868ad3aeb6010f9c7c6c42ed109698dd38 (diff)
Fix T96101: "Remove" button failure on Grease Pencil layer's relation to bone
As the channel was not found, the relation data was not updated. Now, if the bone is removed, the relation is set.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index e7834034699..ba94fbe88e5 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -356,6 +356,12 @@ static void set_parent(bGPDlayer *gpl, Object *par, const int type, const char *
gpl->partype |= PARBONE;
BLI_strncpy(gpl->parsubstr, substr, sizeof(gpl->parsubstr));
}
+ else {
+ invert_m4_m4(gpl->inverse, par->obmat);
+ gpl->parent = par;
+ gpl->partype |= PAROBJECT;
+ gpl->parsubstr[0] = 0;
+ }
}
}