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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-13 18:23:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-13 18:23:44 +0400
commit0738ae7688d19b471b7cde9cc631096a6162b3fc (patch)
tree4e83e06a400cc1b2845f6e0945bee09196b8083f /source/blender/blenkernel/intern/material.c
parent9ce2086506dcf16ecc0d5dce7851439ae8818e78 (diff)
2.5: more removal of G.main.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 6b79a7b4d62..724536048ce 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -236,6 +236,7 @@ Material *copy_material(Material *ma)
void make_local_material(Material *ma)
{
+ Main *bmain= G.main;
Object *ob;
Mesh *me;
Curve *cu;
@@ -261,7 +262,7 @@ void make_local_material(Material *ma)
}
/* test objects */
- ob= G.main->object.first;
+ ob= bmain->object.first;
while(ob) {
if(ob->mat) {
for(a=0; a<ob->totcol; a++) {
@@ -274,7 +275,7 @@ void make_local_material(Material *ma)
ob= ob->id.next;
}
/* test meshes */
- me= G.main->mesh.first;
+ me= bmain->mesh.first;
while(me) {
if(me->mat) {
for(a=0; a<me->totcol; a++) {
@@ -287,7 +288,7 @@ void make_local_material(Material *ma)
me= me->id.next;
}
/* test curves */
- cu= G.main->curve.first;
+ cu= bmain->curve.first;
while(cu) {
if(cu->mat) {
for(a=0; a<cu->totcol; a++) {
@@ -300,7 +301,7 @@ void make_local_material(Material *ma)
cu= cu->id.next;
}
/* test mballs */
- mb= G.main->mball.first;
+ mb= bmain->mball.first;
while(mb) {
if(mb->mat) {
for(a=0; a<mb->totcol; a++) {
@@ -329,7 +330,7 @@ void make_local_material(Material *ma)
man->id.us= 0;
/* do objects */
- ob= G.main->object.first;
+ ob= bmain->object.first;
while(ob) {
if(ob->mat) {
for(a=0; a<ob->totcol; a++) {
@@ -345,7 +346,7 @@ void make_local_material(Material *ma)
ob= ob->id.next;
}
/* do meshes */
- me= G.main->mesh.first;
+ me= bmain->mesh.first;
while(me) {
if(me->mat) {
for(a=0; a<me->totcol; a++) {
@@ -361,7 +362,7 @@ void make_local_material(Material *ma)
me= me->id.next;
}
/* do curves */
- cu= G.main->curve.first;
+ cu= bmain->curve.first;
while(cu) {
if(cu->mat) {
for(a=0; a<cu->totcol; a++) {
@@ -377,7 +378,7 @@ void make_local_material(Material *ma)
cu= cu->id.next;
}
/* do mballs */
- mb= G.main->mball.first;
+ mb= bmain->mball.first;
while(mb) {
if(mb->mat) {
for(a=0; a<mb->totcol; a++) {