diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-04-21 10:04:58 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-04-21 10:04:58 +0300 |
commit | b0c428c0636c6f2b5a4b08f776948b80dbe7d80f (patch) | |
tree | 7540d51b417b1ea4a7194bb62091cfe541d5dc1b /source/blender/makesrna/intern/rna_modifier.c | |
parent | 6f190f7f43bb6c4a2c9dc52fdaae2dacf10f1d24 (diff) |
Fix T97185: Data transfer modifier doesn't display
individual layers.
A few RNA property strings were misspelled.
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index c2ab4897d60..456f774648a 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1361,13 +1361,13 @@ static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf( } } } - else if (STREQ(RNA_property_identifier(prop), "layers_vcol_select_vert_src") || - STREQ(RNA_property_identifier(prop), "layers_vcol_select_loop_src")) { + else if (STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_src") || + STREQ(RNA_property_identifier(prop), "layers_vcol_loop_select_src")) { Object *ob_src = dtmd->ob_source; if (ob_src) { AttributeDomain domain = STREQ(RNA_property_identifier(prop), - "layers_vcol_select_vert_src") ? + "layers_vcol_vert_select_src") ? ATTR_DOMAIN_POINT : ATTR_DOMAIN_CORNER; @@ -1480,8 +1480,12 @@ static const EnumPropertyItem *rna_DataTransferModifier_layers_select_dst_itemf( } else if (STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") || STREQ(RNA_property_identifier(prop), "layers_vcol_loop_select_dst")) { + int multilayer_index = STREQ(RNA_property_identifier(prop), "layers_vcol_vert_select_dst") ? + DT_MULTILAYER_INDEX_VCOL_VERT : + DT_MULTILAYER_INDEX_VCOL_LOOP; + /* Only list destination layers if we have a single source! */ - if (dtmd->layers_select_src[DT_MULTILAYER_INDEX_VCOL_LOOP] >= 0) { + if (dtmd->layers_select_src[multilayer_index] >= 0) { Object *ob_dst = CTX_data_active_object(C); /* XXX Is this OK? */ if (ob_dst && ob_dst->data) { |