diff options
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index f05b84f6e90..27f4fd3bc05 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -59,7 +59,9 @@ #include "BKE_node.h" #include "BKE_utildefines.h" +#ifndef DISABLE_PYTHON #include "BPY_extern.h" +#endif #include "GPU_material.h" @@ -78,7 +80,9 @@ void free_material(Material *ma) MTex *mtex; int a; +#ifndef DISABLE_PYTHON BPY_free_scriptlink(&ma->scriptlink); +#endif for(a=0; a<MAX_MTEX; a++) { mtex= ma->mtex[a]; @@ -201,8 +205,10 @@ Material *copy_material(Material *ma) id_us_plus((ID *)man->mtex[a]->tex); } } - + +#ifndef DISABLE_PYTHON BPY_copy_scriptlink(&ma->scriptlink); +#endif if(ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col); if(ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec); |