I wrote it cause I forgot so many times to switch it on or off when launching renders prepasses.
Here is how to set it up (only takes 1 or 2 min) :
first create a coffee tag on whatever object and copy paste this (between the stars) :
**************************************************
main(doc,op)
{
var LCMAP_PREPASS_NAME = "CAM_LCMAP"; // Replace here CAM_LCMAP by your default Light cache prepass name
var RD = doc->GetFirstRenderData();
do
{
if (RD->GetName()==LCMAP_PREPASS_NAME)
{
var LCMAP=RD;
if (LCMAP->GetBit(BIT_ARDATA)==1)
{
var tg = op->GetFirstTag();
while (tg)
{
if(tg->GetType()==1020898)
{
tg#VRAYPHYSICALCAMERATAG_MBLURON=TRUE;
break;
}
tg=tg->GetNext();
}
}
else
{
var tg = op->GetFirstTag();
while (tg)
{
if(tg->GetType()==1020898)
{
tg#VRAYPHYSICALCAMERATAG_MBLURON=FALSE;
break;
}
tg=tg->GetNext();
}
}
}
RD=RD->GetNext();
}
while(RD);
}
************************************************** *****Now just replace at line 3 :
CAM_LCMAP by your default LC prepass rendersetting name (you probably have one, or if you don't, try to use this name for LC prepasses).
It's done, now simply save the C.O.F.F.E.E tag you just set up in your presets, and apply it to any physical camera to get it work !
When the render setting CAM_LCMAP (or the name you just gave) is activated, Mblur is activated too. As soon as another render setting is activated it is disabled.
May sound like a stupid idea, but I forgot it so many times... now I'm quiet until it is fixed !
M!ke
No comments:
Post a Comment