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:
authorCody Winchester <CodyWinch>2020-04-10 15:03:36 +0300
committerBastien Montagne <bastien@blender.org>2020-04-10 22:28:59 +0300
commit4f9a56cbc4e8719ee421a57fd6695bed633c591b (patch)
tree93f85984753bca057c65ac04beaa8e8effa71423 /source/blender/modifiers/intern/MOD_weightvg_util.c
parentd6cefef98f87ae8554050052d0fa4f965a2ce809 (diff)
Modifiers: Add Bone option for Texture Mask Object
This patch adds the option to use an armature bone in place of an object for texture mask coordinates. This affects the 3 vertex weight modifiers, the displace modifier, the warp modifier, and the wave modifier. With minor changes from Bastien Montagne (@mont29). Differential Revision: https://developer.blender.org/D7348
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvg_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 23e4da32ed7..633bbb1421b 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -137,6 +137,7 @@ void weightvg_do_mask(const ModifierEvalContext *ctx,
const int tex_use_channel,
const int tex_mapping,
Object *tex_map_object,
+ const char *text_map_bone,
const char *tex_uvlayer_name,
const bool invert_vgroup_mask)
{
@@ -163,6 +164,7 @@ void weightvg_do_mask(const ModifierEvalContext *ctx,
*/
t_map.texture = texture;
t_map.map_object = tex_map_object;
+ BLI_strncpy(t_map.map_bone, text_map_bone, sizeof(t_map.map_bone));
BLI_strncpy(t_map.uvlayer_name, tex_uvlayer_name, sizeof(t_map.uvlayer_name));
t_map.texmapping = tex_mapping;