[Bf-blender-cvs] [0eceff4cd73] new-object-types: Fix link error when building without new object types

Brecht Van Lommel noreply at git.blender.org
Thu Mar 12 12:54:17 CET 2020


Commit: 0eceff4cd7337099ae07b2348de82b72d677dd47
Author: Brecht Van Lommel
Date:   Wed Mar 11 17:03:04 2020 +0100
Branches: new-object-types
https://developer.blender.org/rB0eceff4cd7337099ae07b2348de82b72d677dd47

Fix link error when building without new object types

===================================================================

M	source/blender/makesrna/intern/rna_ID.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 4d826be5360..a5d6c2cb8d1 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -251,11 +251,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
   if (base_type == &RNA_FreestyleLineStyle) {
     return ID_LS;
   }
-  if (base_type == &RNA_Hair) {
 #  ifdef WITH_NEW_OBJECT_TYPES
+  if (base_type == &RNA_Hair) {
     return ID_HA;
-#  endif
   }
+#  endif
   if (base_type == &RNA_Lattice) {
     return ID_LT;
   }
@@ -289,11 +289,11 @@ short RNA_type_to_ID_code(const StructRNA *type)
   if (base_type == &RNA_PaintCurve) {
     return ID_PC;
   }
-  if (base_type == &RNA_PointCloud) {
 #  ifdef WITH_NEW_OBJECT_TYPES
+  if (base_type == &RNA_PointCloud) {
     return ID_PT;
-#  endif
   }
+#  endif
   if (base_type == &RNA_LightProbe) {
     return ID_LP;
   }



More information about the Bf-blender-cvs mailing list