Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2017-12-10 14:21:12 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2017-12-10 14:21:12 +0300
commit91864d9bbe94a6456dd947212d2ba44e562624a8 (patch)
treea299ccd7176d8c97e6b2ba9a94d1ded93a0e6c2f /source/blender/makesrna
parente9a4bb925c2d670df7ebb59c22c18bc0826e756c (diff)
New RNA file for the groom ID.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt1
-rw-r--r--source/blender/makesrna/intern/makesrna.c1
-rw-r--r--source/blender/makesrna/intern/rna_ID.c1
-rw-r--r--source/blender/makesrna/intern/rna_groom.c86
-rw-r--r--source/blender/makesrna/intern/rna_internal.h1
6 files changed, 91 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 3faae6612f0..c0ecb24bede 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -289,6 +289,7 @@ extern StructRNA RNA_GameTimerProperty;
extern StructRNA RNA_GaussianBlurSequence;
extern StructRNA RNA_GlowSequence;
extern StructRNA RNA_GreasePencil;
+extern StructRNA RNA_Groom;
extern StructRNA RNA_Group;
extern StructRNA RNA_HairGroup;
extern StructRNA RNA_HairPattern;
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 75b95a45c71..bac0ecd1e4d 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -51,6 +51,7 @@ set(DEFSRC
rna_fcurve.c
rna_fluidsim.c
rna_gpencil.c
+ rna_groom.c
rna_group.c
rna_hair.c
rna_image.c
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index b7c12c3504e..1a28bef2535 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3344,6 +3344,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
{"rna_fcurve.c", "rna_fcurve_api.c", RNA_def_fcurve},
{"rna_fluidsim.c", NULL, RNA_def_fluidsim},
{"rna_gpencil.c", NULL, RNA_def_gpencil},
+ {"rna_groom.c", NULL, RNA_def_groom},
{"rna_group.c", NULL, RNA_def_group},
{"rna_hair.c", NULL, RNA_def_hair},
{"rna_image.c", "rna_image_api.c", RNA_def_image},
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 44df8916796..67d6f125d3c 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -198,6 +198,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
case ID_CF: return &RNA_CacheFile;
case ID_CU: return &RNA_Curve;
case ID_GD: return &RNA_GreasePencil;
+ case ID_GM: return &RNA_Groom;
case ID_GR: return &RNA_Group;
case ID_IM: return &RNA_Image;
case ID_KE: return &RNA_Key;
diff --git a/source/blender/makesrna/intern/rna_groom.c b/source/blender/makesrna/intern/rna_groom.c
new file mode 100644
index 00000000000..6d5a55ab312
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_groom.c
@@ -0,0 +1,86 @@
+/*
+ * ***** 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) Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/makesrna/intern/rna_groom.c
+ * \ingroup RNA
+ */
+
+#include <stdlib.h>
+
+#include "DNA_groom_types.h"
+#include "DNA_scene_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_string_utils.h"
+#include "BLI_utildefines.h"
+
+#include "BLT_translation.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "rna_internal.h"
+
+#include "WM_types.h"
+#include "DNA_object_types.h"
+
+
+#ifdef RNA_RUNTIME
+
+#include "WM_api.h"
+
+#include "BKE_groom.h"
+
+
+static void rna_Groom_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
+{
+ WM_main_add_notifier(NC_GROOM | NA_EDITED, NULL);
+}
+
+#else
+
+static void rna_def_groom(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "Groom", "ID");
+ RNA_def_struct_sdna(srna, "Groom");
+ RNA_def_struct_ui_text(srna, "Groom", "Guide curve geometry for hair");
+ RNA_def_struct_ui_icon(srna, ICON_NONE);
+
+ /* Animation Data */
+ rna_def_animdata_common(srna);
+}
+
+void RNA_def_groom(BlenderRNA *brna)
+{
+ rna_def_groom(brna);
+}
+
+#endif
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 397273334f5..3876b26f7bc 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -152,6 +152,7 @@ void RNA_def_fluidsim(struct BlenderRNA *brna);
void RNA_def_fcurve(struct BlenderRNA *brna);
void RNA_def_gameproperty(struct BlenderRNA *brna);
void RNA_def_gpencil(struct BlenderRNA *brna);
+void RNA_def_groom(struct BlenderRNA *brna);
void RNA_def_group(struct BlenderRNA *brna);
void RNA_def_image(struct BlenderRNA *brna);
void RNA_def_key(struct BlenderRNA *brna);