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.
This commit is contained in:
Ton Roosendaal
2006-06-30 19:29:57 +00:00
parent 08921033e5
commit 2c3f80477d
2 changed files with 9 additions and 2 deletions

View File

@@ -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

View File

@@ -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");