Get values of a socket from a static mesh?


i want to get the sockets of a static mesh.
Unfortunately there is no “Find Socket” node for static meshes, only Skeletal Meshes.

Is there another solution to read the values of sockets that are existing in a Static Mesh.
No C++, juts BP solution.

Thanks in advance

You can use Get All Socket Names to get the socket names as an array and Get Socket Transform node to get location, rotation and scale values of the socket name you enter.

Thanks for the fast reply, but unfortunately this doesnt work.

Also what i need it read out the relative location,rotation and so on.

I think, i have found the solution. The function “FindSocket” for StaticMeshes exists, but it is not BlueprintCallable. Would be nice, if Epic Games could add this line of code. I am trying to avoid C++ whenever possible, but now i have made a plugin and copy this function into it with the BlueprintCallable functionality.

That’s strange. I’ve checked both on 4.9 and 4.11 and i can see those functions:

I have made a test project with 4.9. Maybe we are talking past each other. I think you have a StaticMeshComponent. What i need is just StaticMesh withount in scene.

I have made a picture to make it clear:

Meanwhile i have solved this with a plugin.

Ah, i see. Sorry about the misunderstanding!

Which plugin did you use to solve this?

you can either make a whole plugin, or just add a blueprint library to get around this if you don’t want to modify the engine. something like:

// (c) 2017 - FIX Games Co. LTD

#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "TP_VirtualRealityBPLibrary.generated.h"

class TP_VIRTUALREALITY_API UTP_VirtualRealityBPLibrary : public UBlueprintFunctionLibrary
	UFUNCTION(BlueprintCallable, Category = TP_VirtualReality)
		class UStaticMeshSocket *FindStaticMeshSocket(class UStaticMesh *mesh, FName InSocketName);

// (c) 2017 - FIX Games Co. LTD

#include "TP_VirtualReality.h"
#include "TP_VirtualRealityBPLibrary.h"
#include "Engine/StaticMesh.h"
#include "Engine/StaticMeshSocket.h"

/* helper work-around to not require modifying the engine to Expose FindSocket as a UFUNCTION() */
UStaticMeshSocket *UTP_VirtualRealityBPLibrary::FindStaticMeshSocket(UStaticMesh *mesh, FName InSocketName)
	if (mesh != nullptr)
		return mesh->FindSocket(InSocketName);
	return nullptr;