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:
authorTon Roosendaal <ton@blender.org>2011-01-02 22:46:32 +0300
committerTon Roosendaal <ton@blender.org>2011-01-02 22:46:32 +0300
commit05cfe50436a97b45c36e3a044faaf15c266066c0 (patch)
tree9ab8c1ea122982be6da802615af96694c2d1193a /source/blender/blenkernel
parent5d6c76c6a3914ce26d6584b96568e9647aa7d991 (diff)
Bugfix #25446 (and todo item)
The icons for materials were always lagging or not updating at all. I also found it suspicious slow... It appeared that the icons now store a "mip level", where for every change in Materials 2 render jobs for icons were started, one for 32x32 pix, one for 96x96. The latter was cancelling out the first job almost always. Also made preview renders detect size, to set amount of tiles to be rendered. Small icons use 1 part, larger previews 16 now. All in all, behaves much smoother now! But, will also update the thread Jobs manager to allow "delayed jobs" like for icons, these are aggressively put as first in the jobs list.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/material.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index cac41e457a6..dae00636370 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -85,7 +85,8 @@ void free_material(Material *ma)
BKE_free_animdata((ID *)ma);
- BKE_previewimg_free(&ma->preview);
+ if(ma->preview)
+ BKE_previewimg_free(&ma->preview);
BKE_icon_delete((struct ID*)ma);
ma->id.icon_id = 0;
@@ -250,7 +251,7 @@ Material *localize_material(Material *ma)
if(ma->ramp_col) man->ramp_col= MEM_dupallocN(ma->ramp_col);
if(ma->ramp_spec) man->ramp_spec= MEM_dupallocN(ma->ramp_spec);
- if (ma->preview) man->preview = BKE_previewimg_copy(ma->preview);
+ man->preview = NULL;
if(ma->nodetree) {
man->nodetree= ntreeLocalize(ma->nodetree);