File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import './mods/saveProjectActionMod'
4444import './mods/saveProjectAsActionMod'
4545import './mods/variantPreviewCubeFaceMod'
4646import './mods/showDefaultPoseMod'
47+ import './mods/addLocatorActionMod'
4748// Outliner
4849import './outliner/textDisplay'
4950import './outliner/vanillaItemDisplay'
Original file line number Diff line number Diff line change 1+ import { isCurrentFormat } from '../blueprintFormat'
2+ import { PACKAGE } from '../constants'
3+ import { createBlockbenchMod } from '../util/moddingTools'
4+
5+ createBlockbenchMod (
6+ `${ PACKAGE . name } :addLocatorAction` ,
7+ {
8+ action : BarItems . add_locator as Action ,
9+ originalCondition : ( BarItems . add_locator as Action ) . condition ,
10+ } ,
11+ context => {
12+ context . action . condition = ( ) => {
13+ if ( isCurrentFormat ( ) ) return true
14+ return ! ! context . originalCondition ?.( )
15+ }
16+
17+ Toolbars . outliner . add ( context . action , 0 )
18+
19+ return context
20+ } ,
21+ context => {
22+ context . action . condition = context . originalCondition
23+ Toolbars . outliner . remove ( context . action )
24+ }
25+ )
You can’t perform that action at this time.
0 commit comments