add command and keybind for tag clips
edittagclip type Sets tag clip type of all selected cubes. type can be numeric 0, 64 or 128 or keyword "none", "clip", or "plclip" DOCREF edittagclip
This commit is contained in:
@@ -573,10 +573,15 @@ menuitemeditkeyinput [Redo: ] redo
|
||||
menuitem "" -1
|
||||
menuitemeditkeyinput [Pin/unpin closest entity: ] toggleclosestentpin
|
||||
menuitemeditkeyinput [Delete entity: ] editkey_delete_entity
|
||||
menuitemeditkeyinput [Show tag clip volume: ] showtagclipfocus
|
||||
menuitemeditkeyinput [Copy entity: ] copyent
|
||||
menuitemeditkeyinput [Paste entity: ] pasteent
|
||||
menuitemeditkeyinput [Edit entity: ] editent
|
||||
menuitem "" -1
|
||||
menuitem "\f2Tag clips:" -1
|
||||
menuitemeditkeyinput [Show tag clip volume: ] showtagclipfocus
|
||||
menuitemeditkeyinput [Remove tag clip: ] editkey_tagclip_none
|
||||
menuitemeditkeyinput [Create tag 'playerclip': ] editkey_tagclip_plclip
|
||||
menuitemeditkeyinput [Create tag 'clip': ] editkey_tagclip_clip
|
||||
|
||||
// deleted entities
|
||||
newmenu "deleted entities"
|
||||
|
||||
@@ -60,6 +60,9 @@ alias editkey_ceiltex_up [ edittex 2 1 ]
|
||||
alias editkey_ceiltex_dn [ edittex 2 -1 ]
|
||||
alias editkey_uppertex_up [ edittex 3 1 ]
|
||||
alias editkey_uppertex_dn [ edittex 3 -1 ]
|
||||
alias editkey_tagclip_none [ edittagclip none ]
|
||||
alias editkey_tagclip_plclip [ edittagclip plclip ]
|
||||
alias editkey_tagclip_clip [ edittagclip clip ]
|
||||
|
||||
_defaultbinds 1 // do not save the following binds to saved.cfg
|
||||
|
||||
@@ -181,8 +184,11 @@ bind DELETE []
|
||||
editbind DELETE editkey_floortex_dn
|
||||
bind KP0 []
|
||||
bind KP1 []
|
||||
editbind KP1 editkey_tagclip_none
|
||||
bind KP2 []
|
||||
editbind KP2 editkey_tagclip_plclip
|
||||
bind KP3 []
|
||||
editbind KP3 editkey_tagclip_clip
|
||||
bind KP4 []
|
||||
editbind KP4 editkey_uppertex_dn
|
||||
bind KP5 []
|
||||
|
||||
@@ -85,6 +85,7 @@ looplist [
|
||||
edittexturestack texturestacktypes
|
||||
] [ cmd options ] [ listcomplete $cmd (listoptions $options)
|
||||
]
|
||||
listcomplete edittagclip "none plclip clip"
|
||||
listcomplete getvarrange "min max default"
|
||||
listcomplete mapareacheck "vdelta steepest total pprest pp"
|
||||
listcomplete authsetup "pre priv pub ppass pass passd needpass genpre genpriv genpub newppass newpass unarmed"
|
||||
|
||||
@@ -976,6 +976,17 @@ void edittag(int *tag)
|
||||
}
|
||||
COMMAND(edittag, "i");
|
||||
|
||||
void edittagclip(char *tag)
|
||||
{
|
||||
int nt = ((int) strtol(tag, NULL, 0)) & TAGANYCLIP;
|
||||
if(tolower(*tag) == 'n') nt = 0; // "none", "nil, "nop"
|
||||
else if(!strncasecmp(tag, "pl", 2)) nt = TAGPLCLIP; // "playerclip", "plclip", "pl"
|
||||
else if(isalpha(*tag)) nt = TAGCLIP; // "clip", "all", "full", "hippo"
|
||||
EDITSELMP;
|
||||
loopselsxy(s->tag = (s->tag & TAGTRIGGERMASK) | nt);
|
||||
}
|
||||
COMMAND(edittagclip, "s");
|
||||
|
||||
void newent(char *what, float *a1, float *a2, float *a3, float *a4)
|
||||
{
|
||||
EDITSEL;
|
||||
|
||||
Reference in New Issue
Block a user