Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_mesh_api.c
| Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | static void rna_Mesh_update_gpu_tag(Mesh *mesh) | ||||
| BKE_mesh_batch_cache_dirty_tag(mesh, BKE_MESH_BATCH_DIRTY_ALL); | BKE_mesh_batch_cache_dirty_tag(mesh, BKE_MESH_BATCH_DIRTY_ALL); | ||||
| } | } | ||||
| static void rna_Mesh_count_selected_items(Mesh *mesh, int r_count[3]) | static void rna_Mesh_count_selected_items(Mesh *mesh, int r_count[3]) | ||||
| { | { | ||||
| BKE_mesh_count_selected_items(mesh, r_count); | BKE_mesh_count_selected_items(mesh, r_count); | ||||
| } | } | ||||
| static void rna_Mesh_clear_geometry(Mesh *mesh) | |||||
| { | |||||
| BKE_mesh_clear_geometry(mesh); | |||||
| WM_main_add_notifier(NC_GEOM | ND_DATA, mesh); | |||||
| } | |||||
| #else | #else | ||||
| void RNA_api_mesh(StructRNA *srna) | void RNA_api_mesh(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| const int normals_array_dim[] = {1, 3}; | const int normals_array_dim[] = {1, 3}; | ||||
| ▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | void RNA_api_mesh(StructRNA *srna) | ||||
| func = RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare"); | func = RNA_def_function(srna, "unit_test_compare", "rna_Mesh_unit_test_compare"); | ||||
| RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to"); | RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to compare to"); | ||||
| /* return value */ | /* return value */ | ||||
| parm = RNA_def_string( | parm = RNA_def_string( | ||||
| func, "result", "nothing", 64, "Return value", "String description of result of comparison"); | func, "result", "nothing", 64, "Return value", "String description of result of comparison"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "clear_geometry", "rna_Mesh_clear_geometry"); | |||||
| RNA_def_function_ui_description(func, "Remove all geometry from the mesh"); | |||||
| func = RNA_def_function(srna, "validate", "BKE_mesh_validate"); | func = RNA_def_function(srna, "validate", "BKE_mesh_validate"); | ||||
| RNA_def_function_ui_description(func, | RNA_def_function_ui_description(func, | ||||
| "Validate geometry, return True when the mesh has had " | "Validate geometry, return True when the mesh has had " | ||||
| "invalid geometry corrected/removed"); | "invalid geometry corrected/removed"); | ||||
| RNA_def_boolean(func, "verbose", false, "Verbose", "Output information about the errors found"); | RNA_def_boolean(func, "verbose", false, "Verbose", "Output information about the errors found"); | ||||
| RNA_def_boolean(func, | RNA_def_boolean(func, | ||||
| "clean_customdata", | "clean_customdata", | ||||
| true, | true, | ||||
| Show All 20 Lines | |||||