Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2009 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * 00022 * Contributor(s): Blender Foundation 00023 * 00024 * ***** END GPL LICENSE BLOCK ***** 00025 */ 00026 00032 #include <stdlib.h> 00033 #include <stdio.h> 00034 00035 #include "RNA_define.h" 00036 00037 #include "BLO_sys_types.h" 00038 00039 #include "BKE_mesh.h" 00040 #include "ED_mesh.h" 00041 00042 #ifdef RNA_RUNTIME 00043 00044 00045 #else 00046 00047 void RNA_api_mesh(StructRNA *srna) 00048 { 00049 FunctionRNA *func; 00050 PropertyRNA *parm; 00051 00052 func= RNA_def_function(srna, "transform", "ED_mesh_transform"); 00053 RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix"); 00054 parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f); 00055 RNA_def_property_flag(parm, PROP_REQUIRED); 00056 00057 func= RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals"); 00058 RNA_def_function_ui_description(func, "Calculate vertex normals"); 00059 00060 func= RNA_def_function(srna, "update", "ED_mesh_update"); 00061 RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges"); 00062 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00063 00064 func= RNA_def_function(srna, "validate", "BKE_mesh_validate"); 00065 RNA_def_function_ui_description(func, "validate geometry, return True when the mesh has had " 00066 "invalid geometry corrected/removed"); 00067 RNA_def_boolean(func, "verbose", 0, "Verbose", "Output information about the errors found"); 00068 parm= RNA_def_boolean(func, "result", 0, "Result", ""); 00069 RNA_def_function_return(func, parm); 00070 } 00071 00072 #endif 00073