[Bf-blender-cvs] [437f69a] master: Allow Python overrides for materials.

Campbell Barton noreply at git.blender.org
Mon Apr 20 12:21:26 CEST 2015


Commit: 437f69ab4593785743c99c1e116f7f9380642f3d
Author: Campbell Barton
Date:   Mon Apr 20 20:20:08 2015 +1000
Branches: master
https://developer.blender.org/rB437f69ab4593785743c99c1e116f7f9380642f3d

Allow Python overrides for materials.

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

M	source/blender/blenkernel/intern/material.c

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

diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index b5b7f3d..c7e6b3b 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -806,9 +806,13 @@ void assign_material_id(ID *id, Material *ma, short act)
 	if (act > MAXMAT) return;
 	if (act < 1) act = 1;
 
+	/* this is needed for Python overrides,
+	 * we just have to take care that the UI can't do this */
+#if 0
 	/* prevent crashing when using accidentally */
 	BLI_assert(id->lib == NULL);
 	if (id->lib) return;
+#endif
 
 	/* test arraylens */




More information about the Bf-blender-cvs mailing list