diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index b66556109e6..c680abe71a4 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -540,28 +540,28 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_ui_description(func, "Compute the coordinate (and scale for ortho cameras) " "given object should be to 'see' all given coordinates"); parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to get render size information from, if available"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_float_array(func, "coordinates", 1, NULL, -FLT_MAX, FLT_MAX, "", "Coordinates to fit in", -FLT_MAX, FLT_MAX); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_DYNAMIC); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL | PROP_DYNAMIC, PARM_REQUIRED); parm = RNA_def_property(func, "co_return", PROP_FLOAT, PROP_XYZ); RNA_def_property_array(parm, 3); RNA_def_property_ui_text(parm, "", "The location to aim to be able to see all given points"); - RNA_def_property_flag(parm, PROP_OUTPUT); + RNA_def_parameter_flags(parm, 0, PARM_OUTPUT); parm = RNA_def_property(func, "scale_return", PROP_FLOAT, PROP_NONE); RNA_def_property_ui_text(parm, "", "The ortho scale to aim to be able to see all given points (if relevant)"); - RNA_def_property_flag(parm, PROP_OUTPUT); + RNA_def_parameter_flags(parm, 0, PARM_OUTPUT); /* mesh */ func = RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh"); RNA_def_function_ui_description(func, "Create a Mesh data-block with modifiers applied"); RNA_def_function_flag(func, FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers"); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_boolean(func, "calc_tessface", true, "Calculate Tessellation", "Calculate tessellation faces"); RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates"); parm = RNA_def_pointer(func, "mesh", "Mesh", "", @@ -574,7 +574,7 @@ void RNA_api_object(StructRNA *srna) "be freed manually with free_dupli_list to restore the " "objects real matrix and layers"); parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis"); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); RNA_def_enum(func, "settings", dupli_eval_mode_items, 0, "", "Generate texture coordinates for rendering"); RNA_def_function_flag(func, FUNC_USE_REPORTS); @@ -594,15 +594,15 @@ void RNA_api_object(StructRNA *srna) RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keyblock"); /* optional */ RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes"); parm = RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock"); - RNA_def_property_flag(parm, PROP_RNAPTR); + RNA_def_parameter_flags(parm, 0, PARM_RNAPTR); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "shape_key_remove", "rna_Object_shape_key_remove"); RNA_def_function_ui_description(func, "Remove a Shape Key from this object"); RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS); parm = RNA_def_pointer(func, "key", "ShapeKey", "", "Keyblock to be removed"); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); - RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); + RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); /* Ray Cast */ func = RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast"); @@ -611,9 +611,9 @@ void RNA_api_object(StructRNA *srna) /* ray start and end */ parm = RNA_def_float_vector(func, "origin", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_float_vector(func, "direction", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_float(func, "distance", BVH_RAYCAST_DIST_MAX, 0.0, BVH_RAYCAST_DIST_MAX, "", "Maximum distance", 0.0, BVH_RAYCAST_DIST_MAX); @@ -622,11 +622,11 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_output(func, parm); parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The hit location of this ray cast", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_THICK_WRAP); + 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 ray cast hit location", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_THICK_WRAP); + RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); RNA_def_function_output(func, parm); parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when original data isn't available", 0, 0); RNA_def_function_output(func, parm); @@ -638,7 +638,7 @@ void RNA_api_object(StructRNA *srna) /* location of point for test and max distance */ parm = RNA_def_float_vector(func, "origin", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* default is sqrt(FLT_MAX) */ RNA_def_float(func, "distance", 1.844674352395373e+19, 0.0, FLT_MAX, "", "Maximum distance", 0.0, FLT_MAX); @@ -647,11 +647,11 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_output(func, parm); parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "The location on the object closest to the point", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_THICK_WRAP); + 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 closest point", -1e4, 1e4); - RNA_def_property_flag(parm, PROP_THICK_WRAP); + RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); RNA_def_function_output(func, parm); parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when original data isn't available", 0, 0); @@ -661,7 +661,7 @@ void RNA_api_object(StructRNA *srna) func = RNA_def_function(srna, "is_visible", "rna_Object_is_visible"); RNA_def_function_ui_description(func, "Determine if object is visible in a given scene"); parm = RNA_def_pointer(func, "scene", "Scene", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); RNA_def_function_return(func, parm); @@ -669,18 +669,18 @@ void RNA_api_object(StructRNA *srna) func = RNA_def_function(srna, "is_modified", "rna_Object_is_modified"); RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data"); parm = RNA_def_pointer(func, "scene", "Scene", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "is_deform_modified", "rna_Object_is_deform_modified"); RNA_def_function_ui_description(func, "Determine if this object is modified by a deformation from the base mesh data"); parm = RNA_def_pointer(func, "scene", "Scene", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); RNA_def_function_return(func, parm); @@ -690,10 +690,10 @@ void RNA_api_object(StructRNA *srna) RNA_def_function_ui_description(func, "Returns a string for derived mesh data"); parm = RNA_def_enum(func, "type", mesh_dm_info_items, 0, "", "Modifier settings to apply"); - RNA_def_property_flag(parm, PROP_REQUIRED); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* weak!, no way to return dynamic string type */ parm = RNA_def_string(func, "result", NULL, 16384, "result", ""); - RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ + RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); /* needed for string return value */ RNA_def_function_output(func, parm); #endif /* NDEBUG */ @@ -716,7 +716,7 @@ void RNA_api_object_base(StructRNA *srna) RNA_def_function_ui_description(func, "Sets the object layers from a 3D View (use when adding an object in local view)"); parm = RNA_def_pointer(func, "view", "SpaceView3D", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); + RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); } #endif /* RNA_RUNTIME */ |