Skip to content

Instantly share code, notes, and snippets.

@MineClever
MineClever / SYourLandscapeModule.cpp
Created January 14, 2025 17:22 — forked from luttje/SYourLandscapeModule.cpp
Unreal Engine 5 - Programatically create a landscape with spline points and segments
#include "LandscapeSubsystem.h"
#include "LandscapeComponent.h"
#include "LandscapeSplineActor.h"
#include "LandscapeSplinesComponent.h"
#include "LandscapeSplineControlPoint.h"
#include "Editor/LandscapeEditor/Private/LandscapeEdMode.h"
// Source: https://forums.unrealengine.com/t/creating-a-lanscape-using-c-or-the-python-api/504997/4
ALandscape* CreateLandscape(const FTransform& LandscapeTransform, const int32& SectionSize, const int32& SectionsPerComponent, const int32& ComponentCountX, const int32& ComponentCountY)
{
@MineClever
MineClever / getMaterial.py
Created January 1, 2023 11:54 — forked from cecilemuller/getMaterial.py
Marmoset Toolbag: find material/object by name
import mset
# Smarter "findMaterial": doesn't print a message in the console
# or throw an error when the object to find doesn't exist.
def getMaterial(name, createIfNotFound=False):
found = None
objs = mset.getAllMaterials()
for obj in objs:
if obj.name == name:
found = obj