Locking bone to another bone should now hide angle and position locks in adv bone select options, added reset gizmo offset option to adv bone select options for quicker workflow when setting offset is needed

This commit is contained in:
penolakushari 2024-10-02 22:53:17 +03:00
parent 874edb41a6
commit 0aec46bbb0
4 changed files with 21 additions and 6 deletions

View File

@ -1232,7 +1232,8 @@ local FeaturesNPhys = {
{ 9, (language.GetPhrase("tool.ragdollmover.scalezero") .. " " .. language.GetPhrase("tool.ragdollmover.bone")), 2 }, -- 9
{ 10, (language.GetPhrase("tool.ragdollmover.scalezero") .. " " .. language.GetPhrase("tool.ragdollmover.bonechildren")), 2 }, -- 10
{ 15, { "#tool.ragdollmover.unlockscale", "#tool.ragdollmover.lockscale" }, 3 }, --15
{ 17, "#tool.ragdollmover.putgizmopos", 4 } -- 17
{ 17, "#tool.ragdollmover.putgizmopos", 4 }, -- 17
{ 18, "#tool.ragdollmover.resetoffset", 4 } -- 18
}
local FeaturesPhys = {
@ -1249,7 +1250,8 @@ local FeaturesPhys = {
{ 14, "#tool.ragdollmover.lockbone", 3 }, -- 14
{ 11, "#tool.ragdollmover.unlockbone", 3 }, -- 11
{ 16, "#tool.ragdollmover.freezebone", 4 }, -- 16
{ 17, "#tool.ragdollmover.putgizmopos", 4 } -- 17
{ 17, "#tool.ragdollmover.putgizmopos", 4 }, -- 17
{ 18, "#tool.ragdollmover.resetoffset", 4 } -- 18
}
function AdvBoneSelectRadialRender(ent, bones, bonenodes, isresetmode)
@ -1338,13 +1340,22 @@ function AdvBoneSelectRadialRender(ent, bones, bonenodes, isresetmode)
surface.DrawPoly(circ)
local boneoptions = btype == 1 and FeaturesPhys or FeaturesNPhys
local count = btype == 1 and 14 or 12
local count = #boneoptions
if btype == 1 then
if not bonenodes[ent][bone].bonelock then
count = count - 1
else
count = count - 2
end
end
local angborder = (360 / count) / 2
local k = 1
local skipped = 0
for i, option in pairs(boneoptions) do
local id = option[1]
if id == 11 and not bonenodes[ent][bone].bonelock then continue end
if ( id == 11 and not bonenodes[ent][bone].bonelock ) or ( (id == 12 or id == 13) and bonenodes[ent][bone].bonelock ) then continue end
local name = option[2]
if not isstring(option) then

View File

@ -3408,6 +3408,10 @@ local NodeFunctions = {
net.WriteUInt(15, 5)
net.WriteVector(pos)
net.SendToServer()
end,
function() -- 18 nodeResetGizmo
RGMResetGizmo()
end
}

View File

@ -28,7 +28,7 @@ tool.ragdollmover.gizmorelativerotate=Rotate relative to gizmo
tool.ragdollmover.xoffset=X Offset
tool.ragdollmover.yoffset=Y Offset
tool.ragdollmover.zoffset=Z Offset
tool.ragdollmover.resetoffset=Reset offset
tool.ragdollmover.resetoffset=Reset Gizmo offset
tool.ragdollmover.setoffset=Set offset with toolgun
tool.ragdollmover.ikpanel=IK Chains

View File

@ -28,7 +28,7 @@ tool.ragdollmover.gizmorelativerotate=Вращение относительно
tool.ragdollmover.xoffset=Смещение по X
tool.ragdollmover.yoffset=Смещение по Y
tool.ragdollmover.zoffset=Смещение по Z
tool.ragdollmover.resetoffset=Сбросить смещение
tool.ragdollmover.resetoffset=Сбросить смещение Гизмо
tool.ragdollmover.setoffset=Установить смещение при помощи тулгана
tool.ragdollmover.ikpanel=Инверсивная кинематика