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:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-06 17:12:06 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-06 22:10:12 +0400
commitc03951da141497000dc9ab895f4f2299a5365c7a (patch)
treea06a93f6814b8825102d9d8bbdcab5d3f99f668f /source/blender/editors/render/render_update.c
parent1f4915e2901c628ebfc8ab9f8e8a99e104e2cdbe (diff)
Texture painting:
Do not generate materials/images/UVs if they are missing. Now we spawn a panel ("Missing Data") with operators to generate the missing data and pop a warning if user tries to paint without them. The reason we have reverted this is that it is too easy to end up with more textures than we wanted. It was impossible to enter texture paint without having textures added, and code makes too many assumptions about what user may want. Discussed during Sunday's meeting. This might be a candidate for 2.72a but I'm not sure how other artists will take this (and how refined and crash-free it is), better make a few iterations first. And for interested parties...test please, don't wait until after a release to poke with such issues. Also, add slot operator now adds a new unconnected image node in cycles. Only used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r--source/blender/editors/render/render_update.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 6b58d3d55aa..df7ca9f11b2 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -166,7 +166,6 @@ void ED_render_engine_changed(Main *bmain)
bScreen *sc;
ScrArea *sa;
Scene *scene;
- Material *ma;
for (sc = bmain->screen.first; sc; sc = sc->id.next)
for (sa = sc->areabase.first; sa; sa = sa->next)
@@ -176,13 +175,6 @@ void ED_render_engine_changed(Main *bmain)
for (scene = bmain->scene.first; scene; scene = scene->id.next)
ED_render_id_flush_update(bmain, &scene->id);
-
- /* reset texture painting. Sending one dependency graph signal for any material should
- * refresh any texture slots */
- ma = bmain->mat.first;
- if (ma) {
- DAG_id_tag_update(&ma->id, 0);
- }
}
/***************************** Updates ***********************************
@@ -482,15 +474,22 @@ static void image_changed(Main *bmain, Image *ima)
texture_changed(bmain, tex);
}
-static void scene_changed(Main *bmain, Scene *UNUSED(scene))
+static void scene_changed(Main *bmain, Scene *scene)
{
Object *ob;
Material *ma;
/* glsl */
- for (ob = bmain->object.first; ob; ob = ob->id.next)
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
if (ob->gpulamp.first)
GPU_lamp_free(ob);
+
+ if (ob->mode & OB_MODE_TEXTURE_PAINT) {
+ BKE_texpaint_slots_refresh_object(scene, ob);
+ BKE_paint_proj_mesh_data_check(scene, ob, NULL, NULL, NULL, NULL);
+ GPU_drawobject_free(ob->derivedFinal);
+ }
+ }
for (ma = bmain->mat.first; ma; ma = ma->id.next)
if (ma->gpumaterial.first)