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