[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37017] branches/soc-2011-onion/source/ blender: ** fixed possible bad level call, was causing scons build to fail due to include path

Jason Wilkins Jason.A.Wilkins at gmail.com
Mon May 30 09:30:15 CEST 2011


Revision: 37017
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37017
Author:   jwilkins
Date:     2011-05-30 07:30:15 +0000 (Mon, 30 May 2011)
Log Message:
-----------
** fixed possible bad level call, was causing scons build to fail due to include path

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenkernel/BKE_material.h
    branches/soc-2011-onion/source/blender/blenkernel/intern/material.c
    branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_material.h
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_material.h	2011-05-30 06:36:30 UTC (rev 37016)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_material.h	2011-05-30 07:30:15 UTC (rev 37017)
@@ -59,6 +59,9 @@
 
 void automatname(struct Material *);
 
+/* MatCap */
+void matcap_material_changed(void);
+
 /* material slots */
 
 struct Material ***give_matarar(struct Object *ob);

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/material.c	2011-05-30 06:36:30 UTC (rev 37016)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/material.c	2011-05-30 07:30:15 UTC (rev 37017)
@@ -90,6 +90,15 @@
 	matcap_ma.mtex[0] = &matcap_mtex;
 }
 
+void matcap_material_changed(void)
+{
+	/* icons */
+	BKE_icon_changed(BKE_icon_getid(&matcap_ma.id));
+
+	if(matcap_ma.gpumaterial.first)
+		GPU_material_free(&matcap_ma);
+}
+
 /* used in UI and render */
 Material defmaterial;
 

Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c	2011-05-30 06:36:30 UTC (rev 37016)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c	2011-05-30 07:30:15 UTC (rev 37017)
@@ -37,6 +37,7 @@
 #include "rna_internal.h"
 
 #include "BKE_key.h"
+#include "BKE_material.h"
 
 #include "DNA_action_types.h"
 #include "DNA_key_types.h"
@@ -46,8 +47,6 @@
 #include "DNA_view3d_types.h"
 #include "DNA_material_types.h"
 
-#include "GPU_material.h"
-
 #include "WM_api.h"
 #include "WM_types.h"
 
@@ -840,10 +839,7 @@
 
 static void rna_View3D_matcap_image_changed(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
-	extern Material matcap_ma;
-
-	if(matcap_ma.gpumaterial.first)
-		GPU_material_free(&matcap_ma);
+	matcap_material_changed();
 }
 
 static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value)




More information about the Bf-blender-cvs mailing list