diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-03-02 19:48:20 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-03-02 19:48:35 +0300 |
commit | ca0b72852961571d0099a7274fb34291494f3b45 (patch) | |
tree | 5c3ce15d32b9b86c8e7e06f3df6248cb16adaa6f /source/blender/makesrna | |
parent | 34267a868ad3aeb6010f9c7c6c42ed109698dd38 (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')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 6 |
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; + } } } |