diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_meta.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_meta_api.c | 60 |
5 files changed, 65 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 849c61f30b3..7b6fb30d692 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -105,6 +105,7 @@ set(APISRC rna_main_api.c rna_material_api.c rna_mesh_api.c + rna_meta_api.c rna_texture_api.c rna_object_api.c rna_pose_api.c diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index e1844faf6e9..96ca3805d3e 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -3248,7 +3248,7 @@ static RNAProcessItem PROCESS_ITEMS[] = { {"rna_main.c", "rna_main_api.c", RNA_def_main}, {"rna_material.c", "rna_material_api.c", RNA_def_material}, {"rna_mesh.c", "rna_mesh_api.c", RNA_def_mesh}, - {"rna_meta.c", NULL, RNA_def_meta}, + {"rna_meta.c", "rna_meta_api.c", RNA_def_meta}, {"rna_modifier.c", NULL, RNA_def_modifier}, {"rna_nla.c", NULL, RNA_def_nla}, {"rna_nodetree.c", NULL, RNA_def_nodetree}, diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index c1f5698016c..9161f7932e6 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -264,6 +264,7 @@ void RNA_api_keymapitems(struct StructRNA *srna); void RNA_api_main(struct StructRNA *srna); void RNA_api_material(StructRNA *srna); void RNA_api_mesh(struct StructRNA *srna); +void RNA_api_meta(struct StructRNA *srna); void RNA_api_object(struct StructRNA *srna); void RNA_api_object_base(struct StructRNA *srna); void RNA_api_pose(struct StructRNA *srna); diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 08eefc082bf..4813f25dea7 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -351,6 +351,8 @@ static void rna_def_metaball(BlenderRNA *brna) /* anim */ rna_def_animdata_common(srna); + + RNA_api_meta(srna); } void RNA_def_meta(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_meta_api.c b/source/blender/makesrna/intern/rna_meta_api.c new file mode 100644 index 00000000000..500e202b16f --- /dev/null +++ b/source/blender/makesrna/intern/rna_meta_api.c @@ -0,0 +1,60 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2009 Blender Foundation. + * All rights reserved. + * + * + * Contributor(s): Blender Foundation + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/makesrna/intern/rna_meta_api.c + * \ingroup RNA + */ + + +#include <stdlib.h> +#include <stdio.h> + +#include "RNA_define.h" + +#include "BLO_sys_types.h" + +#include "BLI_utildefines.h" + +#include "ED_mball.h" + +#include "rna_internal.h" /* own include */ + +#ifdef RNA_RUNTIME +/* none */ +#else + +void RNA_api_meta(StructRNA *srna) +{ + FunctionRNA *func; + PropertyRNA *parm; + + func = RNA_def_function(srna, "transform", "ED_mball_transform"); + RNA_def_function_ui_description(func, "Transform meta elements by a matrix"); + parm = RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f); + RNA_def_property_flag(parm, PROP_REQUIRED); +} + +#endif |