Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_armature.c
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup RNA | * \ingroup RNA | ||||
| */ | */ | ||||
| #include <stdlib.h> | #include <stdlib.h> | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLT_translation.h" | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| ▲ Show 20 Lines • Show All 701 Lines • ▼ Show 20 Lines | # define RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone) \ | ||||
| RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | ||||
| /* Ease In/Out */ | /* Ease In/Out */ | ||||
| prop = RNA_def_property(srna, "bbone_easein", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bbone_easein", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "ease1"); | RNA_def_property_float_sdna(prop, NULL, "ease1"); | ||||
| RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3); | RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3); | ||||
| RNA_def_property_float_default(prop, 1.0f); | RNA_def_property_float_default(prop, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Ease In", "Length of first Bezier Handle (for B-Bones only)"); | RNA_def_property_ui_text(prop, "Ease In", "Length of first Bezier Handle (for B-Bones only)"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ARMATURE); | |||||
| RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | ||||
| prop = RNA_def_property(srna, "bbone_easeout", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bbone_easeout", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "ease2"); | RNA_def_property_float_sdna(prop, NULL, "ease2"); | ||||
| RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3); | RNA_def_property_ui_range(prop, -5.0f, 5.0f, 1, 3); | ||||
| RNA_def_property_float_default(prop, 1.0f); | RNA_def_property_float_default(prop, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Ease Out", "Length of second Bezier Handle (for B-Bones only)"); | RNA_def_property_ui_text(prop, "Ease Out", "Length of second Bezier Handle (for B-Bones only)"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_ARMATURE); | |||||
| RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | ||||
| if (is_posebone == false) { | if (is_posebone == false) { | ||||
| prop = RNA_def_property(srna, "use_scale_easing", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_scale_easing", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Scale Easing", "Multiply the final easing values by the Scale In/Out Y factors"); | prop, "Scale Easing", "Multiply the final easing values by the Scale In/Out Y factors"); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "bbone_flag", BBONE_SCALE_EASING); | RNA_def_property_boolean_sdna(prop, NULL, "bbone_flag", BBONE_SCALE_EASING); | ||||
| RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | RNA_DEF_CURVEBONE_UPDATE(prop, is_posebone, is_editbone); | ||||
| ▲ Show 20 Lines • Show All 842 Lines • Show Last 20 Lines | |||||