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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-08-05 18:48:05 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-04 19:55:44 +0300
commit61a24c799b2882c22a43591138a113d7f09be0ed (patch)
treeea85047e68ff64bf7e25329a7e7048f1b9dbfeb1 /source/blender/makesrna/intern/rna_pose.c
parent6932eaa2bcaff0649c82f6b31a205319c966bd15 (diff)
Move B-Bone custom handle settings to Edit mode.
Custom handle settings actually affect the B-Bone rest shape, so they should be changed in Edit mode rather than Pose mode. This is necessary to be able to display the correct rest shape of the bone in Edit Mode. Also, instead of flags, introduce an enum to specify the handle operation modes, so that new ones could be added later. Differential Revision: https://developer.blender.org/D3588
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r--source/blender/makesrna/intern/rna_pose.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index d263e02d3f8..56ba29d277c 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -965,46 +965,22 @@ static void rna_def_pose_channel(BlenderRNA *brna)
rna_def_bone_curved_common(srna, true);
/* Custom BBone next/prev sources */
- prop = RNA_def_property(srna, "use_bbone_custom_handles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bboneflag", PCHAN_BBONE_CUSTOM_HANDLES);
- RNA_def_property_ui_text(prop, "Use Custom Handle References",
- "Use custom reference bones as handles for B-Bones instead of next/previous bones, "
- "leave these blank to use only B-Bone offset properties to control the shape");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
- RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_dependency_update");
-
prop = RNA_def_property(srna, "bbone_custom_handle_start", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bbone_prev");
RNA_def_property_struct_type(prop, "PoseBone");
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_PTR_NO_OWNERSHIP);
+ RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP);
RNA_def_property_ui_text(prop, "B-Bone Start Handle",
"Bone that serves as the start handle for the B-Bone curve");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_dependency_update");
- prop = RNA_def_property(srna, "use_bbone_relative_start_handle", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bboneflag", PCHAN_BBONE_CUSTOM_START_REL);
- RNA_def_property_ui_text(prop, "Relative B-Bone Start Handle",
- "Treat custom start handle position as a relative value");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
- RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
-
prop = RNA_def_property(srna, "bbone_custom_handle_end", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bbone_next");
RNA_def_property_struct_type(prop, "PoseBone");
- RNA_def_property_flag(prop, PROP_EDITABLE | PROP_PTR_NO_OWNERSHIP);
+ RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP);
RNA_def_property_ui_text(prop, "B-Bone End Handle",
"Bone that serves as the end handle for the B-Bone curve");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_dependency_update");
- prop = RNA_def_property(srna, "use_bbone_relative_end_handle", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "bboneflag", PCHAN_BBONE_CUSTOM_END_REL);
- RNA_def_property_ui_text(prop, "Relative B-Bone End Handle",
- "Treat custom end handle position as a relative value");
- RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
- RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
-
/* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
prop = RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, NULL, "chan_mat");