Skip to content

Commit 22e9bc9

Browse files
committed
Beta1 Update.
The plug-in is now linked to Houdini 18.0.597 / HAPI 3.4.0. ------------------------------------------------------- New Features: ------------------------------------------------------- Blueprint Support (experimental): It is now possible to use Houdini Asset Components in the Blueprint Editor. This lets you preset and use Houdini Digital Assets in Blueprint Actors. Changing parameters on the Houdini Asset will automatically update all placed instances of that Blueprint. After adding the Houdini Asset Component, the Houdini Asset it uses can be selected in the details panel. This will cook the HDA, and display its parameters interface. Currently, only Static mesh and Instancer outputs are supported, and only geometry inputs are available when using HDAs in the BP Editor. PDG Async Import (experimental): The PDG Asset Link now has the ability to use an asynchronous importer commandlet to import WorkItem outputs once they are ready. The commandlet communicates with the PDG Asset Link via a message bus, and automatically imports the BGEO files from output work items, creating uassets. After a successful import, the commandlet notifies the PDG asset link which will then instantiate the uasset in the level. Asynchronous import can be enabled/started/stopped via the "Work Item Import Settings" entry in the Houdini Engine menu. The PDG Asset Link will display the status of the async importer in its details UI when using it. BGEO Import Commandlet (experimental): The commandlet that is used for Asynchronous import of a PDG Graph's work item outputs can also be used independently, to automatically import BGEO files to an unreal project. The -watch=<path> command-line argument can be used to place the commandlet into directory watching mode. The BGEO import commandlet supports importing to bake path, by reading the "unreal_bake_folder" and "unreal_output_name" name attributes when in "bake" mode. - To watch a directory for new files and import them as uassets to the HoudiniEngine temporary path: <editor_exe> <uproject file path or project name> -run=HoudiniGeoImport -watch=<path> - To watch a directory for new files and import them as uassets to bake paths (respecting "unreal_bake_folder" and "unreal_output_name"): <editor_exe> <uproject file path or project name> -run=HoudiniGeoImport -bake -watch=<path> - To import a single .bgeo file as a uasset to the HoudiniEngine temporary path: <editor_exe> <uproject file path or project name> -run=HoudiniGeoImport <path to bgeo file> - To import a single .bgeo file as a uasset to the bake path (respecting "unreal_bake_folder" and "unreal_output_name"): <editor_exe> <uproject file path or project name> -run=HoudiniGeoImport -bake <path to bgeo file> - To display/log the help: <editor_exe> <uproject file path or project name> -run=HoudiniGeoImport -help Curve Output: It is now possible to output Spline Component from an HDA. To do so, curves in the HDA need to be marked using the "unreal_output_curve" primitive attribute (value set to 1). You can also control if you want the spline to be linear/closed using the "unreal_output_curve_linear" and "unreal_output_curve_closed" primitive attributes respectively. Session Sync - Viewport Sync: When using Session Sync, you can decide to link the Houdini and Unreal viewport via the "Sync Viewport" entry in the Houdini Engine menu. You can decide to sync both viewport, or have unreal control the houdini viewport, or the opposite. Viewport Sync currently only syncs the cameras' positions and orientations, and not their FOV, so the two views will not be 100% identical. Backward compatibility with Version1: The plugin is now backward compatible with version 1. When loading a level that contains Houdini objects made with version 1, the plugin now tries to convert the V1 components, parameters, inputs and outputs to their v2 equivalents. Some HDAs might need to be rebuilt after the conversion for their parameters and inputs to be displayed properly by the v2 plugin. Certain types of parameters or inputs are currently not properly upgraded to v2 (for example Editable curves or Handles). The conversion of the legacy data is still in progress and will be improved upon in the future. The legacy conversion can be enabled or disabled in the plugin settings. If disabled, legacy objects will simply be ignored when loading the level. The legacy settings also have an option to automatically rebuild converted Houdini Asset Components. This was added to facilitate migrating a version 1 project to version 2. To do so, we highly recommend duplicating (or at least backing up) your project first. The version 1 plugin should then be deleted from the Plugins/Runtime folder before copying the version 2 files. The conversion of the legacy objects will be done automatically upon loading the levels. ------------------------------------------------------- Bug Fixes: ------------------------------------------------------- - Generic UProperty Attributes now properly handle nested UStructs and Array properties. This fixes crashes when attempting to edit a property stored in nested struct or arrays via a generic property attribute (unreal_uproperty_) Attribute tuples can now successfully be used to set array UProperties. - Fixed Scale Y/Z values being swapped (Issue #44) - Fixed PackBeforeMerge, KeepWorldTransform being applied only to the first input mesh found in a BP or Actor. (Geo/World Input) (Issue #46) - Fixed crash when importing some StaticMeshes (Issue #47) - Changing Mobility, Visibility, or Hidden in Game on a HAC is now properly propagated to child components. - Auto-save is disabled when HDAs are being cooked or are processing outputs. - Fixed baking ProxyMeshes. When baking a HoudiniAssetComponent that uses Proxy Meshes, first refine the meshes to StaticMesh before baking. - Fixed Parameter Details UI bug when cooking is paused. - Fixed Ramp Parameter Details showing tooltips inside the curve editor. - Fixed crash when using FMeshDescription to output meshes. - We're using SleepNoStats() instead of Sleep() in the Scheduler, this avoids stat messages accumulating and allocating too much memory when the editor hangs. - Fixed landscape input's "mesh" and "points" modes not functioning/creating anything on the Houdini side. - Fixed FHoudiniEngineBakeUtils::CopyActorContentsToBlueprint returning nullptr instead of false. - The PDG Asset Link now handles instanced foliage destruction correctly. - Fixed bug causing incorrect work item numbers being displayed in the PDG Asset Link UI. - Improved PDG Asset Link UI updates. - Added undo/redo support to PDG asset link UI. - Fixed various Linux/Clang build issues. - Fixed Actors baked by the PDG Asset Link being destroyed/disappearing after reloading/restarting the engine. - Fixed crash when a PDG work result actor name is already in use. - PDG asset link: Fixed work item counts and node states not being reset upon Rebuild.
1 parent e311d1b commit 22e9bc9

File tree

110 files changed

+14785
-2448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+14785
-2448
lines changed

HoudiniEngine.uplugin

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"FileVersion" : 3,
33
"FriendlyName" : "Houdini Engine v2",
4-
"Version" : 18000532,
5-
"VersionName" : "v2 - Alpha3.2 - H18.0.532",
4+
"Version" : 18000597,
5+
"VersionName" : "v2 - Beta1 - H18.0.597",
66
"CreatedBy" : "Side Effects Software Inc.",
77
"CreatedByURL" : "http://www.sidefx.com",
88
"DocsURL" : "http://www.sidefx.com/docs/unreal/",
@@ -17,7 +17,7 @@
1717
{
1818
"Name": "HoudiniEngine",
1919
"Type": "Editor",
20-
"LoadingPhase": "PostEngineInit"
20+
"LoadingPhase": "Default"
2121
},
2222
{
2323
"Name" : "HoudiniEngineEditor",
@@ -27,10 +27,11 @@
2727
{
2828
"Name" : "HoudiniEngineRuntime",
2929
"Type" : "Runtime",
30-
"LoadingPhase" : "PostEngineInit"
30+
"LoadingPhase" : "Default"
3131
},
3232
],
3333

3434
"CanContainContent" : true,
3535
"Installed": true
3636
}
37+

