getAxisGizmoAlignment
Definition
-- @/=[C]:-1
function getAxisGizmoAlignment(...)
Callers
@/lua/ge/extensions/editor/rallyEditor/pacenotes.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(wp.normal, vec3(0,0,1))
rotation:setFromMatrix(gizmoTransform)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
wp.normal = quat(rotation)*vec3(0,1,0)
@/lua/ge/extensions/editor/sitesEditor/zones.lua
local rotation
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(quatFromEuler(0, math.pi / 2, 0) * self.currentPlane.normal, vec3(0, 0, 1))
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.currentPlane.normal = quat(rotation) * vec3(0, 0, 1)
@/lua/ge/extensions/editor/decalEditor.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local and tableSize(selectedInstances) == 1 then
editor.setAxisGizmoTransform(firstInstance:getWorldMatrix())
-- Rotate the decals
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local and tableSize(selectedInstances) == 1 then
local gizmoTransform = editor.getAxisGizmoTransform()
@/lua/ge/extensions/editor/sensorConfigurationEditor.lua
q2:setFromMatrix(rotMat)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quat(q2)
local rotation = nil
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local vehicle = vehicles[selectedVehicleIdx]
@/lua/ge/extensions/editor/api/forest.lua
rotMtx:setFromEuler(deltaEulerRotation)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_World then
rotMtx:mul(originalTransforms[1])
@/lua/ge/extensions/editor/meshEditor.lua
-- One selected node
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
nodeTransform = selectedMesh:getNodeTransform(selectedNode)
local function gizmoBeginDrag()
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_World then
nodeTransform = MatrixF(true)
-- Rotate the decals
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local and tableSize(selectedInstances) == 1 then
local gizmoTransform = editor.getAxisGizmoTransform()
@/lua/ge/extensions/editor/raceEditor/startPositions.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = sp.rot
rotation:setFromMatrix(editor.getAxisGizmoTransform())
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
sp.rot = quat(rotation)
@/lua/ge/extensions/editor/camPathEditor.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
M.currentPath.markers[currentMarkerIndex].rot = quat(rotation)
local transform
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = marker.rot
@/lua/ge/extensions/editor/raceEditor/pacenotes.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(note.normal, vec3(0,0,1))
rotation:setFromMatrix(gizmoTransform)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
note.normal = quat(rotation)*vec3(0,1,0)
@/lua/ge/extensions/editor/util/transformUtil.lua
if not editor or not editor.setAxisGizmoTransform then return end
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.transform = QuatF(self.rot.x, self.rot.y, self.rot.z, self.rot.w):getMatrix()
rotation:setFromMatrix(editor.getAxisGizmoTransform())
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.rot = quat(rotation)
@/lua/ge/extensions/editor/mainToolbar.lua
local alignment = editor.getAxisGizmoAlignment()
local alignIcon = nil
@/lua/ge/extensions/editor/forestEditor.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local and #forestItems == 1 then
editor.setAxisGizmoTransform(forestItems[1]:getTransform(), vec3(1,1,1))
if editor.selection.forestItem then
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local and #editor.selection.forestItem == 1 then
editor.setAxisGizmoTransform(editor.selection.forestItem[1]:getTransform(), vec3(1,1,1))
@/lua/ge/extensions/editor/crawlEditor/startingPositions.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.startingPosition.transform.rotation = quat(rotation)
@/lua/ge/extensions/editor/api/gizmo.lua
-- The alignment might be changed from the c++ side, so we need to test for that here
if editor.getAxisGizmoAlignment() ~= axisGizmoAlignmentLastFrame then
extensions.hook("onEditorAxisGizmoAligmentChanged")
extensions.hook("onEditorAxisGizmoAligmentChanged")
axisGizmoAlignmentLastFrame = editor.getAxisGizmoAlignment()
end
-- @see setAxisGizmoAlignment
local function getAxisGizmoAlignment()
return worldEditorCppApi.getAxisGizmoAlignment()
local function getAxisGizmoAlignment()
return worldEditorCppApi.getAxisGizmoAlignment()
end
local function toggleAxisGizmoAlignment()
if getAxisGizmoAlignment() == editor.AxisGizmoAlignment_World then
setAxisGizmoAlignment(editor.AxisGizmoAlignment_Local)
@/lua/ge/extensions/editor/objectTool.lua
if not obj then return end
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
-- we use last object's transform when local gizmo alignment, for the selection
local obj = scenetree.findObjectById(id)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
-- we use last object's transform when local gizmo alignment, for the selection
scaleProfileFlags = worldEditorCppApi.getAxisGizmoScaleProfileFlags(),
gizmoAlignment = worldEditorCppApi.getAxisGizmoAlignment(),
gizmoMode = worldEditorCppApi.getAxisGizmoMode()
@/lua/ge/extensions/editor/crawlEditor/waypoints.lua
if node.hasNormal then
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(node.normal, vec3(0,0,1))
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local newNormal = quat(rotation)*vec3(0,1,0)
@/lua/ge/extensions/editor/raceEditor/pathnodes.lua
if node.hasNormal then
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(node.normal, vec3(0,0,1))
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
node.normal = quat(rotation)*vec3(0,1,0)
@/lua/ge/extensions/editor/crawlEditor/boundaries.lua
local rotation
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quatFromDir(quatFromEuler(0, math.pi / 2, 0) * self.currentPlane.normal, vec3(0, 0, 1))
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.currentPlane.normal = quat(rotation) * vec3(0, 0, 1)
@/lua/ge/extensions/flowgraph/nodes/types/transform.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
self.rotation = quat(rotation)
editor.editModes.flowgraphTransform.onUpdate = function()
if self._oldGizmoAlignment and self._oldGizmoAlignment ~= editor.getAxisGizmoAlignment() then
self:updateTransform()
self._oldGizmoMode = editor.getAxisGizmoMode()
self._oldGizmoAlignment = editor.getAxisGizmoAlignment()
self._oldGizmoMode = editor.getAxisGizmoMode()
self._oldGizmoAlignment = editor.getAxisGizmoAlignment()
editor.editModes.flowgraphTransform.onUpdate = nop
local rotation
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
rotation = QuatF(q.x, q.y, q.z, q.w)
@/lua/ge/extensions/editor/mapSensorEditor.lua
q2:setFromMatrix(rotMat)
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local q = quat(q2)
local rotation = nil
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local s = sensors[selectedSensorIdx]
@/lua/ge/extensions/editor/trafficSignalsEditor.lua
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
instances[selected.signal].rot = quat(rotation)
@/lua/ge/extensions/editor/toolUtilities/gizmo.lua
local q = nil
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
q = quat(tmpQuatF)
local rotation = zeroQuatF
if editor.getAxisGizmoAlignment() == editor.AxisGizmoAlignment_Local then
local p1, p2 = nodes[max(1, nodeIdx - 1)], nodes[min(#nodes, nodeIdx + 1)]