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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_rigidbody.c')
-rw-r--r--source/blender/makesrna/intern/rna_rigidbody.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c
index 85a34a94746..a1a7efdaba5 100644
--- a/source/blender/makesrna/intern/rna_rigidbody.c
+++ b/source/blender/makesrna/intern/rna_rigidbody.c
@@ -730,7 +730,9 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
FunctionRNA *func;
+ PropertyRNA *parm;
srna = RNA_def_struct(brna, "RigidBodyWorld", NULL);
RNA_def_struct_sdna(srna, "RigidBodyWorld");
@@ -813,34 +815,28 @@ static void rna_def_rigidbody_world(BlenderRNA *brna)
func = RNA_def_function(srna, "convex_sweep_test", "rna_RigidBodyWorld_convex_sweep_test");
RNA_def_function_ui_description(func, "Sweep test convex rigidbody against the current rigidbody world");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
-
- prop = RNA_def_pointer(func, "object", "Object", "", "Rigidbody object with a convex collision shape");
- RNA_def_property_flag(prop, PROP_REQUIRED | PROP_NEVER_NULL);
- RNA_def_property_clear_flag(prop, PROP_THICK_WRAP);
-
+ parm = RNA_def_pointer(func, "object", "Object", "", "Rigidbody object with a convex collision shape");
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
+ RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
/* ray start and end */
- prop = RNA_def_float_vector(func, "start", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
- RNA_def_property_flag(prop, PROP_REQUIRED);
- prop = RNA_def_float_vector(func, "end", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
- RNA_def_property_flag(prop, PROP_REQUIRED);
-
- prop = RNA_def_float_vector(func, "object_location", 3, NULL, -FLT_MAX, FLT_MAX, "Location",
+ parm = RNA_def_float_vector(func, "start", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ parm = RNA_def_float_vector(func, "end", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ parm = RNA_def_float_vector(func, "object_location", 3, NULL, -FLT_MAX, FLT_MAX, "Location",
"The hit location of this sweep test", -1e4, 1e4);
- RNA_def_property_flag(prop, PROP_THICK_WRAP);
- RNA_def_function_output(func, prop);
-
- prop = RNA_def_float_vector(func, "hitpoint", 3, NULL, -FLT_MAX, FLT_MAX, "Hitpoint",
+ RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0);
+ RNA_def_function_output(func, parm);
+ parm = RNA_def_float_vector(func, "hitpoint", 3, NULL, -FLT_MAX, FLT_MAX, "Hitpoint",
"The hit location of this sweep test", -1e4, 1e4);
- RNA_def_property_flag(prop, PROP_THICK_WRAP);
- RNA_def_function_output(func, prop);
-
- prop = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal",
+ RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0);
+ RNA_def_function_output(func, parm);
+ parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal",
"The face normal at the sweep test hit location", -1e4, 1e4);
- RNA_def_property_flag(prop, PROP_THICK_WRAP);
- RNA_def_function_output(func, prop);
-
- prop = RNA_def_int(func, "has_hit", 0, 0, 0, "", "If the function has found collision point, value is 1, otherwise 0", 0, 0);
- RNA_def_function_output(func, prop);
+ RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0);
+ RNA_def_function_output(func, parm);
+ parm = RNA_def_int(func, "has_hit", 0, 0, 0, "", "If the function has found collision point, value is 1, otherwise 0", 0, 0);
+ RNA_def_function_output(func, parm);
}
static void rna_def_rigidbody_object(BlenderRNA *brna)