Skip to content

Commit

Permalink
Merge pull request #81 from specklesystems/2.15
Browse files Browse the repository at this point in the history
Fixes for build issues
  • Loading branch information
JR-Morgan authored Jun 29, 2023
2 parents 8205c40 + 42b5251 commit 72738bb
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Source/SpeckleUnreal/Private/API/ClientAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ FHttpRequestRef FClientAPI::CreatePostRequest(const FString& ServerUrl, const FS
Request->SetVerb(TEXT("POST"));
Request->SetHeader("Accept-Encoding", Encoding);
Request->SetHeader("Content-Type", TEXT("application/json"));
Request->SetHeader("Authorization", "Bearer " + AuthToken);
if(!AuthToken.IsEmpty())
Request->SetHeader("Authorization","Bearer " + AuthToken);
Request->SetHeader("apollographql-client-name", "Unreal Engine");
Request->SetHeader("apollographql-client-version", SPECKLE_CONNECTOR_VERSION);
Request->SetContentAsString(PostPayload);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "UObject/ConstructorHelpers.h"
#include "Materials/MaterialInterface.h"
#include "Misc/Paths.h"
#include "UObject/Package.h"


UMaterialConverter::UMaterialConverter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#include "Conversion/Converters/PointCloudConverter.h"

#include "LidarPointCloudActor.h"
#include "LidarPointCloudShared.h"
#include "LidarPointCloudComponent.h"
#include "Objects/Geometry/PointCloud.h"

#include "Engine/World.h"
#include "Runtime/Launch/Resources/Version.h"

UPointCloudConverter::UPointCloudConverter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "Objects/Other/RenderMaterial.h"
#include "Objects/Utils/SpeckleObjectUtils.h"
#include "Components/StaticMeshComponent.h"
#include "Misc/Paths.h"
#include "UObject/Package.h"
#include "Materials/MaterialInterface.h"

#define LOCTEXT_NAMESPACE "FSpeckleUnrealModule"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "Misc/ScopedSlowTask.h"
#include "Objects/Utils/SpeckleObjectUtils.h"
#include "UObject/ConstructorHelpers.h"
#include "Dom/JsonValue.h"

#define LOCTEXT_NAMESPACE "FSpeckleUnrealModule"

Expand Down
4 changes: 2 additions & 2 deletions Source/SpeckleUnreal/Private/ReceiveSelectionComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

#include "ReceiveSelectionComponent.h"

#include "API/Models/SpeckleUser.h"
#include "API/ClientAPI.h"
#include "JsonObjectConverter.h"
#include "LogSpeckle.h"
#include "API/ClientAPI.h"
#include "API/Models/SpeckleUser.h"

#if WITH_EDITOR
void UReceiveSelectionComponent::PostEditChangeProperty(FPropertyChangedEvent& e)
Expand Down
9 changes: 4 additions & 5 deletions Source/SpeckleUnreal/Private/Transports/ServerTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ void UServerTransport::CopyObjectAndChildren(const FString& ObjectId,
this->OnComplete = OnCompleteAction;
this->OnError = OnErrorAction;

const FString AuthString = AuthToken.IsEmpty() ? "" : "Bearer " + AuthToken;

// Create Request for Root Object
const FHttpRequestRef Request = FHttpModule::Get().CreateRequest();
const FString Endpoint = FString::Printf(TEXT("%s/objects/%s/%s/single"), *ServerUrl, *StreamId, *ObjectId);
Request->SetVerb("GET");
Request->SetURL(Endpoint);
Request->SetHeader("Accept", TEXT("text/plain"));
Request->SetHeader("Authorization", AuthString);
if(!AuthToken.IsEmpty())
Request->SetHeader("Authorization","Bearer " + AuthToken);
Request->SetHeader("apollographql-client-name", "Unreal Engine");
Request->SetHeader("apollographql-client-version", SPECKLE_CONNECTOR_VERSION);

Expand Down Expand Up @@ -153,12 +152,12 @@ void UServerTransport::FetchChildren(TScriptInterface<ITransport> TargetTranspor
// Create Request
const FHttpRequestRef Request = FHttpModule::Get().CreateRequest();
{
const FString AuthString = AuthToken.IsEmpty() ? "" : "Bearer " + AuthToken;
const FString EndPoint = FString::Printf(TEXT("%s/api/getobjects/%s"), *ServerUrl, *StreamId);
Request->SetVerb("POST");
Request->SetURL(EndPoint);
Request->SetHeader("Accept", TEXT("text/plain"));
Request->SetHeader("Authorization", AuthString);
if(!AuthToken.IsEmpty())
Request->SetHeader("Authorization","Bearer " + AuthToken);
Request->SetHeader("Content-Type", "application/json");
Request->SetContentAsString(Body);
}
Expand Down
1 change: 1 addition & 0 deletions Source/SpeckleUnreal/Public/API/ClientAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#pragma once

#include "Interfaces/IHttpRequest.h"
#include "Dom/JsonObject.h"

DECLARE_DELEGATE_OneParam(FErrorDelegate, const FString&);
DECLARE_DELEGATE_OneParam(FAPIResponceDelegate, const FString&);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ITransport;
class ISpeckleConverter;
class UBase;
class UAggregateConverter;
class FJsonValue;
struct FSlowTask;

/**
Expand Down
2 changes: 2 additions & 0 deletions Source/SpeckleUnreal/Public/ReceiveSelectionComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "API/Models/SpeckleStream.h"

#include "ReceiveSelectionComponent.generated.h"


/**
* Actor component for selecting a Speckle Stream + Object
* Either by Stream Id + Object Id (Object selection mode)
Expand Down
12 changes: 10 additions & 2 deletions Source/SpeckleUnreal/SpeckleUnreal.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ public SpeckleUnreal(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;

// #if UE_5_2_OR_LATER
// IWYUSupport = IWYUSupport.Full;
// #else
// bEnforceIWYU = true;
// #endif
//
// bUseUnity = false;

PublicDefinitions.Add("SPECKLE_CONNECTOR_VERSION=\"2.15.0\"");
PublicIncludePaths.AddRange(

PublicIncludePaths.AddRange(
new string[] {
// ... add public include paths required here ...
}
Expand Down

0 comments on commit 72738bb

Please sign in to comment.