Source/HoudiniEngine/HoudiniEngine.Build.cs

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) <2017> Side Effects Software Inc.
2+
* Copyright (c) <2020> Side Effects Software Inc.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a copy
55
* of this software and associated documentation files (the "Software"), to deal
@@ -32,8 +32,8 @@
3232

3333
/*
3434
35-
Houdini Version: 18.0.532
36-
Houdini Engine Version: 3.3.11
35+
Houdini Version: 18.0.597
36+
Houdini Engine Version: 3.4.0
3737
Unreal Version: 4.25.0
3838
3939
*/
@@ -47,7 +47,7 @@ public class HoudiniEngine : ModuleRules
4747
{
4848
private string GetHFSPath()
4949
{
50-
string HoudiniVersion = "18.0.532";
50+
string HoudiniVersion = "18.0.597";
5151
bool bIsRelease = true;
5252
string HFSPath = "C:/dev/hfs";
5353
string RegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Side Effects Software";
@@ -314,6 +314,7 @@ public HoudiniEngine( ReadOnlyTargetRules Target ) : base( Target )
314314
"AssetTools",
315315
"EditorStyle",
316316
"EditorWidgets",
317+
"Kismet",
317318
"LevelEditor",
318319
"MainFrame",
319320
"MeshPaint",
@@ -330,14 +331,23 @@ public HoudiniEngine( ReadOnlyTargetRules Target ) : base( Target )
330331
"MeshDescription",
331332
"MeshDescriptionOperations",
332333
"WorldBrowser",
334+
"Messaging"
333335
}
334336
);
335337
}
336338

