-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************
ScriptName = "AM_SelectBonelayer"
-- **************************************************
-- General information about this script
-- **************************************************
AM_SelectBonelayer = {}
function AM_SelectBonelayer:Name()
return 'Select Bonelayer'
end
function AM_SelectBonelayer:Version()
return '1.4'
end
function AM_SelectBonelayer:UILabel()
return 'Select Bonelayer'
end
function AM_SelectBonelayer:Creator()
return 'Aleksei Maletin'
end
function AM_SelectBonelayer:Description()
return 'Select Bonelayer'
end
-- **************************************************
-- Is Relevant / Is Enabled
-- **************************************************
function AM_SelectBonelayer:IsRelevant(moho)
local hasParent = moho.layer:Parent()
if hasParent then
return true
end
return false
end
function AM_SelectBonelayer:IsEnabled(moho)
if moho.layer:LayerType() ~= MOHO.LT_BONE then
return true
end
end
-- **************************************************
-- The guts of this script
-- **************************************************
function AM_SelectBonelayer:Run(moho)
local layerToSearchForBoneParent = moho.layer
local layerParentBone = layerToSearchForBoneParent:ControllingBoneLayer()
if layerParentBone then
moho:SetSelLayer(layerParentBone)
else
repeat
local parent = layerToSearchForBoneParent:Parent()
if parent then
if parent:LayerType() == MOHO.LT_BONE then
moho:SetSelLayer(parent)
moho:ShowLayerInLayersPalette(parent)
break
else
layerToSearchForBoneParent = parent
end
end
until not parent
end
end
this is a plugin that allows to use shortcut to select bone layer https://mohoscripts.com/script/am_select_bonelayer. Just want to know if anyone knows how to modify that allows the same function to select "transform bone" tool at the same time.
You can modify this file: C:\Program Files\Moho 14\Resources\Support\Scripts\Tool\_tool_list.txt
Adjust the order of lm_transform-bone to the first position to achieve it.
Change it to this:
Interesting approach, but I don't think that will consistently choose the Transform Bone tool. It will depend on what tool you are in previously (i.e. Transform Layer etc. will affect this).
You should not need to edit _tool_list. If you need to change the order of Tools, you can do so via Preferences:
Also .. an alternate approach to this would be changing to the bone group, when you select the Bone tool. i.e. mod the tool to also select the bone layer. This approach was recently discussed/implemented for the Mr Pose tool: viewtopic.php?p=219548#p219548 (though it may currently have some drawbacks)
Moho 14.3 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.3 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam