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:
authorThomas Dinges <blender@dingto.org>2010-11-20 12:48:51 +0300
committerThomas Dinges <blender@dingto.org>2010-11-20 12:48:51 +0300
commit6aea182b1e174a78443672596bc6dcd35cad413a (patch)
tree8d3aa3f4af908b4b4c3df8183c6812a5b1c606ab /source/blender/makesrna/intern/rna_constraint.c
parent78cd971bace2b0ead5e2f879a5d60924b2a42ff1 (diff)
Bugfix for [#24768] 6DoF Constraint options missing.
* Added the options in UI and RNA Funny Note: This was on my own to-do list (see commit 20577 in the py file from 2009-06-02 when I ported the UI from C to Python) :P
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c66
1 files changed, 57 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index dee12d43144..f46827f95a6 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -1241,26 +1241,74 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
RNA_def_property_range(prop, -M_PI*2, M_PI*2);
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");
+
+ 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");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "show_pivot", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DRAW_PIVOT);
+ RNA_def_property_ui_text(prop, "Draw Pivot", "Display the pivot point and rotation in 3D view");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
- prop= RNA_def_property(srna, "limit_min", PROP_FLOAT, PROP_NONE);
+ /* Limit */
+
+ /* Limit Min/Max for genereic 6 DoF */
+ prop= RNA_def_property(srna, "limit_generic_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);
+ prop= RNA_def_property(srna, "limit_generic_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", "");
+
+ /* Limit Min/Max for Cone Twist */
+ prop= RNA_def_property(srna, "limit_cone_min", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "minLimit");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Minimum 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");
- RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+ prop= RNA_def_property(srna, "limit_cone_max", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "maxLimit");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Maximum Limit", "");
- prop= RNA_def_property(srna, "show_pivot", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_DRAW_PIVOT);
- RNA_def_property_ui_text(prop, "Draw Pivot", "Display the pivot point and rotation in 3D view");
+
+ /* Limit Booleans */
+ prop= RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
+ RNA_def_property_ui_text(prop, "Use X Limit", "Use minimum/maximum x limit");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "use_limit_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 2);
+ RNA_def_property_ui_text(prop, "Use Y Limit", "Use minimum/maximum y limit");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "use_limit_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 4);
+ RNA_def_property_ui_text(prop, "Use Z Limit", "Use minimum/maximum z limit");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "use_angular_limit_x", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 8);
+ RNA_def_property_ui_text(prop, "Use Angular X Limit", "Use minimum/maximum x angular limit");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "use_angular_limit_y", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 16);
+ RNA_def_property_ui_text(prop, "Use Angular Y Limit", "Use minimum/maximum y angular limit");
+ RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
+ prop= RNA_def_property(srna, "use_angular_limit_z", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 32);
+ RNA_def_property_ui_text(prop, "Use Angular Z Limit", "Use minimum/maximum z angular limit");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
+
}
static void rna_def_constraint_clamp_to(BlenderRNA *brna)