Skip to content

Commit

Permalink
Exposed more soft body parameters to the UI (All the cluster collisio…
Browse files Browse the repository at this point in the history
…n ones)
  • Loading branch information
sdfgeoff authored and panzergame committed Dec 17, 2017
1 parent 491ed27 commit ef6c5b4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release/scripts/startup/bl_ui/properties_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ def draw(self, context):
sub = col.column()
sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
sub.prop(soft, "cluster_iterations", text="Iterations")

sub.prop(soft, "ksrhr_cl", text="kSRHR_CL")
sub.prop(soft, "ksrhr_cl", text="Rigid Hardness")
sub.prop(soft, "kskhr_cl", text="Kinetic Hardness")
sub.prop(soft, "ksshr_cl", text="Soft Hardness")
sub.prop(soft, "ksr_split_cl", text="Rigid Impulse Split")
sub.prop(soft, "ksk_split_cl", text="Kinetic Impulse Split")
sub.prop(soft, "kss_split_cl", text="Soft Impulse Split")

elif physics_type == 'STATIC':
col = layout.column()
Expand Down
30 changes: 30 additions & 0 deletions source/blender/makesrna/intern/rna_object_force.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,36 @@ static void rna_def_game_softbody(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "ksrhr_cl",
"Soft vs Rigid Hardness");

prop = RNA_def_property(srna, "kskhr_cl", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kSKHR_CL");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "kskhr_cl",
"Soft vs Kinetic Hardness");
prop = RNA_def_property(srna, "ksshr_cl", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kSSHR_CL");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "ksshr_cl",
"Soft vs Soft Hardness");

prop = RNA_def_property(srna, "ksr_split_cl", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kSR_SPLT_CL");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "ksr_split_cl",
"Rigid Impulse Split");

prop = RNA_def_property(srna, "ksk_split_cl", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kSK_SPLT_CL");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "ksk_split_cl",
"Kinetic Impulse Split");

prop = RNA_def_property(srna, "kss_split_cl", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "kSS_SPLT_CL");
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_ui_text(prop, "kss_split_cl",
"Soft Impulse Split");


/* Integers */

prop = RNA_def_property(srna, "location_iterations", PROP_INT, PROP_NONE);
Expand Down

0 comments on commit ef6c5b4

Please sign in to comment.