[Bf-blender-cvs] [91864d9bbe9] hair_guides: New RNA file for the groom ID.
Lukas Tönne
noreply at git.blender.org
Sun Dec 10 12:48:28 CET 2017
Commit: 91864d9bbe94a6456dd947212d2ba44e562624a8
Author: Lukas Tönne
Date: Sun Dec 10 11:21:12 2017 +0000
Branches: hair_guides
https://developer.blender.org/rB91864d9bbe94a6456dd947212d2ba44e562624a8
New RNA file for the groom ID.
===================================================================
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/CMakeLists.txt
M source/blender/makesrna/intern/makesrna.c
M source/blender/makesrna/intern/rna_ID.c
A source/blender/makesrna/intern/rna_groom.c
M source/blender/makesrna/intern/rna_internal.h
M source/blender/windowmanager/WM_types.h
===================================================================
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);
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 9edae85cc3c..71a425bed9b 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -256,6 +256,7 @@ typedef struct wmNotifier {
#define NC_GPENCIL (22<<24)
#define NC_LINESTYLE (23<<24)
#define NC_CAMERA (24<<24)
+#define NC_GROOM (25<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
More information about the Bf-blender-cvs
mailing list