diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 18:17:57 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-12-12 18:17:57 +0300 |
commit | 9be6d5ff18fd593e853647d9eec8b3fb074acd7c (patch) | |
tree | 485fb9203c310b5119a549e698db241012ed39ff /source/blender/makesrna/intern/rna_rigidbody.c | |
parent | 54528079e3cfaf74eaa119615386564820b45276 (diff) | |
parent | 5f852a4324212221500d11b2c7594f5e0ca894c6 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenloader/intern/versioning_270.c
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_particle.c
Diffstat (limited to 'source/blender/makesrna/intern/rna_rigidbody.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 44 |
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 45ca865ad78..be835238911 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -727,7 +727,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"); @@ -804,34 +806,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) |