Camera Tool idea (For stop motion)

Didn’t use the request icon as I don’t need it to be made, just an idea for someone who wants to make a supposedly easy tool that’ll probably get some downloads.

Target demographic: Gmod filmmakers

Tool: A slightly modded camera tool that overlays the last screenshot taken (For stop motion-purposes). That’s pretty much it. Doesn’t necessarily have to take screenshots itself, just has to be bindable to whatever key one is using to take screenshots with Fraps etc. Clears overlay with the reload key.

This code is crap but it works:



local alpha = 150

hook.Add( "DrawOverlay", "OnionSkin", function()
	local pics = file.Find( "screenshots/*", "GAME", "dateasc" )
	surface.SetDrawColor( 255, 255, 255, alpha )
	local mat = Material( "../screenshots/" .. pics[ #pics ] )
	if mat:IsError() then
		surface.SetMaterial( Material( "../screenshots/" .. pics[ #pics - 1 ] ) )
	else
		surface.SetMaterial( mat )
	end
	surface.DrawTexturedRect( 0, 0, ScrW(), ScrH() )
end )


Just use the default Garry’s Mod camera and fire away

If you want the reload key to toggle it:



hook.Add( "KeyPress", "ToggleOnionSkin", function( _, key )
	if key == IN_RELOAD then
		alpha = alpha == 150 and 0 or 150
	end
end )


[editline]6th September 2017[/editline]

This addon already seems to have an ‘onion skin’ feature, which is what you’re describing