Skip to content

Instantly share code, notes, and snippets.

View johnfredcee's full-sized avatar
🚀
On an intergalactic cruise

John Connors johnfredcee

🚀
On an intergalactic cruise
View GitHub Profile
@johnfredcee
johnfredcee / getcommits.ps1
Last active January 23, 2025 14:54
Script to extract hashes for a particular author
<#
Script description.
Write a list of hashes and commit descriptions by a certian author to a file
#>
param (
# Name of committer
[string]$author = "John Connors",
# File to write hashes to
@johnfredcee
johnfredcee / GenerateClangDatabase.bat
Created November 25, 2024 09:21
Generate Clang Database for VSCode in Unreal
dotnet .\Engine\Binaries\DotNet\UnrealBuildTool\UnrealBuildTool.dll -Mode=GenerateProjectFiles -VSCode -NoIntellisense SandboxEditor Development Win64
dotnet .\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll -Mode=GenerateClangDatabase -NoPCH -DisableUnity -NoExecCodeGenActions SandboxEditor Development Win64
@johnfredcee
johnfredcee / unreal_polygroups.py
Created August 25, 2024 14:19
Using Geometry Scripting Polygroups with Unreal in Python
polygroup_ids = unreal.GeometryScriptIndexList()
print(polygroup_ids.convert_index_list_to_array())
polygroup_ids_out = unreal.GeometryScript_PolyGroups.get_all_triangle_polygroup_i_ds(dmesh, group_layer, polygroup_ids)
polygroup_ids = polygroup_ids_out[1]
print(polygroup_ids.convert_index_list_to_array())
@johnfredcee
johnfredcee / GenerateSplineComponent.cpp
Created November 12, 2023 10:32
Creating and populating a spline component at runtime in C++ in Unreal
/**
* Generate a spline we will later use to extrue a road from a set of points
*/
void ARoadNetwork::GenerateRoadSplines(const TArray<FVector>& InPoints)
{
// SplineBeingEdited is an Editor Only property we use to see our new component
// in the details panel as it won't show up otherwise
#if WITH_EDITORONLY_DATA
if (SplineBeingEdited == nullptr)
{
@johnfredcee
johnfredcee / PolylineEditorWidget.cpp
Last active October 26, 2023 10:39
UMG Polyline Editor WIdget Body
// Copyright (C) John Connors 2023
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
@johnfredcee
johnfredcee / PolylineEditorWidget.h
Last active October 26, 2023 10:35
UMG Polyline Editor Widget Header
// Copyright (C) John Connors 2023
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
@johnfredcee
johnfredcee / SPolylineEditor.cpp
Last active October 26, 2023 10:30
Slate Polyline Editor Control
// Copyright (C) John Connors 2023
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
@johnfredcee
johnfredcee / SPolylineEditor.h
Last active October 26, 2023 10:31
Slate Polyline Editor Control
// Copyright (C) John Connors 2023
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
Setup.bat -exclude=WinRT -exclude=Mac -exclude=MacOS -exclude=MacOSX -exclude=osx -exclude=osx64 -exclude=osx32 -exclude=Android -exclude=IOS -exclude=TVOS -exclude=Linux -exclude=Linux32 -exclude=Linux64 -exclude=linux_x64 -exclude=HTML5 -exclude=PS4 -exclude=XboxOne -exclude=Switch -exclude=Dingo -exclude=Win32 -exclude=GoogleVR -exclude=GoogleTest -exclude=LeapMotion -exclude=HoloLens
$scope = "Process"
$pathElements = @([Environment]::GetEnvironmentVariable("PATH", $scope) -split ";")
$pathElements += "D:\Dev\msys64\mingw64\bin"
$pathElements += "D:\Dev\msys64\usr\bin"
$newPath = $pathElements -join ";"
[Environment]::SetEnvironmentVariable("PATH", $newPath, $scope)
[System.Diagnostics.Process]::Start("D:\Apps\emacs\bin\runemacs.exe", "--debug-init");