hello!
I want to get the information value of the parameters in the detail section of the material graph node through Python script.
What should I do?
material = util.load_asset('/Game/0_Root/Material/M_standard_shd_test.M_standard_shd_test' )
print (material) # Material
node_set = unreal.MaterialEditingLibrary.get_material_selected_nodes(material)
for node in node_set:
print (node) # MaterialGraphNode
print (dir(node))
print ('--' )
print (node.get_editor_property('??????' ))
cs
1 Like
Speido
(Speido)
August 19, 2021, 2:53am
2
Currently this doesn’t seem possible in python. You can either find the relevant properties in the documentation or use help(unreal.MaterialExpressionTextureSampleParameter2D)
A c++ implementation for listing of properties can be found here:
Good morning,
I did not find any possible way to do it in Python only, but here is the way I’m doing it using C++
.h
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "CppLib.generated.h"
UCLASS()
class UNREALPYTHONPROJECT_API UCppLib : public UBlueprintFunctionLibrary {
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "Unreal Python")
static TArray<FString> GetAllProperties(UClass* Class);
};
.cpp
#include "CppLib.h"
#inclu…
or here: