Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_rigidbody.c
| Show First 20 Lines • Show All 1,147 Lines • ▼ Show 20 Lines | static void rna_def_rigidbody_object(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "restitution", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "restitution", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "restitution"); | RNA_def_property_float_sdna(prop, NULL, "restitution"); | ||||
| RNA_def_property_range(prop, 0.0f, FLT_MAX); | RNA_def_property_range(prop, 0.0f, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3); | RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3); | ||||
| RNA_def_property_float_default(prop, 0.0f); | RNA_def_property_float_default(prop, 0.0f); | ||||
| RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyOb_restitution_set", NULL); | RNA_def_property_float_funcs(prop, NULL, "rna_RigidBodyOb_restitution_set", NULL); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Restitution", | "Bounciness", | ||||
pioverfour: This is the term used in the UI, so I think it makes sense to use the same name for the actual… | |||||
| "Tendency of object to bounce after colliding with another " | "Tendency of object to bounce after colliding with another " | ||||
| "(0 = stays still, 1 = perfectly elastic)"); | "(0 = stays still, 1 = perfectly elastic)"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); | RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); | ||||
| /* Collision Parameters - Sensitivity */ | /* Collision Parameters - Sensitivity */ | ||||
| prop = RNA_def_property(srna, "use_margin", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_margin", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_MARGIN); | RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_MARGIN); | ||||
| RNA_def_property_boolean_default(prop, false); | RNA_def_property_boolean_default(prop, false); | ||||
| ▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines | |||||
This is the term used in the UI, so I think it makes sense to use the same name for the actual prop. It’s also much more obvious for non-physicists.