339+
PrivateIncludePathModuleNames.AddRange(
340+
new string[]
341+
{
342+
"DirectoryWatcher"
343+
}
344+
);
345+
337346
DynamicallyLoadedModuleNames.AddRange(
338347
new string[]
339348
{
340349
// ... add any modules that your module loads dynamically here ...
350+
"DirectoryWatcher"
341351
}
342352
);
343353
}

Source/HoudiniEngine/Private/HoudiniApi.cpp

+108
Large diffs are not rendered by default.

Source/HoudiniEngine/Private/HoudiniEngine.cpp

+51-3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include "Materials/Material.h"
4747
#include "ISettingsModule.h"
4848
#include "HAL/PlatformFilemanager.h"
49+
#include "Async/Async.h"
4950

5051
#if WITH_EDITOR
5152
#include "Widgets/Notifications/SNotificationList.h"
@@ -68,6 +69,7 @@ FHoudiniEngine::FHoudiniEngine()
6869
, HoudiniEngineManager(nullptr)
6970
//, bHAPIVersionMismatch(false)
7071
, bEnableCookingGlobal(true)
72+
, UIRefreshCountWhenPauseCooking(0)
7173
, bFirstSessionCreated(false)
7274
, bEnableSessionSync(false)
7375
, bSyncWithHoudiniCook(true)
@@ -206,7 +208,16 @@ FHoudiniEngine::StartupModule()
206208
if (FHoudiniApi::IsHAPIInitialized())
207209
{
208210
if (bEnableCookingGlobal && !bNoneSession)
209-
HoudiniEngineManager->StartHoudiniTicking();
211+
{
212+
PostEngineInitCallback = FCoreDelegates::OnPostEngineInit.AddLambda([]()
213+
{
214+
FHoudiniEngine& HEngine = FHoudiniEngine::Get();
215+
HEngine.UnregisterPostEngineInitCallback();
216+
FHoudiniEngineManager* const Manager = HEngine.GetHoudiniEngineManager();
217+
if (Manager)
218+
Manager->StartHoudiniTicking();
219+
});
220+
}
210221
}
211222
}
212223

@@ -801,7 +812,7 @@ FHoudiniEngine::RestartSession()
801812
}
802813

803814
bool
804-
FHoudiniEngine::CreateSession(const EHoudiniRuntimeSettingsSessionType& SessionType)
815+
FHoudiniEngine::CreateSession(const EHoudiniRuntimeSettingsSessionType& SessionType, FName OverrideServerPipeName)
805816
{
806817
HAPI_Session* SessionPtr = &Session;
807818

@@ -818,7 +829,7 @@ FHoudiniEngine::CreateSession(const EHoudiniRuntimeSettingsSessionType& SessionT
818829
true,
819830
HoudiniRuntimeSettings->AutomaticServerTimeout,
820831
SessionType,
821-
HoudiniRuntimeSettings->ServerPipeName,
832+
OverrideServerPipeName == NAME_None ? HoudiniRuntimeSettings->ServerPipeName : OverrideServerPipeName.ToString(),
822833
HoudiniRuntimeSettings->ServerPort,
823834
HoudiniRuntimeSettings->ServerHost))
824835
{
@@ -1051,5 +1062,42 @@ FHoudiniEngine::UploadSessionSyncInfoToHoudini()
10511062
HOUDINI_LOG_WARNING(TEXT("Failed to set the SessionSync Infos."));
10521063
}
10531064

1065+
void
1066+
FHoudiniEngine::StartPDGCommandlet()
1067+
{
1068+
if (HoudiniEngineManager)
1069+
HoudiniEngineManager->StartPDGCommandlet();
1070+
}
1071+
1072+
void
1073+
FHoudiniEngine::StopPDGCommandlet()
1074+
{
1075+
if (HoudiniEngineManager)
1076+
HoudiniEngineManager->StopPDGCommandlet();
1077+
}
1078+
1079+
bool
1080+
FHoudiniEngine::IsPDGCommandletRunningOrConnected()
1081+
{
1082+
if (HoudiniEngineManager)
1083+
return HoudiniEngineManager->IsPDGCommandletRunningOrConnected();
1084+
return false;
1085+
}
1086+
1087+
EHoudiniBGEOCommandletStatus
1088+
FHoudiniEngine::GetPDGCommandletStatus()
1089+
{
1090+
if (HoudiniEngineManager)
1091+
return HoudiniEngineManager->GetPDGCommandletStatus();
1092+
return EHoudiniBGEOCommandletStatus::NotStarted;
1093+
}
1094+
1095+
void
1096+
FHoudiniEngine::UnregisterPostEngineInitCallback()
1097+
{
1098+
if (PostEngineInitCallback.IsValid())
1099+
FCoreDelegates::OnPostEngineInit.Remove(PostEngineInitCallback);
1100+
}
1101+
10541102
#undef LOCTEXT_NAMESPACE
10551103

