Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object_api.c
| Show First 20 Lines • Show All 534 Lines • ▼ Show 20 Lines | #endif | ||||
| parm = RNA_def_int(func, "y", 1, 0, INT_MAX, "", "Height of the render area", 0, 10000); | parm = RNA_def_int(func, "y", 1, 0, INT_MAX, "", "Height of the render area", 0, 10000); | ||||
| parm = RNA_def_float(func, "scale_x", 1.0f, 1.0e-6f, FLT_MAX, "", "Width scaling factor", 1.0e-2f, 100.0f); | parm = RNA_def_float(func, "scale_x", 1.0f, 1.0e-6f, FLT_MAX, "", "Width scaling factor", 1.0e-2f, 100.0f); | ||||
| parm = RNA_def_float(func, "scale_y", 1.0f, 1.0e-6f, FLT_MAX, "", "height scaling factor", 1.0e-2f, 100.0f); | parm = RNA_def_float(func, "scale_y", 1.0f, 1.0e-6f, FLT_MAX, "", "height scaling factor", 1.0e-2f, 100.0f); | ||||
| func = RNA_def_function(srna, "camera_fit_coords", "rna_Object_camera_fit_coords"); | func = RNA_def_function(srna, "camera_fit_coords", "rna_Object_camera_fit_coords"); | ||||
| RNA_def_function_ui_description(func, "Compute the coordinate (and scale for ortho cameras) " | RNA_def_function_ui_description(func, "Compute the coordinate (and scale for ortho cameras) " | ||||
| "given object should be to 'see' all given coordinates"); | "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"); | 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", | parm = RNA_def_float_array(func, "coordinates", 1, NULL, -FLT_MAX, FLT_MAX, "", "Coordinates to fit in", | ||||
| -FLT_MAX, FLT_MAX); | -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); | parm = RNA_def_property(func, "co_return", PROP_FLOAT, PROP_XYZ); | ||||
| RNA_def_property_array(parm, 3); | 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_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); | 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_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 */ | /* mesh */ | ||||
| func = RNA_def_function(srna, "to_mesh", "rna_Object_to_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_ui_description(func, "Create a Mesh data-block with modifiers applied"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers"); | 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"); | 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"); | 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_tessface", true, "Calculate Tessellation", "Calculate tessellation faces"); | ||||
| RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates"); | RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates"); | ||||
| parm = RNA_def_pointer(func, "mesh", "Mesh", "", | parm = RNA_def_pointer(func, "mesh", "Mesh", "", | ||||
| "Mesh created from object, remove it if it is only used for export"); | "Mesh created from object, remove it if it is only used for export"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* duplis */ | /* duplis */ | ||||
| func = RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist"); | func = RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist"); | ||||
| RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to " | RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to " | ||||
| "be freed manually with free_dupli_list to restore the " | "be freed manually with free_dupli_list to restore the " | ||||
| "objects real matrix and layers"); | "objects real matrix and layers"); | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis"); | 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_enum(func, "settings", dupli_eval_mode_items, 0, "", "Generate texture coordinates for rendering"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| func = RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist"); | func = RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist"); | ||||
| RNA_def_function_ui_description(func, "Free the list of dupli objects"); | RNA_def_function_ui_description(func, "Free the list of dupli objects"); | ||||
| /* Armature */ | /* Armature */ | ||||
| func = RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature"); | func = RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature"); | ||||
| RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier"); | RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier"); | ||||
| parm = RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL"); | parm = RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* Shape key */ | /* Shape key */ | ||||
| func = RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add"); | func = RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add"); | ||||
| RNA_def_function_ui_description(func, "Add shape key to this object"); | RNA_def_function_ui_description(func, "Add shape key to this object"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keyblock"); /* optional */ | 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"); | 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"); | 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); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "shape_key_remove", "rna_Object_shape_key_remove"); | 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_ui_description(func, "Remove a Shape Key from this object"); | ||||
| RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "key", "ShapeKey", "", "Keyblock to be removed"); | 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_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| /* Ray Cast */ | /* Ray Cast */ | ||||
| func = RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast"); | func = RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast"); | ||||
| RNA_def_function_ui_description(func, "Cast a ray onto in object space"); | RNA_def_function_ui_description(func, "Cast a ray onto in object space"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| /* ray start and end */ | /* ray start and end */ | ||||
| parm = RNA_def_float_vector(func, "origin", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); | 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); | 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, | RNA_def_float(func, "distance", BVH_RAYCAST_DIST_MAX, 0.0, BVH_RAYCAST_DIST_MAX, | ||||
| "", "Maximum distance", 0.0, BVH_RAYCAST_DIST_MAX); | "", "Maximum distance", 0.0, BVH_RAYCAST_DIST_MAX); | ||||
| /* return location and normal */ | /* return location and normal */ | ||||
| parm = RNA_def_boolean(func, "result", 0, "", ""); | parm = RNA_def_boolean(func, "result", 0, "", ""); | ||||
| RNA_def_function_output(func, parm); | RNA_def_function_output(func, parm); | ||||
| parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", | parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", | ||||
| "The hit location of this ray cast", -1e4, 1e4); | "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); | RNA_def_function_output(func, parm); | ||||
| parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", | 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); | "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); | 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); | 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); | RNA_def_function_output(func, parm); | ||||
| /* Nearest Point */ | /* Nearest Point */ | ||||
| func = RNA_def_function(srna, "closest_point_on_mesh", "rna_Object_closest_point_on_mesh"); | func = RNA_def_function(srna, "closest_point_on_mesh", "rna_Object_closest_point_on_mesh"); | ||||
| RNA_def_function_ui_description(func, "Find the nearest point in object space"); | RNA_def_function_ui_description(func, "Find the nearest point in object space"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| /* location of point for test and max distance */ | /* location of point for test and max distance */ | ||||
| parm = RNA_def_float_vector(func, "origin", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4); | 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) */ | /* default is sqrt(FLT_MAX) */ | ||||
| RNA_def_float(func, "distance", 1.844674352395373e+19, 0.0, FLT_MAX, "", "Maximum distance", 0.0, FLT_MAX); | RNA_def_float(func, "distance", 1.844674352395373e+19, 0.0, FLT_MAX, "", "Maximum distance", 0.0, FLT_MAX); | ||||
| /* return location and normal */ | /* return location and normal */ | ||||
| parm = RNA_def_boolean(func, "result", 0, "", ""); | parm = RNA_def_boolean(func, "result", 0, "", ""); | ||||
| RNA_def_function_output(func, parm); | RNA_def_function_output(func, parm); | ||||
| parm = RNA_def_float_vector(func, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", | 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); | "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); | RNA_def_function_output(func, parm); | ||||
| parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", | parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", | ||||
| "The face normal at the closest point", -1e4, 1e4); | "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); | 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); | 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); | RNA_def_function_output(func, parm); | ||||
| /* View */ | /* View */ | ||||
| func = RNA_def_function(srna, "is_visible", "rna_Object_is_visible"); | 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"); | RNA_def_function_ui_description(func, "Determine if object is visible in a given scene"); | ||||
| parm = RNA_def_pointer(func, "scene", "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"); | parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* utility function for checking if the object is modified */ | /* utility function for checking if the object is modified */ | ||||
| func = RNA_def_function(srna, "is_modified", "rna_Object_is_modified"); | 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"); | RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data"); | ||||
| parm = RNA_def_pointer(func, "scene", "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_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); | 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"); | parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "is_deform_modified", "rna_Object_is_deform_modified"); | 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"); | 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", "", ""); | 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"); | 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"); | parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| #ifndef NDEBUG | #ifndef NDEBUG | ||||
| /* mesh */ | /* mesh */ | ||||
| func = RNA_def_function(srna, "dm_info", "rna_Object_dm_info"); | func = RNA_def_function(srna, "dm_info", "rna_Object_dm_info"); | ||||
| RNA_def_function_ui_description(func, "Returns a string for derived mesh data"); | 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"); | 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 */ | /* weak!, no way to return dynamic string type */ | ||||
| parm = RNA_def_string(func, "result", NULL, 16384, "result", ""); | 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); | RNA_def_function_output(func, parm); | ||||
| #endif /* NDEBUG */ | #endif /* NDEBUG */ | ||||
| func = RNA_def_function(srna, "update_from_editmode", "rna_Object_update_from_editmode"); | func = RNA_def_function(srna, "update_from_editmode", "rna_Object_update_from_editmode"); | ||||
| RNA_def_function_ui_description(func, "Load the objects edit-mode data into the object data"); | RNA_def_function_ui_description(func, "Load the objects edit-mode data into the object data"); | ||||
| parm = RNA_def_boolean(func, "result", 0, "", "Success"); | parm = RNA_def_boolean(func, "result", 0, "", "Success"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "cache_release", "BKE_object_free_caches"); | func = RNA_def_function(srna, "cache_release", "BKE_object_free_caches"); | ||||
| RNA_def_function_ui_description(func, "Release memory used by caches associated with this object. Intended to be used by render engines only"); | RNA_def_function_ui_description(func, "Release memory used by caches associated with this object. Intended to be used by render engines only"); | ||||
| } | } | ||||
| void RNA_api_object_base(StructRNA *srna) | void RNA_api_object_base(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| func = RNA_def_function(srna, "layers_from_view", "rna_ObjectBase_layers_from_view"); | func = RNA_def_function(srna, "layers_from_view", "rna_ObjectBase_layers_from_view"); | ||||
| RNA_def_function_ui_description(func, | RNA_def_function_ui_description(func, | ||||
| "Sets the object layers from a 3D View (use when adding an object in local view)"); | "Sets the object layers from a 3D View (use when adding an object in local view)"); | ||||
| parm = RNA_def_pointer(func, "view", "SpaceView3D", "", ""); | 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 */ | #endif /* RNA_RUNTIME */ | ||||