Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 11c96e9a347..6b79a7b4d62 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -783,14 +783,14 @@ void init_render_material(Material *mat, int r_mode, float *amb)
}
}
-void init_render_materials(int r_mode, float *amb)
+void init_render_materials(Main *bmain, int r_mode, float *amb)
{
Material *ma;
/* clear these flags before going over materials, to make sure they
* are cleared only once, otherwise node materials contained in other
* node materials can go wrong */
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
+ for(ma= bmain->mat.first; ma; ma= ma->id.next) {
if(ma->id.us) {
ma->texco= 0;
ma->mapto= 0;
@@ -798,7 +798,7 @@ void init_render_materials(int r_mode, float *amb)
}
/* two steps, first initialize, then or the flags for layers */
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
+ for(ma= bmain->mat.first; ma; ma= ma->id.next) {
/* is_used flag comes back in convertblender.c */
ma->flag &= ~MA_IS_USED;
if(ma->id.us)
@@ -815,10 +815,10 @@ void end_render_material(Material *mat)
ntreeEndExecTree(mat->nodetree); /* has internal flag to detect it only does it once */
}
-void end_render_materials(void)
+void end_render_materials(Main *bmain)
{
Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next)
+ for(ma= bmain->mat.first; ma; ma= ma->id.next)
if(ma->id.us)
end_render_material(ma);
}