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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-08-22 21:22:04 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-08-22 21:22:04 +0400
commitb0dd030ba61fe81914d14e520f710684a2406900 (patch)
treef4f0027962b9aff73220bdeda00a974794875b1b /source/blender/editors/render
parent1939baa47d6d6cd6cedb7440bc7b8e988fe6c702 (diff)
Fixed regression introduced in 50107
Shader preview job localizes material without referencing it as a user, so don't need to unreference itself as a user from this material. Added BKE_material_free_ex function which could skip user dereferencing. This also removed old hack with mtex users.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_preview.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 84319061d52..add2cbd566b 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -749,7 +749,6 @@ static void shader_preview_free(void *customdata)
if (sp->matcopy) {
struct IDProperty *properties;
- int a;
/* node previews */
shader_preview_updatejob(sp);
@@ -757,13 +756,7 @@ static void shader_preview_free(void *customdata)
/* get rid of copied material */
BLI_remlink(&pr_main->mat, sp->matcopy);
- /* BKE_material_free decrements texture, prevent this. hack alert! */
- for (a = 0; a < MAX_MTEX; a++) {
- MTex *mtex = sp->matcopy->mtex[a];
- if (mtex && mtex->tex) mtex->tex = NULL;
- }
-
- BKE_material_free(sp->matcopy);
+ BKE_material_free_ex(sp->matcopy, FALSE);
properties = IDP_GetProperties((ID *)sp->matcopy, FALSE);
if (properties) {