From 3a0bb75bacde30b08599a6a754fc6c9763352b84 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Oct 2010 01:43:03 +0000 Subject: [#24128] Rigid Body Joint Constraint min/max limits [patch] from Dan Eicher (dna) --- source/blender/makesrna/intern/rna_constraint.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source/blender/makesrna/intern/rna_constraint.c') diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index e4726f5e92c..dee12d43144 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1242,10 +1242,16 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - /* XXX not sure how to wrap the two 6 element arrays for the generic joint */ - //float minLimit[6]; - //float maxLimit[6]; - + prop= RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "minLimit"); + RNA_def_property_array(prop, 6); + RNA_def_property_ui_text(prop, "Minimum Limit", ""); + + prop= RNA_def_property(srna, "limit_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "maxLimit"); + RNA_def_property_array(prop, 6); + RNA_def_property_ui_text(prop, "Maximum Limit", ""); + prop= RNA_def_property(srna, "use_linked_collision", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DISABLE_LINKED_COLLISION); RNA_def_property_ui_text(prop, "Disable Linked Collision", "Disable collision between linked bodies"); -- cgit v1.2.3