Source/HoudiniEngine/Private/HoudiniEngine.h

+29-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class UMaterial;
4242

4343
struct FSlateDynamicImageBrush;
4444

45+
enum class EHoudiniBGEOCommandletStatus : uint8;
46+
4547
// Not using the IHoudiniEngine interface for now
4648
class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
4749
{
@@ -91,7 +93,7 @@ class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
9193
// Stops, then creates a new session
9294
bool RestartSession();
9395
// Creates a session, start HARS
94-
bool CreateSession(const EHoudiniRuntimeSettingsSessionType& SessionType);
96+
bool CreateSession(const EHoudiniRuntimeSettingsSessionType& SessionType, FName OverrideServerPipeName=NAME_None);
9597
// Connect to an existing HE session
9698
bool ConnectSession(const EHoudiniRuntimeSettingsSessionType& SessionType);
9799

@@ -133,6 +135,14 @@ class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
133135
// Sets whether or not cooking is currently enabled
134136
void SetCookingEnabled(const bool& bInEnableCooking);
135137

138+
// Check if we need to refresh UI when cooking is paused
139+
bool HasUIFinishRefreshingWhenPausingCooking() const { return UIRefreshCountWhenPauseCooking <= 0; };
140+
141+
// Reset number of registered HACs when cooking is paused
142+
void SetUIRefreshCountWhenPauseCooking(const int32& bInCount) { UIRefreshCountWhenPauseCooking = bInCount; };
143+
// Reduce the count by 1 when an HAC UI is refreshed when cooking is paused
144+
void RefreshUIDisplayedWhenPauseCooking() { UIRefreshCountWhenPauseCooking -= 1; };
145+
136146
// Indicates whether or not the first attempt to create a Houdini session was made
137147
bool GetFirstSessionCreated() const;
138148
// Sets whether or not the first attempt to create a Houdini session was made
@@ -189,6 +199,20 @@ class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
189199
FProcHandle GetHESSProcHandle() const { return HESS_ProcHandle; };
190200
void SetHESSProcHandle(const FProcHandle& InProcHandle) { HESS_ProcHandle = InProcHandle; };
191201

202+
void StartPDGCommandlet();
203+
204+
void StopPDGCommandlet();
205+
206+
bool IsPDGCommandletRunningOrConnected();
207+
208+
EHoudiniBGEOCommandletStatus GetPDGCommandletStatus();
209+
210+
FHoudiniEngineManager* GetHoudiniEngineManager() { return HoudiniEngineManager; }
211+
212+
const FHoudiniEngineManager* GetHoudiniEngineManager() const { return HoudiniEngineManager; }
213+
214+
void UnregisterPostEngineInitCallback();
215+
192216
private:
193217

194218
// Singleton instance of Houdini Engine.
@@ -227,6 +251,8 @@ class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
227251

228252
// Global cooking flag, used to pause HEngine while using the editor
229253
bool bEnableCookingGlobal;
254+
// Counter of HACs that need to be refreshed when pause cooking
255+
int32 UIRefreshCountWhenPauseCooking;
230256

231257
// Indicates that the first attempt to create a session has been done
232258
// This is to delay the first "automatic" session creation for the first cook
@@ -267,6 +293,8 @@ class HOUDINIENGINE_API FHoudiniEngine : public IModuleInterface
267293
// Material used for default mesh reference
268294
TWeakObjectPtr<UMaterial> HoudiniDefaultReferenceMeshMaterial;
269295

296+
FDelegateHandle PostEngineInitCallback;
297+
270298
#if WITH_EDITOR
271299
/** Notification used by this component. **/
272300
TWeakPtr<class SNotificationItem> NotificationPtr;

0 commit comments

Comments
 (0)