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)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to