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-03-27 12:27:00 +0300
committerBastien Montagne <b.mont29@gmail.com>2020-03-27 12:42:40 +0300
commitba1f7acc3f5091398c0c1f2eaabfd7546dde39f8 (patch)
treebe2e55360ed151a3714ce73e1d29ad3f0d0a46a3 /source/blender/makesrna
parent3441862c96d6d08b87ad00040e5349af6f28dc9e (diff)
Warp modifier: add bone from and bone to options when using armature objects
This commit adds the option to use armature bones for the From and To targets when using armature objects. The changes are based on the UV Warp modifier. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D6820
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index e0c9be7ddae..51b50647e1d 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1795,17 +1795,29 @@ static void rna_def_modifier_warp(BlenderRNA *brna)
RNA_def_struct_ui_icon(srna, ICON_MOD_WARP);
prop = RNA_def_property(srna, "object_from", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "From", "Object to transform from");
+ RNA_def_property_pointer_sdna(prop, NULL, "object_from");
+ RNA_def_property_ui_text(prop, "Object From", "Object to transform from");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ prop = RNA_def_property(srna, "bone_from", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "bone_from");
+ RNA_def_property_ui_text(prop, "Bone From", "Bone to transform from");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
prop = RNA_def_property(srna, "object_to", PROP_POINTER, PROP_NONE);
- RNA_def_property_ui_text(prop, "To", "Object to transform to");
+ RNA_def_property_pointer_sdna(prop, NULL, "object_to");
+ RNA_def_property_ui_text(prop, "Object To", "Object to transform to");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+ prop = RNA_def_property(srna, "bone_to", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "bone_to");
+ RNA_def_property_ui_text(prop, "Bone To", "Bone defining offset");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);