Magical Binds Requests and Workflow Stuff

So over the years I’ve accumulated a handful of binds that improved my workflow by miles. I figured I shouldn’t be keeping them to myself, so I’m listing all of them here (for use until someone might decided to make a more finalized addon because I cba)

**Basic Binds - **Nothing I came up with, just stuff I found useful:

**mat_fullbright toggle
**


bind x "incrementvar mat_fullbright 0 1 1"

Draw light frustums toggle


bind x "incrementvar r_flashlightdrawfrustum 0 1 1"

Maximize view distance / set to low toggle


bind x "incrementvar r_farz 10000 5000000 4990000"

**Toggle effect rings
**


bind x "incrementvar cl_draweffectrings 0 1 1"

**Custom Binds **- Things I wrote in Lua:

Freeze everything


bind x "lua_run for k, v in pairs(ents.GetAll()) do if IsValid(v:GetPhysicsObject()) then v:GetPhysicsObject():EnableMotion(false) end end"

**No collide everything, set to minimal weight for easy Physgunning
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do if IsValid(v:GetPhysicsObject()) then v:GetPhysicsObject():SetMass(1) end v:SetCollisionGroup(2) end"

**Re collide everything, set to 500 weight to revert
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do if IsValid(v:GetPhysicsObject()) then v:GetPhysicsObject():SetMass(500) end v:SetCollisionGroup(0) end"

**Move everything by an offset (visual effect positions are fixed after saving and loading), change the 0’s to your liking
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do p=v:GetPos() v:SetPos(Vector(p.x+0, p.y+0, p.z+0)) end"

**Wake all entities - use this to fix props staying in fullbright after mat_fullbright is disabled
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do if IsValid(v:GetPhysicsObject()) then v:GetPhysicsObject():Wake() end end"

**Set all entities to persistent - use before spawning a new prop you want to mess with to ensure you dont fuck up things you’ve already posed
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do v:SetPersistent(true) end"

**Set all entities to non-persistent
**


bind x "lua_run for k, v in pairs(ents.GetAll()) do v:SetPersistent(false) end"

Delete all entities of the same model you’re pointing at


bind x "lua_run e=Entity(1):GetEyeTrace().Entity if e.AttachedEntity then e=e.AttachedEntity end m=e:GetModel() for k, v in pairs(ents.FindByModel(m)) do v:Remove() end"

To use these, simply copy the codes into the console, and change the ‘x’ key to whatever key you want to run the command.

***I am also taking requests ***for simple scripts (code you can fit in the console), so if you have an idea for anything else that might be useful, let me know and I’ll update the OP

You can toggle cvars with the toggle console command. For example


bind x "toggle sv_cheats"

Wonderful.
Another one i can think of is to make all props/effects currently in the map Persistent.

So i can scenebuild, save, make them all persistant at the same time and pose what i’d like to pose without accidentily sending a car 500m in the distance.

Got them down in the last two, however I’m not sure if they save properly (although shouldn’t matter because now its just a single key press worth of work)

Interesting to see some of those. The farz one in particular is interesting - do you just use it to increase FPS or is there another reason?

Shameless plug: Vioxtar uses my effect highlighter to identify his effects before he grabs or toolguns them. This is workflow related so I figured it belongs here. You cannot handle multiple effects without it.

I also want to mention that I am also taking requests/suggestions for scripts and addons for the workshop.

Woops! Thanks anyway : )

Added this:

Delete all entities of the same model you’re pointing at


bind x "lua_run m=Entity(1):GetEyeTrace().Entity:GetModel() for k, v in pairs(ents.FindByModel(m)) do v:Remove() end"