[Bf-blender-cvs] [b025e3b36af] fracture_modifier: check for availability of "constraint_type" in DNA struct, if not there set default value "fixed"

Martin Felke noreply at git.blender.org
Fri Jun 16 22:01:17 CEST 2017


Commit: b025e3b36af1119b05f930df9d12b568a344a5cc
Author: Martin Felke
Date:   Fri Jun 16 22:00:37 2017 +0200
Branches: fracture_modifier
https://developer.blender.org/rBb025e3b36af1119b05f930df9d12b568a344a5cc

check for availability of "constraint_type" in DNA struct, if not there set default value "fixed"

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

M	source/blender/blenloader/intern/readfile.c

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e22b43eaf8f..64c49f01d69 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5266,11 +5266,11 @@ static void load_fracture_modifier(FileData* fd, FractureModifierData *fmd)
 		fmd->dynamic_min_size = 1.0f;
 	}
 
-#if 0
-	if (fd->fileversion < 279) {
+	//if there is no constraint_type in blend, just set the default value "fixed"...
+	if (!DNA_struct_elem_find(fd->filesdna, "FractureModifierData", "int", "constraint_type"))
+	{
 		fmd->constraint_type = RBC_TYPE_FIXED;
 	}
-#endif
 
 	if (fm == NULL || fmd->dm_group) {
 		fmd->dm = NULL;




More information about the Bf-blender-cvs mailing list