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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-03-17 16:41:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-03-18 13:23:05 +0300
commitb0a1cf2c9ae696b07f7a236bc855a5ab4a493dcb (patch)
tree92295af11db5e984da42bfac7ca60190b8549a3f /source/blender/makesrna/intern/rna_ID.c
parent8dcfd392e4e62f193b666304425bc5ae635ecffe (diff)
Objects: add Volume object type, and prototypes for Hair and PointCloud
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index bd5c7e755d6..9a660153a3b 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -75,6 +75,11 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
{ID_SPK, "SPEAKER", ICON_SPEAKER, "Speaker", ""},
{ID_TXT, "TEXT", ICON_TEXT, "Text", ""},
{ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""},
+#ifdef WITH_NEW_OBJECT_TYPES
+ {ID_HA, "HAIR", ICON_HAIR_DATA, "Hair", ""},
+ {ID_PT, "POINTCLOUD", ICON_POINTCLOUD_DATA, "PointCloud", ""},
+#endif
+ {ID_VO, "VOLUME", ICON_VOLUME_DATA, "Volume", ""},
{ID_WM, "WINDOWMANAGER", ICON_WINDOW, "Window Manager", ""},
{ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""},
{ID_WS, "WORKSPACE", ICON_WORKSPACE, "Workspace", ""},
@@ -246,6 +251,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_FreestyleLineStyle) {
return ID_LS;
}
+# ifdef WITH_NEW_OBJECT_TYPES
+ if (base_type == &RNA_Hair) {
+ return ID_HA;
+ }
+# endif
if (base_type == &RNA_Lattice) {
return ID_LT;
}
@@ -279,6 +289,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_PaintCurve) {
return ID_PC;
}
+# ifdef WITH_NEW_OBJECT_TYPES
+ if (base_type == &RNA_PointCloud) {
+ return ID_PT;
+ }
+# endif
if (base_type == &RNA_LightProbe) {
return ID_LP;
}
@@ -303,6 +318,9 @@ short RNA_type_to_ID_code(const StructRNA *type)
if (base_type == &RNA_VectorFont) {
return ID_VF;
}
+ if (base_type == &RNA_Volume) {
+ return ID_VO;
+ }
if (base_type == &RNA_WorkSpace) {
return ID_WS;
}
@@ -337,6 +355,12 @@ StructRNA *ID_code_to_RNA_type(short idcode)
return &RNA_GreasePencil;
case ID_GR:
return &RNA_Collection;
+ case ID_HA:
+# ifdef WITH_NEW_OBJECT_TYPES
+ return &RNA_Hair;
+# else
+ return &RNA_ID;
+# endif
case ID_IM:
return &RNA_Image;
case ID_KE:
@@ -369,6 +393,12 @@ StructRNA *ID_code_to_RNA_type(short idcode)
return &RNA_Palette;
case ID_PC:
return &RNA_PaintCurve;
+ case ID_PT:
+# ifdef WITH_NEW_OBJECT_TYPES
+ return &RNA_PointCloud;
+# else
+ return &RNA_ID;
+# endif
case ID_LP:
return &RNA_LightProbe;
case ID_SCE:
@@ -385,6 +415,8 @@ StructRNA *ID_code_to_RNA_type(short idcode)
return &RNA_Text;
case ID_VF:
return &RNA_VectorFont;
+ case ID_VO:
+ return &RNA_Volume;
case ID_WM:
return &RNA_WindowManager;
case ID_WO: