diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-08-27 17:28:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-08-27 17:31:03 +0300 |
commit | ce47dc5e70d594e580d05dbdc7f297d2bd63b814 (patch) | |
tree | 85dd0b4e5002d6de7925cfc7e53f556a28b4b252 /source/blender/makesrna/intern/rna_object.c | |
parent | d8baafd693ebf830d6153bd31bd63521c7569984 (diff) |
LibOverride: Fix broken Hook modifier case.
Hook modifier uses same kind of parent inverse matrix as regular object
parenting, so we need to bypass that matrix re-computation when setting
the overridding object here as well.
Also cleanup some minor glitches in object parents' override_apply func.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index d605aa6b4f7..3c0fd282b17 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -546,27 +546,27 @@ static void rna_Object_parent_set(PointerRNA *ptr, } } -bool rna_Object_parent_override_apply(Main *UNUSED(bmain), - PointerRNA *ptr_dst, - PointerRNA *ptr_src, - PointerRNA *ptr_storage, - PropertyRNA *prop_dst, - PropertyRNA *prop_src, - PropertyRNA *UNUSED(prop_storage), - const int len_dst, - const int len_src, - const int len_storage, - PointerRNA *UNUSED(ptr_item_dst), - PointerRNA *UNUSED(ptr_item_src), - PointerRNA *UNUSED(ptr_item_storage), - IDOverrideLibraryPropertyOperation *opop) +static bool rna_Object_parent_override_apply(Main *UNUSED(bmain), + PointerRNA *ptr_dst, + PointerRNA *ptr_src, + PointerRNA *ptr_storage, + PropertyRNA *prop_dst, + PropertyRNA *prop_src, + PropertyRNA *UNUSED(prop_storage), + const int len_dst, + const int len_src, + const int len_storage, + PointerRNA *UNUSED(ptr_item_dst), + PointerRNA *UNUSED(ptr_item_src), + PointerRNA *UNUSED(ptr_item_storage), + IDOverrideLibraryPropertyOperation *opop) { BLI_assert(len_dst == len_src && (!ptr_storage || len_dst == len_storage) && len_dst == 0); BLI_assert(opop->operation == IDOVERRIDE_LIBRARY_OP_REPLACE && - "Unsupported RNA override operation on animdata pointer"); + "Unsupported RNA override operation on object parent pointer"); UNUSED_VARS_NDEBUG(ptr_storage, len_dst, len_src, len_storage, opop); - /* We need a special handling here because setting parent resets pinvert parent matrix, + /* We need a special handling here because setting parent resets invert parent matrix, * which is evil in our case. */ Object *ob = (Object *)ptr_dst->data; Object *parent_dst = RNA_property_pointer_get(ptr_dst, prop_dst).data; |