Skip to content

Commit a161202

Browse files
committed
v, shift+v to cycle through brush filters; ctrl+v to reset to all
brushes.
1 parent 0dd90c7 commit a161202

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed

Common/Cmds/FilterNext.cmd

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
; Cycle to the next filter mode (or start with mode 0 if none set yet)
2+
ifdef FM5 unset FM5
3+
ifdef FM4 set FM5 1
4+
ifdef FM4 unset FM4
5+
ifdef FM3 set FM4 1
6+
ifdef FM3 unset FM3
7+
ifdef FM2 set FM3 1
8+
ifdef FM2 unset FM2
9+
ifdef FM1 set FM2 1
10+
ifdef FM1 unset FM1
11+
ifdef FM0 set FM1 1
12+
ifdef FM0 unset FM0
13+
ifndef FM0 ifndef FM1 ifndef FM2 ifndef FM3 ifndef FM4 ifndef FM5 set FM0 1
14+
15+
; Apply the current filter mode
16+
ifdef FM0 mprint Filter 0: Terrain and Object brushes (Ctrl+V to reset)
17+
ifdef FM0 brush_filter 3216
18+
ifdef FM1 mprint Filter 1: Area brushes (Ctrl+V to reset)
19+
ifdef FM1 brush_filter 3136
20+
ifdef FM2 mprint Filter 2: Terrain brushes (Ctrl+V to reset)
21+
ifdef FM2 brush_filter 3088
22+
ifdef FM3 mprint Filter 3: Object brushes (Ctrl+V to reset)
23+
ifdef FM3 brush_filter 3200
24+
ifdef FM4 mprint Filter 4: Flow brushes (Ctrl+V to reset)
25+
ifdef FM4 brush_filter 3328
26+
ifdef FM5 mprint Filter 5: Room brushes (Ctrl+V to reset)
27+
ifdef FM5 brush_filter 3584

Common/Cmds/FilterNone.cmd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mprint Filter: All brushes
2+
brush_filter 4080
3+
unset FM0
4+
unset FM1
5+
unset FM2
6+
unset FM3
7+
unset FM4
8+
unset FM5

Common/Cmds/FilterPrev.cmd

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
; Cycle to the previous filter mode (or start with mode 5 if none set yet)
2+
ifdef FM0 unset FM0
3+
ifdef FM1 set FM0 1
4+
ifdef FM1 unset FM1
5+
ifdef FM2 set FM1 1
6+
ifdef FM2 unset FM2
7+
ifdef FM3 set FM2 1
8+
ifdef FM3 unset FM3
9+
ifdef FM4 set FM3 1
10+
ifdef FM4 unset FM4
11+
ifdef FM5 set FM4 1
12+
ifdef FM5 unset FM5
13+
ifndef FM0 ifndef FM1 ifndef FM2 ifndef FM3 ifndef FM4 ifndef FM5 set FM5 1
14+
15+
; Apply the current filter mode
16+
ifdef FM0 mprint Filter 0: Terrain and Object brushes (Ctrl+V to reset)
17+
ifdef FM0 brush_filter 3216
18+
ifdef FM1 mprint Filter 1: Area brushes (Ctrl+V to reset)
19+
ifdef FM1 brush_filter 3136
20+
ifdef FM2 mprint Filter 2: Terrain brushes (Ctrl+V to reset)
21+
ifdef FM2 brush_filter 3088
22+
ifdef FM3 mprint Filter 3: Object brushes (Ctrl+V to reset)
23+
ifdef FM3 brush_filter 3200
24+
ifdef FM4 mprint Filter 4: Flow brushes (Ctrl+V to reset)
25+
ifdef FM4 brush_filter 3328
26+
ifdef FM5 mprint Filter 5: Room brushes (Ctrl+V to reset)
27+
ifdef FM5 brush_filter 3584

Common/DEFAULT.BND

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ edit bind s "cam_slew 3" ; backward
4141
edit bind t "run .\cmds\SetTexture.cmd" ; Set brush textures.
4242
;game bind u "unstick_player" ; unsticks the player, Newdark Only
4343
;edit bind v "cam_rotate 1" ; look down
44+
edit bind v "run .\cmds\FilterNext.cmd" ; next brush type filter
4445
edit bind w "cam_slew 0" ; forward
4546
;edit bind x "cam_level" ; reset camera pitch, olddark
4647
edit bind x "cam_reset" ; reset camera pitch and slew,, newdark only
@@ -127,6 +128,7 @@ game bind q+shift "+fly 1" ; fly up
127128
edit bind t+shift "run .\cmds\ResetTexture.cmd" ; Set default texture.
128129
;edit bind t+shift "cycle_tex -1" ; cycle texture backward
129130
edit bind u+shift "go_to_meonly" ; select meonly area brush
131+
edit bind v+shift "run .\cmds\FilterPrev.cmd" ; previous brush type filter
130132
edit bind w+shift "align_object" ; align selected object to surface relative to cam
131133
;edit bind w+shift "wall_object" ; move selected object to wall
132134
edit bind y+shift "run .\cmds\RetimeBrush.cmd" ; prompt to retime the selected brush, texture it, and reportalize
@@ -223,6 +225,7 @@ edit bind s+ctrl save_mission ; save the mission
223225
edit bind q+ctrl qlink_add ; add to quicklink group
224226
edit bind r+ctrl "Run .\cmds\DoLight.cmd" ; relight the level
225227
edit bind u+ctrl undo ; move back in history
228+
edit bind v+ctrl "run .\cmds\FilterNone.cmd" ; reset brush type filter
226229
;edit bind w+ctrl "cycle_group 0" ; select last stored group (buggy)
227230
;edit bind x+ctrl xmouse ; toggle auto-camera selection
228231
edit bind z+ctrl undo ; windows compatible, eh?

0 commit comments

Comments
 (0)