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>2006-06-30 23:29:57 +0400
committerTon Roosendaal <ton@blender.org>2006-06-30 23:29:57 +0400
commit2c3f80477d9cb29fc20e92aa60c53f1b170d1ee9 (patch)
tree704c470ad288c0854bbc86c49fac2f7fb2398ca7
parent08921033e553b7f3891aebd40a52cba6c67de75b (diff)
Bug #4550
AO option "Use Distances" does not work for colored AO, only for "Plain". I've added this info in tooltip, and added event that resets the color option for AO when "Use Distances" pressed.
-rw-r--r--source/blender/include/butspace.h2
-rw-r--r--source/blender/src/buttons_shading.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h
index a314c7aa1ef..a739ee9327f 100644
--- a/source/blender/include/butspace.h
+++ b/source/blender/include/butspace.h
@@ -279,7 +279,7 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la
#define B_COLZEN 1503
#define B_WMTEXPASTE 1504
#define B_WMTEXCOPY 1505
-
+#define B_AO_DISTANCES 1506
/* *********************** */
#define B_RENDERBUTS 1700
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index 96a027fdb36..d3a98c37875 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -1593,6 +1593,13 @@ void do_worldbuts(unsigned short event)
scrarea_queue_winredraw(curarea);
}
break;
+ case B_AO_DISTANCES:
+ /* distances option only supports plain */
+ wrld= G.buts->lockpoin;
+ if(wrld)
+ wrld->aocolor= WO_AOPLAIN;
+ scrarea_queue_winredraw(curarea);
+ break;
}
}
@@ -1808,7 +1815,7 @@ static void world_panel_amb_occ(World *wrld)
uiDefButF(block, NUM, B_REDR, "Dist:", 10, 95, 150, 19, &wrld->aodist, 0.001, 5000.0, 100, 0, "Sets length of AO rays, defines how far away other faces give occlusion effect");
uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, WO_AODIST, B_REDR, "Use Distances", 10, 70, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, distances to objects will be used to attenuate shadows");
+ uiDefButBitS(block, TOG, WO_AODIST, B_AO_DISTANCES, "Use Distances", 10, 70, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, distances to objects will be used to attenuate shadows. Only for Plain AO.");
/* distance attenuation factor */
if (wrld->aomode & WO_AODIST)
uiDefButF(block, NUM, B_REDR, "DistF:", 160, 70, 150, 19, &wrld->aodistfac, 0.00001, 10.0, 100, 0, "Distance factor, the higher, the 'shorter' the shadows");