macroScript Macro2 category:"DW Tools" toolTip:"VRay Render Mask Maker" ( --written by Dave Wortley December 2014 --Plenty of code borrowed from other places, I appologise I've lost where I got them all from, please feel free to contact me if you want credit!! --version 1.0 --version 1.2 --Added Add Selected Button --Creative Commons, feel free to hack, adjust all you like, but if you find bugs message me and I'll attempt to fix. --http://davewortley.wordpress.com/ global RL_VRayRenderMasker global theRenderBitmap try(destroyDialog RL_VRayRenderMasker)catch() local isDrawing = false local theCanvasBitmap local theViewportBitmap = gw.getviewportDIB() local originalBitmap local currentPos = lastPos = [0,0] rollout RL_VRayRenderMasker "VRay Render Mask Maker 1.2 - Written by Dave Wortley" width:840 height:540 ( button btn_renderMask "Render Mask" width:90 across:9 tooltip:"View Render Mask" button btn_getrenderImage "Last Rendered" width:90 tooltip:"Get Last Rendered Image from Vray VFB" button btn_getViewportImage "Viewport Image" width:90 tooltip:"Get Active Viewport Image" button btn_getFromFile "From File" width:90 tooltip:"Get From a File" button btn_LoadMask "Load Mask" width:90 tooltip: "Load Mask from VRay Render Mask Texture" button btn_clearMask "Clear Mask" width:90 tooltip:"Clear Masks" button btn_saveRenderMask "Save Mask" width:90 tooltip:"Save Render Mask" button btn_updateRenderMask "Update Mask" width:90 tooltip:"Overwrites the current VRay Render Mask Image with new version" button btn_turnOffRenderMask "Turn Off" width:90 tooltip:"Turn off VRay Render Mask" bitmap theCanvas width:800 height:450 button btn_Render "Quick Render" across:7 width:100 offset:[-15,0] dropdownlist ddl_renderElement "" width:200 offset:[-20,0] dropdownlist ddl_channel "" items:#("Red","Green","Blue") width:60 offset:[65,0] button btn_addTo "Add to Mask" width:100 tooltip:"Add Render Elements Channel information to Mask (useful for MultiMatte Masks)" offset:[5,0] button btn_addSelected "Add Selected Objs" width:100 offset:[15,-3] tooltip:"Add the Selected objects from the viewport to the mask" button btn_expand "Expand Mask" width:100 tooltip:"Expand Render Mask by one pixel" offset:[25,0] button btn_hideMask "Hide Mask" width:100 tooltip:"Hide Render Mask from Preview (Click in preview to turn back on)" offset:[10,0] label lbl_about "Written By Dave Wortley" across:3 hyperlink hyp_A "www.facebook.com/MaxMadeEasy" address:"https://www.facebook.com/maxmadeeasy" hyperlink hyp_B "davewortley.wordpress.com" address:"http://davewortley.wordpress.com" local ishidden = false fn paintBrush pos = ( setPixels theCanvasBitmap pos #(red) setPixels theRenderBitmap pos #(white) ) fn drawStroke lastPos pos = ( currentPos = lastPos deltaX = pos.x - lastPos.x deltaY = pos.y - lastPos.y maxSteps = amax #(abs(deltaX),abs(deltaY)) deltaStepX = deltaX / maxSteps deltaStepY = deltaY / maxSteps for i = 0 to maxSteps do ( for b = -BrushSize.value/2 to BrushSize.value/2 do for c = -BrushSize.value/2 to BrushSize.value/2 do paintBrush (currentPos + [c,b]) currentPos += [deltaStepX, deltaStepY] ) theCanvas.bitmap = theCanvasBitmap ) fn paintBox topLeft bottomRight = ( if topleft != bottomRight do ( d1 = 1 d2 = 1 if topleft.x > bottomRight.x do d1 = -1 if topleft.y > bottomRight.y do d2 = -1 for j = topLeft.y to bottomRight.y by d2 do for i = topLeft.x to bottomRight.x by d1 do ( setPixels theCanvasBitmap [i,j] #(red) setPixels theRenderBitmap [i,j] #(white) ) theCanvas.bitmap = theCanvasBitmap ) ) fn getViewportSelectionAsMask = ( --STORE ORIGINAL SETTINGS --viewport shading mode oldviewportMode = viewport.GetRenderLevel() --background solid mode ?? oldSolidMode = viewport.IsSolidBackgroundColorMode() --background oldbgcolor = GetUIColor 41 --background image on/off oldDispBackground = viewport.DispBkgImage --environment color --oldEnvColor = backgroundColor --environment map --oldEnvMap = environmentMap --viewportshadows nitrousVP = NitrousGraphicsManager.GetActiveViewportSetting() oldShadows = nitrousVP.ShadowsEnabled --viewport grid oldGrid = viewport.getGridVisibility viewport.activeviewport --viewport wireframe mode oldDispwireframe = displayColor.wireframe --viewport shaded mode oldDispshaded = displayColor.shaded --2016highlightmode on/off --wirecolours originalcolours = #() for i = 1 to objects.count do ( append originalcolours objects[i].wirecolor ) --selection oldSel = (selection as array) --APPLY MASK SETTINGS --set background to environment viewport.EnableSolidBackgroundColorMode true SetUIColor 41 (color 0 0 0) colorMan.repaintUI #repaintAll --set environment colour to black --backgroundColor = black --turn off map --environmentMap = undefined --set to by object color displayColor.wireframe = #object displayColor.shaded = #object --setEnvBgStr.useEnvBG on viewport.setGridVisibility viewport.activeviewport false viewport.DispBkgImage = false --viewport.EnableSolidBackgroundColorMode true viewport.SetRenderLevel #flat --shadows off nitrousVP.ShadowsEnabled = false for o in objects where not o.isselected do o.wirecolor = black for o in selection do o.wirecolor = white max select none completeredraw() viewportMaskDIBImage = gw.getviewportDIB() --display viewportMaskDIBImage --RESTORE ORIGINAL PROPERTIES --WireColors for i = 1 to objects.count do ( objects[i].wirecolor = originalcolours[i] ) --selection select oldSel --viewport shading mode viewport.SetRenderLevel oldviewportMode --background image on/off viewport.DispBkgImage = oldDispBackground --background solid mode ?? viewport.EnableSolidBackgroundColorMode oldSolidMode --setEnvBgStr.useEnvBG off --background SetUIColor 41 oldbgcolor colorMan.repaintUI #repaintAll --environment color --backgroundColor = oldEnvColor --environment map --environmentMap = oldEnvMap --shadows nitrousVP.ShadowsEnabled = OldShadows --viewport grid viewport.setGridVisibility viewport.activeviewport oldGrid --viewport wireframe mode displayColor.wireframe = oldDispwireframe --viewport shaded mode displayColor.shaded = oldDispShaded --wireframe on/off completeredraw() maskBitmap = viewportMaskDIBImage --theCanvas.bitmap = theCanvasBitmap --theCanvas.width = viewportImage.width --theCanvas.height = viewportImage.height --RL_VRayRenderMasker.width = theCanvas.width + 10 --RL_VRayRenderMasker.Height = theCanvas.height + 10 imageAspect = 1.0 * RenderWidth / RenderHeight local render_Width = RenderWidth local render_Height = RenderHeight if not renderers.current.output_getsetsfrommax do ( imageAspect = 1.0 * renderers.current.output_width / renderers.current.output_height render_width = renderers.current.output_width render_height = renderers.current.output_height ) trimHeight = maskBitmap.height trimWidth = maskBitmap.width --If height is over 450, scale down to 450 high canvasAspect = 1.0 * maskBitmap.width / maskBitmap.height if imageaspect > canvasAspect then ( --Trim Top and bottom off trimHeight = 1.0 * maskBitmap.width / render_width * render_height vbox = box2 0 ((maskBitmap.height / 2) - (trimheight / 2)) maskBitmap.width trimHeight ) else ( --trim sides off trimWidth = 1.0 * maskBitmap.Height / render_height * render_width vbox = box2 ((maskBitmap.Width / 2) - (trimWidth / 2)) 0 trimWidth maskBitmap.height ) --print vbox trimmedViewport = bitmap trimWidth trimHeight --display maskBitmap --display trimmedViewport tempbmp = bitmap maskBitmap.width maskBitmap.height pastebitmap maskBitmap trimmedViewport vbox [0,0] tempbmp = trimmedViewport local scaleHeight = tempbmp.height local scaleWidth = tempbmp.width if tempbmp.height > 450 do ( scaleheight = 450 scaleWidth = (1.0 * 450 / tempbmp.height) * tempbmp.width ) --if width is over 800 scale down to 800 if scaleWidth > 800 do ( scaleHeight = (1.0 * 800 / scaleWidth) * scaleHeight scaleWidth = 800 ) scaledViewportBitmap = bitmap scaleWidth scaleHeight copy tempbmp scaledViewportBitmap tempbmp = scaledViewportBitmap --display viewportMaskDIBImage tempbmp ) fn setViewportImage = ( --viewportImage = viewport.getviewportDIB() theCanvasBitmap = theViewportBitmap --theCanvas.bitmap = theCanvasBitmap --theCanvas.width = viewportImage.width --theCanvas.height = viewportImage.height --RL_VRayRenderMasker.width = theCanvas.width + 10 --RL_VRayRenderMasker.Height = theCanvas.height + 10 imageAspect = 1.0 * RenderWidth / RenderHeight local render_Width = RenderWidth local render_Height = RenderHeight if not renderers.current.output_getsetsfrommax do ( imageAspect = 1.0 * renderers.current.output_width / renderers.current.output_height render_width = renderers.current.output_width render_height = renderers.current.output_height ) trimHeight = theCanvasBitmap.height trimWidth = theCanvasBitmap.width --If height is over 450, scale down to 450 high canvasAspect = 1.0 * theCanvasBitmap.width / theCanvasBitmap.height if imageaspect > canvasAspect then ( --Trim Top and bottom off trimHeight = 1.0 * theCanvasBitmap.width / render_width * render_height vbox = box2 0 ((theCanvasBItmap.height / 2) - (trimheight / 2)) theCanvasBitmap.width trimHeight ) else ( --trim sides off trimWidth = 1.0 * theCanvasBitmap.Height / render_height * render_width vbox = box2 ((theCanvasBitmap.Width / 2) - (trimWidth / 2)) 0 trimWidth theCanvasBitmap.height ) --print vbox trimmedViewport = bitmap trimWidth trimHeight pastebitmap theCanvasBitmap trimmedViewport vbox [0,0] theCanvasBitmap = trimmedViewport local scaleHeight = theCanvasBitmap.height local scaleWidth = theCanvasBItmap.width if theCanvasBitmap.height > 450 do ( scaleheight = 450 scaleWidth = (1.0 * 450 / theCanvasBitmap.height) * theCanvasBitmap.width ) --if width is over 800 scale down to 800 if scaleWidth > 800 do ( scaleHeight = (1.0 * 800 / scaleWidth) * scaleHeight scaleWidth = 800 ) scaledViewportBitmap = bitmap scaleWidth scaleHeight copy theCanvasBitmap scaledViewportBitmap theCanvasBitmap = scaledViewportBitmap theCanvas.width = scaleWidth theCanvas.height = scaleHeight theCanvas.bitmap = theCanvasBitmap theCanvas.pos.x = (840 - theCanvas.width) / 2 RL_VRayRenderMasker.height = theCanvas.height + 90 btn_Render.pos.y = theCanvas.height + 40 ddl_renderElement.pos.y = theCanvas.height + 40 ddl_channel.pos.y = theCanvas.height + 40 btn_addTo.pos.y = theCanvas.height + 40 btn_expand.pos.y = theCanvas.height + 40 btn_hideMask.pos.y = theCanvas.height + 40 originalBitmap = copy theCanvasBitmap ) fn compfn c1 p1 c2 p2 = ( res = c2 case ddl_channel.selection of ( 1: ( if c1.r > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 0 res.b = 0 res --then we return the resulting color value ) res ) 2: ( if c1.g > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 0 res.b = 0 res --then we return the resulting color value ) res ) 3: ( if c1.b > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 0 res.b = 0 res --then we return the resulting color value ) res ) ) ) fn compfnwhite c1 p1 c2 p2 = ( res = c2 if c1.r > 250 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 0 res.b = 0 res --then we return the resulting color value ) res ) fn compfnMask c1 p1 c2 p2 = ( res = c2 case ddl_channel.selection of ( 1: ( if c1.r > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 255 res.b = 255 res --then we return the resulting color value ) res ) 2: ( if c1.g > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 255 res.b = 255 res --then we return the resulting color value ) res ) 3: ( if c1.b > 0 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 255 res.b = 255 res --then we return the resulting color value ) res ) ) ) fn compfnMaskWhite c1 p1 c2 p2 = ( res = c2 if c1.r > 250 do ( res = c2 --the result will contain the G and B of b2 res.r = 255 --but the R from b1 res.g = 255 res.b = 255 res --then we return the resulting color value ) res ) on RL_VRayRenderMasker open do ( setViewportImage() if theRenderBitmap == undefined do global theRenderBitmap = bitmap theCanvas.width theCanvas.height color:black refreshRenderMaskSize = bitmap theCanvas.width theCanvas.height color:black copy theRenderBitmap refreshRenderMaskSize theRenderBitmap = refreshRenderMaskSize free refreshRenderMask pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() aElementNames = #() re = maxOps.GetCurRenderElementMgr() for i = 1 to re.numrenderelements() do ( append aElementNames (re.getrenderelement (i - 1)).elementName ) ddl_renderElement.items = aElementNames ) on RL_VRayRenderMasker lbuttondown pos do ( lastPos = (pos - theCanvas.pos) isDrawing = true --drawStroke lastPos pos ) on RL_VRayRenderMasker lbuttonup pos do ( if isDrawing do paintBox lastPos (pos - theCanvas.pos) isDrawing = false ) on RL_VRayRenderMasker mousemove pos do ( --if isDrawing do drawStroke lastPos (pos - theCanvas.pos) --lastPos = (pos - theCanvas.pos) ) on btn_renderMask pressed do ( display theRenderBitmap ) on btn_saveRenderMask pressed do ( a = (selectSaveBitMap caption:"Save VRay Render Mask") if a != undefined do ( if doesfileexist a do deletefile a theRenderBitmap.filename = a save theRenderBitmap if Querybox "Do you want to set this image as your VRay Render Mask?" do ( renderers.current.imageSampler_renderMask_type = 1 renderers.current.imageSampler_renderMask_texmap = bitmaptexture filename:a ) ) ) on btn_getRenderImage pressed do ( renderBitmap = (vrayVFBGetChannelBitmap 1) copy renderBitmap theCanvasBitmap originalBitmap = copy theCanvasBitmap pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() ) on btn_getViewportImage pressed do ( oldPos = getDialogPos RL_VRayRenderMasker theViewportBitmap = gw.getviewportDIB() setViewportImage() originalBitmap = copy theCanvasBitmap pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() ) on btn_getFromFile pressed do ( isDrawing = false thefile = getBitmapOpenFileName caption:"Select File to Load into Masker" filename:(getFilenamePath rendoutputfilename) if thefile != undefined do ( fileBmp = openbitmap thefile copy fileBmp theCanvasBitmap free fileBmp pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn originalBitmap = copy theCanvasBitmap theCanvas.bitmap = theCanvasBitmap gc() ) isDrawing = false ) on btn_loadMask pressed do ( if renderers.current.imageSampler_renderMask_texmap != undefined do ( if doesfileexist renderers.current.imageSampler_renderMask_texmap.filename do ( rendermask = openbitmap renderers.current.imageSampler_renderMask_texmap.filename copy renderMask theRenderBitmap theCanvasBitmap = copy originalBitmap pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() ) ) ) on btn_clearMask pressed do ( theCanvasBitmap = copy originalBitmap theRenderBitmap = bitmap theCanvas.width theCanvas.height color:black theCanvas.bitmap = theCanvasBitmap ) on btn_updateRenderMask pressed do ( if renderers.current.imageSampler_renderMask_texmap != undefined and (classof renderers.current.imageSampler_renderMask_texmap == bitmaptexture) then ( renderers.current.imageSampler_renderMask_type = 1 theRenderBitmap.filename = renderers.current.imageSampler_renderMask_texmap.filename deletefile renderers.current.imageSampler_renderMask_texmap.filename save theRenderBitmap ) else ( a = (selectSaveBitMap caption:"Save VRay Render Mask") if a != undefined do ( if doesfileexist a do deletefile a theRenderBitmap.filename = a save theRenderBitmap renderers.current.imageSampler_renderMask_type = 1 renderers.current.imageSampler_renderMask_texmap = bitmaptexture filename:a ) ) ) on btn_turnOffRenderMask pressed do ( renderers.current.imageSampler_renderMask_type = 0 ) on btn_addSelected pressed do ( channelBitmap = getViewportSelectionAsMask() pastebitmap channelBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfnwhite pastebitmap channelBitmap theRenderBitmap [0,0] [0,0] type:#function function:compfnmaskwhite theCanvas.bitmap = theCanvasBitmap free channelbitmap gc() ) on btn_render pressed do ( if Renderscenedialog.isopen() then RenderScenedialog.Commit() vr = renderers.current vr.output_on = true if lights.count == 0 and vr.options_defaultLights == 0 and (getclassinstances VrayLightMtl).count == 0 do ( if Querybox "No Lights in Scene, temporarily enable Default Lights?" do ( vr.options_defaultLights = 1 ) ) --store old settings o_adaptiveamount = vr.dmc_earlyTermination_amount o_noisethreshold = vr.dmc_earlyTermination_threshold o_colorThresh = vr.twoLevel_threshold o_anti_on = vr.filter_on o_minSamples = vr.twoLevel_baseSubdivs o_maxSamples = vr.twoLevel_fineSubdivs o_GI_on = vr.GI_on o_lightcachesamples = vr.lightcache_subdivs o_Bruteforcesamples = vr.dmcgi_subdivs o_irradmap_subdivs = vr.gi_irradmap_subdivs o_irradmap_interpSamples = vr.gi_irradmap_interpSamples o_irradmap_preset = vr.gi_irradmap_preset o_renderwidth = RenderWidth o_renderheight = RenderHeight o_saveon = RendSaveFile o_rendTimeType = rendTimeType o_system_region_x = vr.system_region_x o_system_region_y = vr.system_region_y --vrayVFBSetRegionEnabled --vrayVFBGetRegion() o_VFBRegion = vrayVFBGetRegion() --vrayVFBSetRegion left top right bottom --set new settings vr.dmc_earlyTermination_amount = 1 vr.dmc_earlyTermination_threshold = 0.1 vr.twoLevel_threshold = 0.1 vr.filter_on = true vr.twoLevel_baseSubdivs = 1 vr.twoLevel_fineSubdivs = 4 --vr.GI_on = true vr.lightcache_subdivs = 256 vr.dmcgi_subdivs = 4 vr.gi_irradmap_preset = 1 vr.gi_irradmap_subdivs = 30 vr.gi_irradmap_interpSamples = 20 vr.system_region_x = vr.system_region_y = 24 rendUseNet = false RendSaveFile = false rendTimeType = 1 RenderWidth = theCanvasBitmap.width RenderHeight = theCanvasBitmap.height if Renderscenedialog.isopen() then RenderScenedialog.Update() --vrayVFBSetRegionEnabled --vrayVFBGetRegion() o_VFBRegion = vrayVFBGetRegion() n_VFBRegion = #(1,2,3,4) --vrayVFBSetRegion left top right bottom n_VFBRegion[1] = 1.0 * o_VFBRegion[1] / o_renderwidth * Renderwidth n_VFBRegion[2] = 1.0 * o_VFBRegion[2] / o_renderwidth * Renderwidth n_VFBRegion[3] = 1.0 * o_VFBRegion[3] / o_renderwidth * Renderwidth n_VFBRegion[4] = 1.0 * o_VFBRegion[4] / o_renderwidth * Renderwidth if vrayVFBGetRegionEnabled() do vrayVFBSetRegion n_VFBRegion[1] n_VFBRegion[2] n_VFBRegion[3] n_VFBRegion[4] --Render --actionMan.executeAction 0 "50030" actionMan.executeAction 0 "50031" --Restore Old Settings RenderWidth = o_renderwidth RenderHeight = o_renderHeight rendTimeType = o_rendTimeType vrayVFBSetRegion o_VFBRegion[1] o_VFBRegion[2] o_VFBRegion[3] o_VFBRegion[4] vr.dmc_earlyTermination_amount = o_adaptiveamount vr.dmc_earlyTermination_threshold = o_noisethreshold vr.twoLevel_threshold = o_colorThresh vr.filter_on = o_anti_on vr.twoLevel_baseSubdivs = o_minSamples vr.twoLevel_fineSubdivs = o_maxSamples vr.GI_on = o_GI_on vr.lightcache_subdivs = o_lightcachesamples vr.dmcgi_subdivs = o_Bruteforcesamples vr.gi_irradmap_preset = o_irradmap_preset vr.gi_irradmap_subdivs = o_irradmap_subdivs vr.gi_irradmap_interpSamples = o_irradmap_interpSamples vr.system_region_x = o_system_region_x vr.system_region_y = o_system_region_y RendSaveFile = o_SaveOn if Renderscenedialog.isopen() then RenderScenedialog.Update() renderBitmap = (vrayVFBGetChannelBitmap 1) --pasteBitmap renderBitmap theCanvasbitmap (box2 0 0 renderbitmap.width renderbitmap.height) [0,0] copy renderBitmap theCanvasBitmap originalBitmap = copy theCanvasBitmap pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() ) on btn_addTo pressed do ( channelBitmap = (vrayVFBGetChannelBitmap (ddl_renderElement.selection + 2)) --pasteBitmap renderBitmap theCanvasbitmap (box2 0 0 renderbitmap.width renderbitmap.height) [0,0] resizedbitmap = bitmap theCanvasBitmap.width theCanvasBitmap.height color:black copy channelBitmap resizedBitmap channelBitmap = resizedBitmap --theRenderBitmap = bitmap theCanvas.width theCanvas.height color:black --theCanvas.bitmap = theCanvasBitmap --This is the custom compositing function: --Perform the compositing using the above function: pastebitmap channelBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn pastebitmap channelBitmap theRenderBitmap [0,0] [0,0] type:#function function:compfnmask theCanvas.bitmap = theCanvasBitmap free channelbitmap gc() ) on btn_expand pressed do ( expandedBitmap = bitmap theRenderBitmap.width theRenderBitmap.height color:black for j = 1 to theRenderBitmap.height do ( thepixels = getPixels theRenderBitmap [0,j] theRenderBitmap.width for i = 1 to thepixels.count do ( --setPixels if thePixels[i] != (color 0 0 0) do ( setpixels expandedBitmap [i - 2, j- 1] #(white,white,white) setpixels expandedBitmap [i - 2, j] #(white,white,white) setpixels expandedBitmap [i - 2, j + 1] #(white,white,white) ) ) ) theRenderBitmap = expandedBitmap pastebitmap theRenderBitmap theCanvasBitmap [0,0] [0,0] type:#function function:compfn theCanvas.bitmap = theCanvasBitmap gc() ) on btn_hideMask pressed do ( if ishidden then ( theCanvas.bitmap = theCanvasbitmap ishidden = false ) else ( theCanvas.bitmap = originalBitmap ishidden = true ) ) ) createDialog RL_VRayRenderMasker style:#(#style_titlebar, #style_border, #style_sysmenu, #style_minimizebox) )