Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_modifier.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| { \ | { \ | ||||
| _type##ModifierData *tmd = (_type##ModifierData *)ptr->data; \ | _type##ModifierData *tmd = (_type##ModifierData *)ptr->data; \ | ||||
| modifier_object_set((Object *)ptr->owner_id, &tmd->_prop, _obtype, value); \ | modifier_object_set((Object *)ptr->owner_id, &tmd->_prop, _obtype, value); \ | ||||
| } | } | ||||
| RNA_MOD_OBJECT_SET(Armature, object, OB_ARMATURE); | RNA_MOD_OBJECT_SET(Armature, object, OB_ARMATURE); | ||||
| RNA_MOD_OBJECT_SET(Array, start_cap, OB_MESH); | RNA_MOD_OBJECT_SET(Array, start_cap, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(Array, end_cap, OB_MESH); | RNA_MOD_OBJECT_SET(Array, end_cap, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(Array, curve_ob, OB_CURVE); | RNA_MOD_OBJECT_SET(Array, curve_ob, OB_CURVES_LEGACY); | ||||
| RNA_MOD_OBJECT_SET(Boolean, object, OB_MESH); | RNA_MOD_OBJECT_SET(Boolean, object, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(Cast, object, OB_EMPTY); | RNA_MOD_OBJECT_SET(Cast, object, OB_EMPTY); | ||||
| RNA_MOD_OBJECT_SET(Curve, object, OB_CURVE); | RNA_MOD_OBJECT_SET(Curve, object, OB_CURVES_LEGACY); | ||||
| RNA_MOD_OBJECT_SET(DataTransfer, ob_source, OB_MESH); | RNA_MOD_OBJECT_SET(DataTransfer, ob_source, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(Lattice, object, OB_LATTICE); | RNA_MOD_OBJECT_SET(Lattice, object, OB_LATTICE); | ||||
| RNA_MOD_OBJECT_SET(Mask, ob_arm, OB_ARMATURE); | RNA_MOD_OBJECT_SET(Mask, ob_arm, OB_ARMATURE); | ||||
| RNA_MOD_OBJECT_SET(MeshDeform, object, OB_MESH); | RNA_MOD_OBJECT_SET(MeshDeform, object, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(NormalEdit, target, OB_EMPTY); | RNA_MOD_OBJECT_SET(NormalEdit, target, OB_EMPTY); | ||||
| RNA_MOD_OBJECT_SET(Shrinkwrap, target, OB_MESH); | RNA_MOD_OBJECT_SET(Shrinkwrap, target, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(Shrinkwrap, auxTarget, OB_MESH); | RNA_MOD_OBJECT_SET(Shrinkwrap, auxTarget, OB_MESH); | ||||
| RNA_MOD_OBJECT_SET(SurfaceDeform, target, OB_MESH); | RNA_MOD_OBJECT_SET(SurfaceDeform, target, OB_MESH); | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); | RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, -100, 100, 10, 2); | RNA_def_property_ui_range(prop, -100, 100, 10, 2); | ||||
| RNA_def_property_ui_text(prop, "Strength", ""); | RNA_def_property_ui_text(prop, "Strength", ""); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, modifier_warp_falloff_items); | RNA_def_property_enum_items(prop, modifier_warp_falloff_items); | ||||
| RNA_def_property_ui_text(prop, "Falloff Type", ""); | RNA_def_property_ui_text(prop, "Falloff Type", ""); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ | RNA_def_property_translation_context(prop, | ||||
| BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_ui_text(prop, "Radius", "Radius to apply"); | RNA_def_property_ui_text(prop, "Radius", "Radius to apply"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "falloff_curve", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "curfalloff"); | RNA_def_property_pointer_sdna(prop, NULL, "curfalloff"); | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_float_sdna(prop, NULL, "force"); | RNA_def_property_float_sdna(prop, NULL, "force"); | ||||
| RNA_def_property_range(prop, 0, 1); | RNA_def_property_range(prop, 0, 1); | ||||
| RNA_def_property_ui_text(prop, "Strength", "Relative force of the hook"); | RNA_def_property_ui_text(prop, "Strength", "Relative force of the hook"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, modifier_warp_falloff_items); /* share the enum */ | RNA_def_property_enum_items(prop, modifier_warp_falloff_items); /* share the enum */ | ||||
| RNA_def_property_ui_text(prop, "Falloff Type", ""); | RNA_def_property_ui_text(prop, "Falloff Type", ""); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ | RNA_def_property_translation_context(prop, | ||||
| BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "falloff"); | RNA_def_property_float_sdna(prop, NULL, "falloff"); | ||||
| RNA_def_property_range(prop, 0, FLT_MAX); | RNA_def_property_range(prop, 0, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0, 100, 100, 2); | RNA_def_property_ui_range(prop, 0, 100, 100, 2); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Radius", "If not zero, the distance from the hook where influence ends"); | prop, "Radius", "If not zero, the distance from the hook where influence ends"); | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); | ||||
| RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name"); | RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name"); | ||||
| RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGEditModifier_defgrp_name_set"); | RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGEditModifier_defgrp_name_set"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items); | RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items); | ||||
| RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); | RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ | RNA_def_property_translation_context(prop, | ||||
| BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_INVERT_FALLOFF); | RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_INVERT_FALLOFF); | ||||
| RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight"); | RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_range(prop, 0.0, FLT_MAX); | RNA_def_property_range(prop, 0.0, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, -1); | RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, -1); | ||||
| RNA_def_property_ui_text(prop, "Highest", "Distance mapping to weight 1.0"); | RNA_def_property_ui_text(prop, "Highest", "Distance mapping to weight 1.0"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items); | RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items); | ||||
| RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); | RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to their new values"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_CURVE); /* Abusing id_curve :/ */ | RNA_def_property_translation_context(prop, | ||||
| BLT_I18NCONTEXT_ID_CURVE_LEGACY); /* Abusing id_curve :/ */ | |||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "invert_falloff", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_INVERT_FALLOFF); | RNA_def_property_boolean_sdna(prop, NULL, "proximity_flags", MOD_WVG_PROXIMITY_INVERT_FALLOFF); | ||||
| RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight"); | RNA_def_property_ui_text(prop, "Invert Falloff", "Invert the resulting falloff weight"); | ||||
| RNA_def_property_update(prop, 0, "rna_Modifier_update"); | RNA_def_property_update(prop, 0, "rna_Modifier_update"); | ||||
| prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "normalize", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines | |||||