├── .gitignore ├── Content ├── Examples │ ├── Cpp │ │ ├── CurveInputExample.cpp │ │ ├── CurveInputExample.h │ │ ├── IterateOverHoudiniActorsExample.cpp │ │ └── IterateOverHoudiniActorsExample.h │ ├── EUA │ │ └── EUA_CurveInputExample.uasset │ ├── EUW │ │ └── EUW_APIExample.uasset │ ├── Maps │ │ ├── LandscapeInputExample.umap │ │ └── LandscapeInputExample_BuiltData.uasset │ ├── Python │ │ ├── asset_input_example.py │ │ ├── bake_all_outputs_example.py │ │ ├── bake_output_object_example.py │ │ ├── curve_input_example.py │ │ ├── eau_curve_input_example.py │ │ ├── geo_input_example.py │ │ ├── instances_example.py │ │ ├── iterate_over_houdini_asset_actors_example.py │ │ ├── landscape_input_example.py │ │ ├── outputs_example.py │ │ ├── pdg_example.py │ │ ├── process_hda_example.py │ │ ├── ramp_parameter_example.py │ │ ├── start_session_example.py │ │ └── world_input_example.py │ └── hda │ │ ├── copy_to_curve.1.0.hda │ │ ├── copy_to_curve_1_0.uasset │ │ ├── hilly_landscape_erode.1.0.hda │ │ ├── hilly_landscape_erode_1_0.uasset │ │ ├── pdg_pighead_grid.2.0.hda │ │ ├── pdg_pighead_grid_2_0.uasset │ │ ├── pig_head_subdivider_v01.hda │ │ ├── pig_head_subdivider_v01.uasset │ │ ├── ramp_example.1.0.hda │ │ ├── ramp_example_1_0.uasset │ │ ├── subnet_test.2.0.hda │ │ └── subnet_test_2_0.uasset ├── Icons │ ├── icon_houdini_logo_128.png │ ├── icon_houdini_logo_16.png │ └── icon_houdini_logo_40.png ├── MaterialFunctions │ ├── MF_VAT_Fluid.uasset │ ├── MF_VAT_Rigid.uasset │ ├── MF_VAT_Soft.uasset │ └── MF_VAT_Sprite.uasset ├── Materials │ ├── M_VAT_Fluid.uasset │ ├── M_VAT_Rigid.uasset │ ├── M_VAT_Soft.uasset │ └── M_VAT_Sprite.uasset ├── Python │ ├── HoudiniEngineV2 │ │ ├── __init__.py │ │ └── asyncprocessor.py │ └── __init__.py ├── Test │ └── hda │ │ ├── InputEcho.hda │ │ ├── TestBox.hda │ │ ├── TestParams.hda │ │ └── TestPolyReduce.hda ├── Textures │ └── icon_houdini_logo_128.uasset ├── Tools │ ├── he_sop_boolean.hda │ ├── he_sop_boolean.png │ ├── he_sop_curve_instancer.hda │ ├── he_sop_curve_instancer.png │ ├── he_sop_polyreduce.hda │ ├── he_sop_polyreduce.png │ ├── rock_generator.hda │ └── rock_generator.png ├── big_question_mark.uasset ├── default_reference_static_mesh.uasset ├── default_reference_static_mesh_material.uasset ├── houdini_bgeo_import.uasset ├── houdini_default_material.uasset ├── houdini_logo.uasset └── houdini_templated_material.uasset ├── HoudiniEngine.uplugin ├── LICENSE.md ├── README.md ├── Resources ├── Icon128.png ├── Icons │ ├── asset_help16x16.png │ ├── bake_all16x16.png │ ├── bake_selected16x16.png │ ├── clean_temp16x16.png │ ├── cook_all16x16.png │ ├── cook_log16x16.png │ ├── cook_selected16x16.png │ ├── digital_asset16x16.png │ ├── houdini_digital_asset.png │ ├── houdini_digital_asset_128.png │ ├── icon_hengine_logo_128.png │ ├── icon_hengine_logo_16.png │ ├── icon_hengine_logo_40.png │ ├── icon_houdini_logo_128.png │ ├── icon_houdini_logo_16.png │ ├── icon_houdini_logo_40.png │ ├── online_forum16x16.png │ ├── online_help16x16.png │ ├── open_in_houdini16x16.png │ ├── pause16x16.png │ ├── pdg_cancel16x16.png │ ├── pdg_dirty_all16x16.png │ ├── pdg_dirty_node16x16.png │ ├── pdg_link16x16.png │ ├── pdg_pause16x16.png │ ├── pdg_refresh16x16.png │ ├── pdg_reset16x16.png │ ├── rebuild_all16x16.png │ ├── rebuild_selected16x16.png │ ├── refine_all16x16.png │ ├── refine_selected16x16.png │ ├── report_bug16x16.png │ ├── reset16x16.png │ ├── reset_parameters16x16.png │ ├── save_to_hip16x16.png │ ├── session_connect16x16.png │ ├── session_create16x16.png │ ├── session_restart16x16.png │ ├── session_stop16x16.png │ ├── session_sync16x16.png │ ├── session_sync_start16x16.png │ ├── session_sync_stop16x16.png │ ├── sync_unreal16x16.png │ ├── viewport_sync16x16.png │ ├── viewport_sync_both16x16.png │ ├── viewport_sync_houdini16x16.png │ ├── viewport_sync_off16x16.png │ └── viewport_sync_unreal16x16.png ├── hengine_banner.png ├── hengine_banner_d.png ├── hengine_logo_128.png ├── hengine_recook_icon.png ├── hengine_reload_icon.png └── hengine_resetparameters_icon.png └── Source ├── HoudiniEngine ├── HoudiniEngine.Build.cs ├── Private │ ├── HBSPOps.cpp │ ├── HBSPOps.h │ ├── HCsgUtils.cpp │ ├── HCsgUtils.h │ ├── HoudiniApi.cpp │ ├── HoudiniEngine.cpp │ ├── HoudiniEngine.h │ ├── HoudiniEngineManager.cpp │ ├── HoudiniEngineManager.h │ ├── HoudiniEngineOutputStats.cpp │ ├── HoudiniEngineOutputStats.h │ ├── HoudiniEnginePrivatePCH.h │ ├── HoudiniEngineScheduler.cpp │ ├── HoudiniEngineScheduler.h │ ├── HoudiniEngineString.cpp │ ├── HoudiniEngineString.h │ ├── HoudiniEngineTask.cpp │ ├── HoudiniEngineTask.h │ ├── HoudiniEngineTaskInfo.cpp │ ├── HoudiniEngineTaskInfo.h │ ├── HoudiniEngineUtils.cpp │ ├── HoudiniEngineUtils.h │ ├── HoudiniGeoImportCommandlet.cpp │ ├── HoudiniGeoImportCommandlet.h │ ├── HoudiniGeoImporter.cpp │ ├── HoudiniGeoImporter.h │ ├── HoudiniHandleTranslator.cpp │ ├── HoudiniHandleTranslator.h │ ├── HoudiniInputTranslator.cpp │ ├── HoudiniInputTranslator.h │ ├── HoudiniInstanceTranslator.cpp │ ├── HoudiniInstanceTranslator.h │ ├── HoudiniLandscapeTranslator.cpp │ ├── HoudiniLandscapeTranslator.h │ ├── HoudiniMaterialTranslator.cpp │ ├── HoudiniMaterialTranslator.h │ ├── HoudiniMeshTranslator.cpp │ ├── HoudiniMeshTranslator.h │ ├── HoudiniOutputTranslator.cpp │ ├── HoudiniOutputTranslator.h │ ├── HoudiniPDGImporterMessages.cpp │ ├── HoudiniPDGImporterMessages.h │ ├── HoudiniPDGManager.cpp │ ├── HoudiniPDGManager.h │ ├── HoudiniPDGTranslator.cpp │ ├── HoudiniPDGTranslator.h │ ├── HoudiniPackageParams.cpp │ ├── HoudiniPackageParams.h │ ├── HoudiniParameterTranslator.cpp │ ├── HoudiniParameterTranslator.h │ ├── HoudiniSplineTranslator.cpp │ ├── HoudiniSplineTranslator.h │ ├── HoudiniStringResolver.cpp │ ├── HoudiniStringResolver.h │ ├── SAssetSelectionWidget.cpp │ ├── SAssetSelectionWidget.h │ ├── Tests │ │ ├── HoudiniCoreTests.cpp │ │ └── HoudiniCoreTests.h │ ├── UnrealBrushTranslator.cpp │ ├── UnrealBrushTranslator.h │ ├── UnrealFoliageTypeTranslator.cpp │ ├── UnrealFoliageTypeTranslator.h │ ├── UnrealInstanceTranslator.cpp │ ├── UnrealInstanceTranslator.h │ ├── UnrealLandscapeTranslator.cpp │ ├── UnrealLandscapeTranslator.h │ ├── UnrealMeshTranslator.cpp │ ├── UnrealMeshTranslator.h │ ├── UnrealSplineTranslator.cpp │ └── UnrealSplineTranslator.h └── Public │ ├── HAPI │ ├── HAPI.h │ ├── HAPI_API.h │ ├── HAPI_Common.h │ ├── HAPI_Helpers.h │ └── HAPI_Version.h │ └── HoudiniApi.h ├── HoudiniEngineEditor ├── HoudiniEngineEditor.Build.cs ├── Private │ ├── AssetTypeActions_HoudiniAsset.cpp │ ├── AssetTypeActions_HoudiniAsset.h │ ├── HoudiniAssetActorFactory.cpp │ ├── HoudiniAssetActorFactory.h │ ├── HoudiniAssetBroker.cpp │ ├── HoudiniAssetBroker.h │ ├── HoudiniAssetComponentDetails.cpp │ ├── HoudiniAssetComponentDetails.h │ ├── HoudiniAssetFactory.cpp │ ├── HoudiniAssetFactory.h │ ├── HoudiniEngineBakeUtils.cpp │ ├── HoudiniEngineBakeUtils.h │ ├── HoudiniEngineCommands.cpp │ ├── HoudiniEngineCommands.h │ ├── HoudiniEngineDetails.cpp │ ├── HoudiniEngineDetails.h │ ├── HoudiniEngineEditor.cpp │ ├── HoudiniEngineEditor.h │ ├── HoudiniEngineEditorPrivatePCH.h │ ├── HoudiniEngineEditorUtils.cpp │ ├── HoudiniEngineEditorUtils.h │ ├── HoudiniEngineStyle.cpp │ ├── HoudiniEngineStyle.h │ ├── HoudiniGeoFactory.cpp │ ├── HoudiniGeoFactory.h │ ├── HoudiniHandleComponentVisualizer.cpp │ ├── HoudiniHandleComponentVisualizer.h │ ├── HoudiniHandleDetails.cpp │ ├── HoudiniHandleDetails.h │ ├── HoudiniInputDetails.cpp │ ├── HoudiniInputDetails.h │ ├── HoudiniOutputDetails.cpp │ ├── HoudiniOutputDetails.h │ ├── HoudiniPDGDetails.cpp │ ├── HoudiniPDGDetails.h │ ├── HoudiniParameterDetails.cpp │ ├── HoudiniParameterDetails.h │ ├── HoudiniPublicAPI.cpp │ ├── HoudiniPublicAPIAssetWrapper.cpp │ ├── HoudiniPublicAPIBlueprintLib.cpp │ ├── HoudiniPublicAPIInputTypes.cpp │ ├── HoudiniPublicAPIObjectBase.cpp │ ├── HoudiniPublicAPIOutputTypes.cpp │ ├── HoudiniPublicAPIProcessHDANode.cpp │ ├── HoudiniRuntimeSettingsDetails.cpp │ ├── HoudiniRuntimeSettingsDetails.h │ ├── HoudiniSplineComponentVisualizer.cpp │ ├── HoudiniSplineComponentVisualizer.h │ ├── HoudiniTool.cpp │ ├── HoudiniTool.h │ ├── SNewFilePathPicker.cpp │ ├── SNewFilePathPicker.h │ └── Tests │ │ ├── HoudiniEditorTestUtils.cpp │ │ ├── HoudiniEditorTestUtils.h │ │ ├── HoudiniEditorTests.cpp │ │ └── HoudiniEditorTests.h └── Public │ ├── HoudiniPublicAPI.h │ ├── HoudiniPublicAPIAssetWrapper.h │ ├── HoudiniPublicAPIBlueprintLib.h │ ├── HoudiniPublicAPIInputTypes.h │ ├── HoudiniPublicAPIObjectBase.h │ ├── HoudiniPublicAPIOutputTypes.h │ ├── HoudiniPublicAPIProcessHDANode.h │ └── IHoudiniEngineEditor.h └── HoudiniEngineRuntime ├── HoudiniEngineRuntime.Build.cs ├── Private ├── HoudiniAsset.cpp ├── HoudiniAssetActor.cpp ├── HoudiniAssetBlueprintComponent.cpp ├── HoudiniAssetBlueprintComponent.h ├── HoudiniAssetComponent.cpp ├── HoudiniAssetComponent.h ├── HoudiniAssetStateTypes.h ├── HoudiniCompatibilityHelpers.cpp ├── HoudiniCompatibilityHelpers.h ├── HoudiniEngineCopyPropertiesInterface.cpp ├── HoudiniEngineCopyPropertiesInterface.h ├── HoudiniEngineRuntime.cpp ├── HoudiniEngineRuntime.h ├── HoudiniEngineRuntimePrivatePCH.h ├── HoudiniEngineRuntimeUtils.cpp ├── HoudiniEngineRuntimeUtils.h ├── HoudiniGenericAttribute.cpp ├── HoudiniGenericAttribute.h ├── HoudiniGeoPartObject.cpp ├── HoudiniGeoPartObject.h ├── HoudiniHandleComponent.cpp ├── HoudiniHandleComponent.h ├── HoudiniInput.cpp ├── HoudiniInput.h ├── HoudiniInputObject.cpp ├── HoudiniInputObject.h ├── HoudiniInputTypes.h ├── HoudiniInstancedActorComponent.cpp ├── HoudiniInstancedActorComponent.h ├── HoudiniMeshSplitInstancerComponent.cpp ├── HoudiniMeshSplitInstancerComponent.h ├── HoudiniOutput.cpp ├── HoudiniOutput.h ├── HoudiniPDGAssetLink.cpp ├── HoudiniPDGAssetLink.h ├── HoudiniParameter.cpp ├── HoudiniParameter.h ├── HoudiniParameterButton.cpp ├── HoudiniParameterButton.h ├── HoudiniParameterButtonStrip.cpp ├── HoudiniParameterButtonStrip.h ├── HoudiniParameterChoice.cpp ├── HoudiniParameterChoice.h ├── HoudiniParameterColor.cpp ├── HoudiniParameterColor.h ├── HoudiniParameterFile.cpp ├── HoudiniParameterFile.h ├── HoudiniParameterFloat.cpp ├── HoudiniParameterFloat.h ├── HoudiniParameterFolder.cpp ├── HoudiniParameterFolder.h ├── HoudiniParameterFolderList.cpp ├── HoudiniParameterFolderList.h ├── HoudiniParameterInt.cpp ├── HoudiniParameterInt.h ├── HoudiniParameterLabel.cpp ├── HoudiniParameterLabel.h ├── HoudiniParameterMultiParm.cpp ├── HoudiniParameterMultiParm.h ├── HoudiniParameterOperatorPath.cpp ├── HoudiniParameterOperatorPath.h ├── HoudiniParameterRamp.cpp ├── HoudiniParameterRamp.h ├── HoudiniParameterSeparator.cpp ├── HoudiniParameterSeparator.h ├── HoudiniParameterString.cpp ├── HoudiniParameterString.h ├── HoudiniParameterToggle.cpp ├── HoudiniParameterToggle.h ├── HoudiniPluginSerializationVersion.cpp ├── HoudiniPluginSerializationVersion.h ├── HoudiniRuntimeSettings.cpp ├── HoudiniRuntimeSettings.h ├── HoudiniSplineComponent.cpp ├── HoudiniSplineComponent.h ├── HoudiniStaticMesh.cpp ├── HoudiniStaticMesh.h ├── HoudiniStaticMeshComponent.cpp ├── HoudiniStaticMeshComponent.h ├── HoudiniStaticMeshSceneProxy.cpp ├── HoudiniStaticMeshSceneProxy.h ├── HoudiniTranslatorTypes.cpp ├── HoudiniTranslatorTypes.h ├── IHoudiniAssetStateEvents.cpp ├── IHoudiniAssetStateEvents.h └── Tests │ ├── HoudiniRuntimeTests.cpp │ └── HoudiniRuntimeTests.h └── Public ├── HoudiniAsset.h ├── HoudiniAssetActor.h └── HoudiniEngineRuntimeCommon.h /.gitignore: -------------------------------------------------------------------------------- 1 | # # a comment - this is ignored 2 | # *.a # no .a files 3 | # !lib.a # but do track lib.a, even though you're ignoring .a files above 4 | # /TODO # only ignore the root TODO file, not subdir/TODO 5 | # build/ # ignore all files in the build/ directory 6 | # doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt 7 | 8 | *.obj 9 | *.dll 10 | *.pdb 11 | *.generated.h 12 | Intermediate/ 13 | Binaries/ 14 | *.Template.cs 15 | *.uplugin.Template 16 | -------------------------------------------------------------------------------- /Content/Examples/Cpp/CurveInputExample.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "EditorUtilityActor.h" 31 | 32 | #include "CurveInputExample.generated.h" 33 | 34 | class UHoudiniPublicAPIAssetWrapper; 35 | 36 | UCLASS() 37 | class ACurveInputExample : public AEditorUtilityActor 38 | { 39 | GENERATED_BODY() 40 | 41 | public: 42 | ACurveInputExample(); 43 | 44 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, CallInEditor) 45 | void RunCurveInputExample(); 46 | 47 | protected: 48 | /** Set our initial parameter values: disable upvectorstart and set the scale to 0.2. */ 49 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, CallInEditor) 50 | void SetInitialParameterValues(UHoudiniPublicAPIAssetWrapper* InWrapper); 51 | 52 | /** Configure our inputs: input 0 is a cube and input 1 a helix. */ 53 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, CallInEditor) 54 | void SetInputs(UHoudiniPublicAPIAssetWrapper* InWrapper); 55 | 56 | /** Print the outputs that were generated by the HDA (after a cook) */ 57 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, CallInEditor) 58 | void PrintOutputs(UHoudiniPublicAPIAssetWrapper* InWrapper); 59 | 60 | UPROPERTY(BlueprintReadWrite) 61 | UHoudiniPublicAPIAssetWrapper* AssetWrapper; 62 | }; 63 | -------------------------------------------------------------------------------- /Content/Examples/Cpp/IterateOverHoudiniActorsExample.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "EditorUtilityActor.h" 31 | 32 | #include "IterateOverHoudiniActorsExample.generated.h" 33 | 34 | UCLASS() 35 | class APIEXAMPLEEDITOR_API AIterateOverHoudiniActorsExample : public AEditorUtilityActor 36 | { 37 | GENERATED_BODY() 38 | 39 | public: 40 | // Sets default values for this actor's properties 41 | AIterateOverHoudiniActorsExample(); 42 | 43 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, CallInEditor) 44 | void RunIterateOverHoudiniActorsExample(); 45 | }; 46 | -------------------------------------------------------------------------------- /Content/Examples/EUA/EUA_CurveInputExample.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/EUA/EUA_CurveInputExample.uasset -------------------------------------------------------------------------------- /Content/Examples/EUW/EUW_APIExample.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/EUW/EUW_APIExample.uasset -------------------------------------------------------------------------------- /Content/Examples/Maps/LandscapeInputExample.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/Maps/LandscapeInputExample.umap -------------------------------------------------------------------------------- /Content/Examples/Maps/LandscapeInputExample_BuiltData.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/Maps/LandscapeInputExample_BuiltData.uasset -------------------------------------------------------------------------------- /Content/Examples/Python/instances_example.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) <2021> Side Effects Software Inc. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, 8 | # this list of conditions and the following disclaimer. 9 | # 10 | # 2. The name of Side Effects Software may not be used to endorse or 11 | # promote products derived from this software without specific prior 12 | # written permission. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 15 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 17 | # NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 20 | # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 21 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 22 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 23 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | """ Example script that instantiates an HDA using the API and then 26 | setting some parameter values after instantiation but before the 27 | first cook. 28 | 29 | """ 30 | 31 | import unreal 32 | 33 | _g_wrapper = None 34 | 35 | 36 | def get_test_hda_path(): 37 | return '/HoudiniEngine/Examples/hda/pig_head_subdivider_v01.pig_head_subdivider_v01' 38 | 39 | 40 | def get_test_hda(): 41 | return unreal.load_object(None, get_test_hda_path()) 42 | 43 | 44 | def on_post_instantiation(in_wrapper): 45 | print('on_post_instantiation') 46 | # in_wrapper.on_post_instantiation_delegate.remove_callable(on_post_instantiation) 47 | 48 | # Set some parameters to create instances and enable a material 49 | in_wrapper.set_bool_parameter_value('add_instances', True) 50 | in_wrapper.set_int_parameter_value('num_instances', 8) 51 | in_wrapper.set_bool_parameter_value('addshader', True) 52 | 53 | 54 | def run(): 55 | # get the API singleton 56 | api = unreal.HoudiniPublicAPIBlueprintLib.get_api() 57 | 58 | global _g_wrapper 59 | # instantiate an asset with auto-cook enabled 60 | _g_wrapper = api.instantiate_asset(get_test_hda(), unreal.Transform()) 61 | 62 | # Bind on_post_instantiation (before the first cook) callback to set parameters 63 | _g_wrapper.on_post_instantiation_delegate.add_callable(on_post_instantiation) 64 | 65 | 66 | if __name__ == '__main__': 67 | run() 68 | -------------------------------------------------------------------------------- /Content/Examples/Python/start_session_example.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) <2021> Side Effects Software Inc. 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, 8 | # this list of conditions and the following disclaimer. 9 | # 10 | # 2. The name of Side Effects Software may not be used to endorse or 11 | # promote products derived from this software without specific prior 12 | # written permission. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 15 | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 17 | # NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 19 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 20 | # OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 21 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 22 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 23 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | 25 | import unreal 26 | 27 | """ Example for getting the API instance and starting/creating the Houdini 28 | Engine Session. 29 | 30 | """ 31 | 32 | 33 | def run(): 34 | # Get the API singleton 35 | api = unreal.HoudiniPublicAPIBlueprintLib.get_api() 36 | # Check if there is an existing valid session 37 | if not api.is_session_valid(): 38 | # Create a new session 39 | api.create_session() 40 | 41 | 42 | if __name__ == '__main__': 43 | run() 44 | -------------------------------------------------------------------------------- /Content/Examples/hda/copy_to_curve.1.0.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/copy_to_curve.1.0.hda -------------------------------------------------------------------------------- /Content/Examples/hda/copy_to_curve_1_0.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/copy_to_curve_1_0.uasset -------------------------------------------------------------------------------- /Content/Examples/hda/hilly_landscape_erode.1.0.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/hilly_landscape_erode.1.0.hda -------------------------------------------------------------------------------- /Content/Examples/hda/hilly_landscape_erode_1_0.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/hilly_landscape_erode_1_0.uasset -------------------------------------------------------------------------------- /Content/Examples/hda/pdg_pighead_grid.2.0.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/pdg_pighead_grid.2.0.hda -------------------------------------------------------------------------------- /Content/Examples/hda/pdg_pighead_grid_2_0.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/pdg_pighead_grid_2_0.uasset -------------------------------------------------------------------------------- /Content/Examples/hda/pig_head_subdivider_v01.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/pig_head_subdivider_v01.hda -------------------------------------------------------------------------------- /Content/Examples/hda/pig_head_subdivider_v01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/pig_head_subdivider_v01.uasset -------------------------------------------------------------------------------- /Content/Examples/hda/ramp_example.1.0.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/ramp_example.1.0.hda -------------------------------------------------------------------------------- /Content/Examples/hda/ramp_example_1_0.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/ramp_example_1_0.uasset -------------------------------------------------------------------------------- /Content/Examples/hda/subnet_test.2.0.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/subnet_test.2.0.hda -------------------------------------------------------------------------------- /Content/Examples/hda/subnet_test_2_0.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Examples/hda/subnet_test_2_0.uasset -------------------------------------------------------------------------------- /Content/Icons/icon_houdini_logo_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Icons/icon_houdini_logo_128.png -------------------------------------------------------------------------------- /Content/Icons/icon_houdini_logo_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Icons/icon_houdini_logo_16.png -------------------------------------------------------------------------------- /Content/Icons/icon_houdini_logo_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Icons/icon_houdini_logo_40.png -------------------------------------------------------------------------------- /Content/MaterialFunctions/MF_VAT_Fluid.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/MaterialFunctions/MF_VAT_Fluid.uasset -------------------------------------------------------------------------------- /Content/MaterialFunctions/MF_VAT_Rigid.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/MaterialFunctions/MF_VAT_Rigid.uasset -------------------------------------------------------------------------------- /Content/MaterialFunctions/MF_VAT_Soft.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/MaterialFunctions/MF_VAT_Soft.uasset -------------------------------------------------------------------------------- /Content/MaterialFunctions/MF_VAT_Sprite.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/MaterialFunctions/MF_VAT_Sprite.uasset -------------------------------------------------------------------------------- /Content/Materials/M_VAT_Fluid.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Materials/M_VAT_Fluid.uasset -------------------------------------------------------------------------------- /Content/Materials/M_VAT_Rigid.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Materials/M_VAT_Rigid.uasset -------------------------------------------------------------------------------- /Content/Materials/M_VAT_Soft.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Materials/M_VAT_Soft.uasset -------------------------------------------------------------------------------- /Content/Materials/M_VAT_Sprite.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Materials/M_VAT_Sprite.uasset -------------------------------------------------------------------------------- /Content/Python/HoudiniEngineV2/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Python/HoudiniEngineV2/__init__.py -------------------------------------------------------------------------------- /Content/Python/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Python/__init__.py -------------------------------------------------------------------------------- /Content/Test/hda/InputEcho.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Test/hda/InputEcho.hda -------------------------------------------------------------------------------- /Content/Test/hda/TestBox.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Test/hda/TestBox.hda -------------------------------------------------------------------------------- /Content/Test/hda/TestParams.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Test/hda/TestParams.hda -------------------------------------------------------------------------------- /Content/Test/hda/TestPolyReduce.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Test/hda/TestPolyReduce.hda -------------------------------------------------------------------------------- /Content/Textures/icon_houdini_logo_128.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Textures/icon_houdini_logo_128.uasset -------------------------------------------------------------------------------- /Content/Tools/he_sop_boolean.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_boolean.hda -------------------------------------------------------------------------------- /Content/Tools/he_sop_boolean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_boolean.png -------------------------------------------------------------------------------- /Content/Tools/he_sop_curve_instancer.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_curve_instancer.hda -------------------------------------------------------------------------------- /Content/Tools/he_sop_curve_instancer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_curve_instancer.png -------------------------------------------------------------------------------- /Content/Tools/he_sop_polyreduce.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_polyreduce.hda -------------------------------------------------------------------------------- /Content/Tools/he_sop_polyreduce.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/he_sop_polyreduce.png -------------------------------------------------------------------------------- /Content/Tools/rock_generator.hda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/rock_generator.hda -------------------------------------------------------------------------------- /Content/Tools/rock_generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/Tools/rock_generator.png -------------------------------------------------------------------------------- /Content/big_question_mark.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/big_question_mark.uasset -------------------------------------------------------------------------------- /Content/default_reference_static_mesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/default_reference_static_mesh.uasset -------------------------------------------------------------------------------- /Content/default_reference_static_mesh_material.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/default_reference_static_mesh_material.uasset -------------------------------------------------------------------------------- /Content/houdini_bgeo_import.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/houdini_bgeo_import.uasset -------------------------------------------------------------------------------- /Content/houdini_default_material.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/houdini_default_material.uasset -------------------------------------------------------------------------------- /Content/houdini_logo.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/houdini_logo.uasset -------------------------------------------------------------------------------- /Content/houdini_templated_material.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Content/houdini_templated_material.uasset -------------------------------------------------------------------------------- /HoudiniEngine.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion" : 3, 3 | "FriendlyName" : "Houdini Engine v2", 4 | "Version" : 18050759, 5 | "VersionName" : "v2.0 - H18.5.759", 6 | "CreatedBy" : "Side Effects Software Inc.", 7 | "CreatedByURL" : "http://www.sidefx.com", 8 | "DocsURL" : "http://www.sidefx.com/docs/unreal/", 9 | "SupportURL" : "https://www.sidefx.com/bugs/submit/", 10 | "Description" : "Houdini Engine for Unreal Engine (v2).", 11 | "IsBetaVersion" : false, 12 | "Category" : "Rendering", 13 | "EnabledByDefault" : true, 14 | 15 | "Modules" : 16 | [ 17 | { 18 | "Name": "HoudiniEngine", 19 | "Type": "Editor", 20 | "LoadingPhase": "Default" 21 | }, 22 | { 23 | "Name" : "HoudiniEngineEditor", 24 | "Type" : "Editor", 25 | "LoadingPhase" : "PostEngineInit" 26 | }, 27 | { 28 | "Name" : "HoudiniEngineRuntime", 29 | "Type" : "Runtime", 30 | "LoadingPhase" : "Default" 31 | }, 32 | ], 33 | 34 | "CanContainContent" : true, 35 | "Installed": true 36 | } 37 | 38 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2021 3 | Side Effects Software Inc. All rights reserved. 4 | 5 | Redistribution and use of in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, 9 | this list of conditions and the following disclaimer. 10 | 11 | 2. The names Side Effects Software and SideFX may not be used to endorse or 12 | promote products derived from this software without specific prior 13 | written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS 16 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | -------------------------------------------------------------------------------- /Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icon128.png -------------------------------------------------------------------------------- /Resources/Icons/asset_help16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/asset_help16x16.png -------------------------------------------------------------------------------- /Resources/Icons/bake_all16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/bake_all16x16.png -------------------------------------------------------------------------------- /Resources/Icons/bake_selected16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/bake_selected16x16.png -------------------------------------------------------------------------------- /Resources/Icons/clean_temp16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/clean_temp16x16.png -------------------------------------------------------------------------------- /Resources/Icons/cook_all16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/cook_all16x16.png -------------------------------------------------------------------------------- /Resources/Icons/cook_log16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/cook_log16x16.png -------------------------------------------------------------------------------- /Resources/Icons/cook_selected16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/cook_selected16x16.png -------------------------------------------------------------------------------- /Resources/Icons/digital_asset16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/digital_asset16x16.png -------------------------------------------------------------------------------- /Resources/Icons/houdini_digital_asset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/houdini_digital_asset.png -------------------------------------------------------------------------------- /Resources/Icons/houdini_digital_asset_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/houdini_digital_asset_128.png -------------------------------------------------------------------------------- /Resources/Icons/icon_hengine_logo_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_hengine_logo_128.png -------------------------------------------------------------------------------- /Resources/Icons/icon_hengine_logo_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_hengine_logo_16.png -------------------------------------------------------------------------------- /Resources/Icons/icon_hengine_logo_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_hengine_logo_40.png -------------------------------------------------------------------------------- /Resources/Icons/icon_houdini_logo_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_houdini_logo_128.png -------------------------------------------------------------------------------- /Resources/Icons/icon_houdini_logo_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_houdini_logo_16.png -------------------------------------------------------------------------------- /Resources/Icons/icon_houdini_logo_40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/icon_houdini_logo_40.png -------------------------------------------------------------------------------- /Resources/Icons/online_forum16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/online_forum16x16.png -------------------------------------------------------------------------------- /Resources/Icons/online_help16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/online_help16x16.png -------------------------------------------------------------------------------- /Resources/Icons/open_in_houdini16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/open_in_houdini16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pause16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pause16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_cancel16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_cancel16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_dirty_all16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_dirty_all16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_dirty_node16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_dirty_node16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_link16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_link16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_pause16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_pause16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_refresh16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_refresh16x16.png -------------------------------------------------------------------------------- /Resources/Icons/pdg_reset16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/pdg_reset16x16.png -------------------------------------------------------------------------------- /Resources/Icons/rebuild_all16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/rebuild_all16x16.png -------------------------------------------------------------------------------- /Resources/Icons/rebuild_selected16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/rebuild_selected16x16.png -------------------------------------------------------------------------------- /Resources/Icons/refine_all16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/refine_all16x16.png -------------------------------------------------------------------------------- /Resources/Icons/refine_selected16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/refine_selected16x16.png -------------------------------------------------------------------------------- /Resources/Icons/report_bug16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/report_bug16x16.png -------------------------------------------------------------------------------- /Resources/Icons/reset16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/reset16x16.png -------------------------------------------------------------------------------- /Resources/Icons/reset_parameters16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/reset_parameters16x16.png -------------------------------------------------------------------------------- /Resources/Icons/save_to_hip16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/save_to_hip16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_connect16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_connect16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_create16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_create16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_restart16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_restart16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_stop16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_stop16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_sync16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_sync16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_sync_start16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_sync_start16x16.png -------------------------------------------------------------------------------- /Resources/Icons/session_sync_stop16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/session_sync_stop16x16.png -------------------------------------------------------------------------------- /Resources/Icons/sync_unreal16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/sync_unreal16x16.png -------------------------------------------------------------------------------- /Resources/Icons/viewport_sync16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/viewport_sync16x16.png -------------------------------------------------------------------------------- /Resources/Icons/viewport_sync_both16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/viewport_sync_both16x16.png -------------------------------------------------------------------------------- /Resources/Icons/viewport_sync_houdini16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/viewport_sync_houdini16x16.png -------------------------------------------------------------------------------- /Resources/Icons/viewport_sync_off16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/viewport_sync_off16x16.png -------------------------------------------------------------------------------- /Resources/Icons/viewport_sync_unreal16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/Icons/viewport_sync_unreal16x16.png -------------------------------------------------------------------------------- /Resources/hengine_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_banner.png -------------------------------------------------------------------------------- /Resources/hengine_banner_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_banner_d.png -------------------------------------------------------------------------------- /Resources/hengine_logo_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_logo_128.png -------------------------------------------------------------------------------- /Resources/hengine_recook_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_recook_icon.png -------------------------------------------------------------------------------- /Resources/hengine_reload_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_reload_icon.png -------------------------------------------------------------------------------- /Resources/hengine_resetparameters_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sideeffects/HoudiniEngineForUnreal-v2/a3d4f450cff6d6aa0825cda05c3ccbaa8def64d8/Resources/hengine_resetparameters_icon.png -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineOutputStats.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniEngineOutputStats.h" 28 | 29 | FHoudiniEngineOutputStats::FHoudiniEngineOutputStats() 30 | : NumPackagesCreated(0) 31 | , NumPackagesUpdated(0) 32 | { } 33 | 34 | void FHoudiniEngineOutputStats::NotifyPackageCreated(int32 NumCreated) 35 | { 36 | NumPackagesCreated += NumCreated; 37 | } 38 | 39 | void FHoudiniEngineOutputStats::NotifyPackageUpdated(int32 NumUpdated) 40 | { 41 | NumPackagesUpdated += NumUpdated; 42 | } 43 | 44 | void FHoudiniEngineOutputStats::NotifyObjectsCreated(const FString& ObjectTypeName, int32 NumCreated) 45 | { 46 | const int32 Count = OutputObjectsCreated.FindOrAdd(ObjectTypeName, 0); 47 | OutputObjectsCreated[ObjectTypeName] = Count + NumCreated; 48 | } 49 | 50 | void FHoudiniEngineOutputStats::NotifyObjectsUpdated(const FString& ObjectTypeName, int32 NumUpdated) 51 | { 52 | const int32 Count = OutputObjectsUpdated.FindOrAdd(ObjectTypeName, 0); 53 | OutputObjectsUpdated[ObjectTypeName] = Count + NumUpdated; 54 | } 55 | 56 | void FHoudiniEngineOutputStats::NotifyObjectsReplaced(const FString& ObjectTypeName, int32 NumReplaced) 57 | { 58 | const int32 Count = OutputObjectsReplaced.FindOrAdd(ObjectTypeName, 0); 59 | OutputObjectsReplaced[ObjectTypeName] = Count + NumReplaced; 60 | } -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineOutputStats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "UObject/Class.h" 31 | 32 | struct HOUDINIENGINE_API FHoudiniEngineOutputStats 33 | { 34 | FHoudiniEngineOutputStats(); 35 | 36 | int32 NumPackagesCreated; 37 | int32 NumPackagesUpdated; 38 | 39 | // These FStrings should preferably be EHoudiniOutputType enum 40 | // Move the OUtput enums into a separate header to avoid circular dependencies. 41 | TMap OutputObjectsCreated; 42 | TMap OutputObjectsUpdated; 43 | TMap OutputObjectsReplaced; 44 | 45 | void NotifyPackageCreated(int32 NumCreated); 46 | void NotifyPackageUpdated(int32 NumUpdated); 47 | 48 | // Objects created 49 | void NotifyObjectsCreated(const FString& ObjectTypeName, int32 NumCreated); 50 | template 51 | void NotifyObjectsCreated(EnumT EnumValue, int32 NumCreated) 52 | { 53 | NotifyObjectsCreated( UEnum::GetValueAsString(EnumValue), NumCreated ); 54 | } 55 | 56 | // Object updated 57 | void NotifyObjectsUpdated(const FString& ObjectTypeName, int32 NumUpdated); 58 | template 59 | void NotifyObjectsUpdated(EnumT EnumValue, int32 NumUpdated) 60 | { 61 | NotifyObjectsUpdated( UEnum::GetValueAsString(EnumValue), NumUpdated ); 62 | } 63 | 64 | // Objects replaced 65 | void NotifyObjectsReplaced(const FString& ObjectTypeName, int32 NumReplaced); 66 | template 67 | void NotifyObjectsReplaced(EnumT EnumValue, int32 NumReplaced) 68 | { 69 | NotifyObjectsReplaced( UEnum::GetValueAsString(EnumValue), NumReplaced ); 70 | } 71 | }; 72 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include 30 | #include "HoudiniApi.h" 31 | 32 | class FText; 33 | class FString; 34 | class FName; 35 | 36 | class HOUDINIENGINE_API FHoudiniEngineString 37 | { 38 | public: 39 | 40 | FHoudiniEngineString(); 41 | FHoudiniEngineString(int32 InStringId); 42 | FHoudiniEngineString(const FHoudiniEngineString & Other); 43 | 44 | FHoudiniEngineString & operator=(const FHoudiniEngineString & Other); 45 | 46 | bool operator==(const FHoudiniEngineString & Other) const; 47 | bool operator!=(const FHoudiniEngineString & Other) const; 48 | 49 | // Conversion functions 50 | bool ToStdString(std::string & String) const; 51 | bool ToFName(FName & Name) const; 52 | bool ToFString(FString & String) const; 53 | bool ToFText(FText & Text) const; 54 | 55 | // Static converters 56 | static bool ToStdString(const int32& InStringId, std::string & String); 57 | static bool ToFName(const int32& InStringId, FName & Name); 58 | static bool ToFString(const int32& InStringId, FString & String); 59 | static bool ToFText(const int32& InStringId, FText & Text); 60 | 61 | // Array converter, uses a map to avoid redudant calls to HAPI 62 | static bool SHArrayToFStringArray(const TArray& InStringIdArray, TArray& OutStringArray); 63 | 64 | // Array converter, uses string batches and a map to reduce HAPI calls 65 | static bool SHArrayToFStringArray_Batch(const TArray& InStringIdArray, TArray& OutStringArray); 66 | 67 | // Array converter, uses a map to reduce HAPI calls 68 | static bool SHArrayToFStringArray_Singles(const TArray& InStringIdArray, TArray& OutStringArray); 69 | 70 | // Return id of this string. 71 | int32 GetId() const; 72 | 73 | // Return true if this string has a valid id. 74 | bool HasValidId() const; 75 | 76 | protected: 77 | 78 | // Id of the underlying Houdini Engine string. 79 | int32 StringId; 80 | }; 81 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineTask.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniEngineTask.h" 28 | 29 | #include "HoudiniApi.h" 30 | 31 | FHoudiniEngineTask::FHoudiniEngineTask() 32 | : TaskType(EHoudiniEngineTaskType::None) 33 | , ActorName(TEXT("")) 34 | , AssetId(-1) 35 | , bUseOutputNodes(false) 36 | , bOutputTemplateGeos(false) 37 | , AssetLibraryId(-1) 38 | , AssetHapiName(-1) 39 | { 40 | HapiGUID.Invalidate(); 41 | OtherNodeIds.Empty(); 42 | } 43 | 44 | FHoudiniEngineTask::FHoudiniEngineTask(EHoudiniEngineTaskType InTaskType, FGuid InHapiGUID) 45 | : HapiGUID(InHapiGUID) 46 | , TaskType(InTaskType) 47 | , ActorName(TEXT("")) 48 | , AssetId(-1) 49 | , bUseOutputNodes(false) 50 | , bOutputTemplateGeos(false) 51 | , AssetLibraryId(-1) 52 | , AssetHapiName(-1) 53 | { 54 | OtherNodeIds.Empty(); 55 | } 56 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineTask.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniApi.h" 30 | #include "CoreMinimal.h" 31 | #include "Misc/Guid.h" 32 | #include "UObject/WeakObjectPtr.h" 33 | 34 | /* 35 | namespace EHoudiniEngineTaskType 36 | { 37 | enum Type 38 | { 39 | None, 40 | 41 | // This type corresponds to Houdini asset instantiation (without cooking). 42 | AssetInstantiation, 43 | 44 | // This type corresponds to Houdini asset cooking request. 45 | AssetCooking, 46 | 47 | // This type is used for asynchronous asset deletion. 48 | AssetDeletion 49 | }; 50 | } 51 | */ 52 | 53 | UENUM() 54 | enum class EHoudiniEngineTaskType : uint8 55 | { 56 | None, 57 | 58 | // This type corresponds to Houdini asset instantiation (without cooking). 59 | AssetInstantiation, 60 | 61 | // This type corresponds to Houdini asset cooking request. 62 | AssetCooking, 63 | 64 | // This type is used for asynchronous asset deletion. 65 | AssetDeletion, 66 | 67 | // This type is used when processing the results of a sucessful cook 68 | AssetProcess, 69 | }; 70 | 71 | struct HOUDINIENGINE_API FHoudiniEngineTask 72 | { 73 | // Constructors. 74 | FHoudiniEngineTask(); 75 | FHoudiniEngineTask(EHoudiniEngineTaskType InTaskType, FGuid InHapiGUID); 76 | 77 | // GUID of this request. 78 | FGuid HapiGUID; 79 | 80 | // Type of this task. 81 | EHoudiniEngineTaskType TaskType; 82 | 83 | // Houdini asset for instantiation. 84 | TWeakObjectPtr< class UHoudiniAsset > Asset; 85 | 86 | // Name of the actor requesting this task. 87 | FString ActorName; 88 | 89 | // Asset Id. 90 | HAPI_NodeId AssetId; 91 | 92 | // Additional Node Id for the task 93 | // Can be used to apply a task to multiple nodes in the same HDA 94 | TArray OtherNodeIds; 95 | // Cook results for each output node. 96 | TMap CookResults; 97 | 98 | bool bUseOutputNodes; 99 | bool bOutputTemplateGeos; 100 | 101 | // Library Id. 102 | HAPI_AssetLibraryId AssetLibraryId; 103 | 104 | // HAPI name of the asset. 105 | int32 AssetHapiName; 106 | 107 | // Is set to true if component has been loaded. 108 | //bool bLoadedComponent; 109 | }; 110 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineTaskInfo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniEngineTaskInfo.h" 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | 31 | FHoudiniEngineTaskInfo::FHoudiniEngineTaskInfo() 32 | : Result(HAPI_RESULT_SUCCESS) 33 | , AssetId(-1) 34 | , TaskType(EHoudiniEngineTaskType::None) 35 | , TaskState(EHoudiniEngineTaskState::None) 36 | {} 37 | 38 | FHoudiniEngineTaskInfo::FHoudiniEngineTaskInfo( 39 | HAPI_Result InResult, 40 | HAPI_NodeId InAssetId, 41 | EHoudiniEngineTaskType InTaskType, 42 | EHoudiniEngineTaskState InTaskState) 43 | : Result(InResult) 44 | , AssetId(InAssetId) 45 | , TaskType(InTaskType) 46 | , TaskState(InTaskState) 47 | {} -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniEngineTaskInfo.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniEngineTask.h" 30 | 31 | UENUM() 32 | enum class EHoudiniEngineTaskState : uint8 33 | { 34 | None, 35 | 36 | // Indicates the current task is still running 37 | Working, 38 | 39 | // Indicates the task has successfully finished 40 | Success, 41 | 42 | // Indicates the task has finished with non fatal errors 43 | FinishedWithError, 44 | 45 | // Indicates the task has finished with fatal errors and should be terminated 46 | FinishedWithFatalError, 47 | 48 | // Indicates the task has been aborted (unused) 49 | Aborted 50 | }; 51 | 52 | struct HOUDINIENGINE_API FHoudiniEngineTaskInfo 53 | { 54 | // Constructors. 55 | FHoudiniEngineTaskInfo(); 56 | FHoudiniEngineTaskInfo( 57 | HAPI_Result InResult, HAPI_NodeId InAssetId, 58 | EHoudiniEngineTaskType InTaskType, 59 | EHoudiniEngineTaskState InTaskState); 60 | 61 | // Current HAPI result. 62 | HAPI_Result Result; 63 | 64 | // Current Asset Id. 65 | HAPI_NodeId AssetId; 66 | 67 | // Type of task. 68 | EHoudiniEngineTaskType TaskType; 69 | 70 | // Current status. 71 | EHoudiniEngineTaskState TaskState; 72 | 73 | // String used for status / progress bar. 74 | FText StatusText; 75 | 76 | // Is set to true if corresponding task was issued for loaded component. 77 | //bool bLoadedComponent; 78 | }; 79 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniHandleTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | #include "HoudiniApi.h" 31 | 32 | #include "Templates/SharedPointer.h" 33 | 34 | class UHoudiniAssetComponent; 35 | class UHoudiniHandleComponent; 36 | 37 | struct HOUDINIENGINE_API FHoudiniHandleTranslator 38 | { 39 | static bool UpdateHandles(UHoudiniAssetComponent* HAC); 40 | 41 | 42 | static bool BuildAllHandles(const HAPI_NodeId& AssetId, 43 | UHoudiniAssetComponent* OuterObject, 44 | TArray& CurrentHandles, 45 | TArray& NewHandles); 46 | 47 | static void ClearHandles(UHoudiniAssetComponent* HAC); 48 | 49 | static HAPI_RSTOrder GetHapiRSTOrder(const TSharedPtr & StrPtr); 50 | 51 | static HAPI_XYZOrder GetHapiXYZOrder(const TSharedPtr & StrPtr); 52 | 53 | static void UpdateTransformParameters(UHoudiniHandleComponent* HandleComponent); 54 | 55 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/HoudiniPDGImporterMessages.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniPDGImporterMessages.h" 28 | 29 | FHoudiniPDGImportBGEOMessage::FHoudiniPDGImportBGEOMessage() 30 | : FilePath() 31 | , Name() 32 | , TOPNodeId(-1) 33 | , WorkItemId(-1) 34 | { 35 | 36 | } 37 | 38 | FHoudiniPDGImportBGEOMessage::FHoudiniPDGImportBGEOMessage( 39 | const FString& InFilePath, 40 | const FString& InName, 41 | const FHoudiniPackageParams& InPackageParams 42 | ) 43 | : FilePath(InFilePath) 44 | , Name(InName) 45 | , TOPNodeId(-1) 46 | , WorkItemId(-1) 47 | { 48 | SetPackageParams(InPackageParams); 49 | } 50 | 51 | FHoudiniPDGImportBGEOMessage::FHoudiniPDGImportBGEOMessage( 52 | const FString& InFilePath, 53 | const FString& InName, 54 | const FHoudiniPackageParams& InPackageParams, 55 | HAPI_NodeId InTOPNodeId, 56 | HAPI_PDG_WorkitemId InWorkItemId 57 | ) 58 | : FilePath(InFilePath) 59 | , Name(InName) 60 | , TOPNodeId(InTOPNodeId) 61 | , WorkItemId(InWorkItemId) 62 | { 63 | SetPackageParams(InPackageParams); 64 | } 65 | 66 | void FHoudiniPDGImportBGEOMessage::SetPackageParams(const FHoudiniPackageParams& InPackageParams) 67 | { 68 | PackageParams = InPackageParams; 69 | PackageParams.OuterPackage = nullptr; 70 | } 71 | 72 | void FHoudiniPDGImportBGEOMessage::PopulatePackageParams(FHoudiniPackageParams& OutPackageParams) const 73 | { 74 | UObject* KeepOuter = OutPackageParams.OuterPackage; 75 | OutPackageParams = PackageParams; 76 | OutPackageParams.OuterPackage = KeepOuter; 77 | } 78 | 79 | FHoudiniPDGImportBGEOResultMessage::FHoudiniPDGImportBGEOResultMessage() 80 | : ImportResult(EHoudiniPDGImportBGEOResult::HPIBR_Failed) 81 | { 82 | 83 | } 84 | 85 | FHoudiniPDGImportBGEOResultMessage::FHoudiniPDGImportBGEOResultMessage( 86 | const FString& InFilePath, 87 | const FString& InName, 88 | const FHoudiniPackageParams& InPackageParams, 89 | const EHoudiniPDGImportBGEOResult& InImportResult 90 | ) 91 | : FHoudiniPDGImportBGEOMessage(InFilePath, InName, InPackageParams) 92 | , ImportResult(InImportResult) 93 | { 94 | } 95 | 96 | FHoudiniPDGImportBGEODiscoverMessage::FHoudiniPDGImportBGEODiscoverMessage() 97 | : CommandletGuid() 98 | { 99 | 100 | } 101 | 102 | FHoudiniPDGImportBGEODiscoverMessage::FHoudiniPDGImportBGEODiscoverMessage(const FGuid& InCommandletGuid) 103 | : CommandletGuid(InCommandletGuid) 104 | { 105 | 106 | } 107 | 108 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/SAssetSelectionWidget.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #if WITH_EDITOR 30 | 31 | #include "CoreMinimal.h" 32 | //#include "Misc/Attribute.h" 33 | 34 | #include "Widgets/SWidget.h" 35 | #include "Widgets/SCompoundWidget.h" 36 | #include "Widgets/SWindow.h" 37 | #include "Widgets/DeclarativeSyntaxSupport.h" 38 | 39 | #include "HAPI/HAPI_Common.h" 40 | 41 | /** Slate widget used to pick an asset to instantiate from an HDA with multiple assets inside. **/ 42 | class SAssetSelectionWidget : public SCompoundWidget 43 | { 44 | public: 45 | SLATE_BEGIN_ARGS(SAssetSelectionWidget) 46 | : _WidgetWindow(), _AvailableAssetNames() 47 | {} 48 | 49 | SLATE_ARGUMENT(TSharedPtr, WidgetWindow) 50 | SLATE_ARGUMENT(TArray< HAPI_StringHandle >, AvailableAssetNames) 51 | SLATE_END_ARGS() 52 | 53 | public: 54 | 55 | SAssetSelectionWidget(); 56 | 57 | public: 58 | 59 | /** Widget construct. **/ 60 | void Construct(const FArguments & InArgs); 61 | 62 | /** Return true if cancel button has been pressed. **/ 63 | bool IsCancelled() const; 64 | 65 | /** Return true if constructed widget is valid. **/ 66 | bool IsValidWidget() const; 67 | 68 | /** Return selected asset name. **/ 69 | int32 GetSelectedAssetName() const; 70 | 71 | protected: 72 | 73 | /** Called when Ok button is pressed. **/ 74 | FReply OnButtonOk(); 75 | 76 | /** Called when Cancel button is pressed. **/ 77 | FReply OnButtonCancel(); 78 | 79 | /** Called when user picks an asset. **/ 80 | FReply OnButtonAssetPick(int32 AssetName); 81 | 82 | protected: 83 | 84 | /** Parent widget window. **/ 85 | TWeakPtr< SWindow > WidgetWindow; 86 | 87 | /** List of available Houdini Engine asset names. **/ 88 | TArray< HAPI_StringHandle > AvailableAssetNames; 89 | 90 | /** Selected asset name. **/ 91 | int32 SelectedAssetName; 92 | 93 | /** Is set to true if constructed widget is valid. **/ 94 | bool bIsValidWidget; 95 | 96 | /** Is set to true if selection process has been cancelled. **/ 97 | bool bIsCancelled; 98 | }; 99 | 100 | #endif -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/Tests/HoudiniCoreTests.cpp: -------------------------------------------------------------------------------- 1 | #include "../HoudiniEngine.h" 2 | #include "Misc/AutomationTest.h" 3 | 4 | #if WITH_DEV_AUTOMATION_TESTS 5 | 6 | IMPLEMENT_SIMPLE_AUTOMATION_TEST(HoudiniCoreTest, "Houdini.Core.TestAutomation", EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) 7 | 8 | bool HoudiniCoreTest::RunTest(const FString & Parameters) 9 | { 10 | return true; 11 | } 12 | 13 | #endif -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/Tests/HoudiniCoreTests.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #if WITH_DEV_AUTOMATION_TESTS 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #endif 7 | 8 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/UnrealBrushTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | #include "UObject/NameTypes.h" 31 | 32 | class ABrush; 33 | class AActor; 34 | class UModel; 35 | class UHoudiniInputBrush; 36 | class ABrush; 37 | class AActor; 38 | 39 | struct HOUDINIENGINE_API FUnrealBrushTranslator 40 | { 41 | public: 42 | static bool CreateInputNodeForBrush( 43 | UHoudiniInputBrush* InputBrushObject, 44 | ABrush* BrushActor, 45 | const TArray* ExcludeActors, 46 | HAPI_NodeId &CreatedNodeId, 47 | const FString& NodeName 48 | ); 49 | 50 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/UnrealFoliageTypeTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | 31 | #include "CoreMinimal.h" 32 | #include "UObject/ObjectMacros.h" 33 | 34 | #include "UnrealMeshTranslator.h" 35 | 36 | class UFoliageType; 37 | class UFoliageType_InstancedStaticMesh; 38 | class UStaticMeshComponent; 39 | 40 | struct HOUDINIENGINE_API FUnrealFoliageTypeTranslator : public FUnrealMeshTranslator 41 | { 42 | public: 43 | // HAPI : Marshaling, extract geometry and create input asset for it - return true on success 44 | static bool HapiCreateInputNodeForFoliageType_InstancedStaticMesh( 45 | UFoliageType_InstancedStaticMesh* InFoliageType, 46 | HAPI_NodeId& InputObjectNodeId, 47 | const FString& InputNodeName, 48 | const bool& ExportAllLODs = false, 49 | const bool& ExportSockets = false, 50 | const bool& ExportColliders = false); 51 | 52 | // Create an input node that references the asset via InRef (unreal_instance). 53 | // Also calls CreateHoudiniFoliageTypeAttributes, to create the unreal_foliage attribute, as well as 54 | // unreal_uproperty_ attributes for the foliage type settings. 55 | static bool CreateInputNodeForReference( 56 | UFoliageType* InFoliageType, 57 | HAPI_NodeId& InInputNodeId, 58 | const FString& InRef, 59 | const FString& InInputNodeName, 60 | const FTransform& InTransform, 61 | const bool& bImportAsReferenceRotScaleEnabled); 62 | 63 | protected: 64 | // Creates the unreal_foliage and unreal_uproperty_ attributes for the foliage type. 65 | static bool CreateHoudiniFoliageTypeAttributes( 66 | UFoliageType* InFoliageType, const int32& InNodeId, const int32& InPartId, HAPI_AttributeOwner InAttributeOwner); 67 | }; 68 | -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/UnrealInstanceTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | 31 | #include "CoreMinimal.h" 32 | #include "UObject/ObjectMacros.h" 33 | 34 | class UInstancedStaticMeshComponent; 35 | 36 | struct HOUDINIENGINE_API FUnrealInstanceTranslator 37 | { 38 | public: 39 | 40 | // HAPI : Marshaling, extract geometry and create input asset for it - return true on success 41 | static bool HapiCreateInputNodeForInstancer( 42 | UInstancedStaticMeshComponent* ISMC, 43 | const FString& InNodeName, 44 | HAPI_NodeId& OutCreatedNodeId, 45 | const bool& bExportLODs, 46 | const bool& bExportSockets, 47 | const bool& bExportColliders, 48 | const bool& bExportAsAttributeInstancer); 49 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngine/Private/UnrealSplineTranslator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HAPI/HAPI_Common.h" 30 | #include "UObject/NameTypes.h" 31 | 32 | class USplineComponent; 33 | 34 | struct HOUDINIENGINE_API FUnrealSplineTranslator 35 | { 36 | public: 37 | static bool CreateInputNodeForSplineComponent(USplineComponent* SplineComponent, const float& SplineResolution, HAPI_NodeId &CreatedInputNodeId, const FString& NodeName); 38 | 39 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngine/Public/HAPI/HAPI_Version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc.* 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy* of this software and associated documentation files (the "Software"), to deal* in the Software without restriction, including without limitation the rights* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell* copies of the Software, and to permit persons to whom the Software is* furnished to do so, subject to the following conditions:** The above copyright notice and this permission notice shall be included in all* copies or substantial portions of the Software.** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE* SOFTWARE. * 4 | * Produced by: 5 | * Side Effects Software Inc 6 | * 123 Front Street West, Suite 1401 7 | * Toronto, Ontario 8 | * Canada M5J 2M2 9 | * 416-504-9876 10 | * 11 | * COMMENTS: 12 | * Generated version information to be used when linking for 13 | * sanity checks. 14 | */ 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // WARNING! This file is GENERATED by UNREAL_Version.py script. 19 | // DO NOT modify manually or commit to the repository! 20 | ///////////////////////////////////////////////////////////////////////////// 21 | ///////////////////////////////////////////////////////////////////////////// 22 | 23 | #ifndef __HAPI_VERSION_h__ 24 | #define __HAPI_VERSION_h__ 25 | 26 | // The three components of the Houdini version that HAPI is 27 | // expecting to compile against. 28 | #define HAPI_VERSION_HOUDINI_MAJOR 18 29 | #define HAPI_VERSION_HOUDINI_MINOR 5 30 | #define HAPI_VERSION_HOUDINI_BUILD 759 31 | #define HAPI_VERSION_HOUDINI_PATCH 0 32 | 33 | // The two components of the Houdini Engine (marketed) version. 34 | #define HAPI_VERSION_HOUDINI_ENGINE_MAJOR 3 35 | #define HAPI_VERSION_HOUDINI_ENGINE_MINOR 7 36 | 37 | // This is a monotonously increasing API version number that can be used 38 | // to lock against a certain API for compatibility purposes. Basically, 39 | // when this number changes code compiled against the HAPI.h methods 40 | // might no longer compile. Semantic changes to the methods will also 41 | // cause this version to increase. This number will be reset to 0 42 | // every time the Houdini Engine version is bumped. 43 | #define HAPI_VERSION_HOUDINI_ENGINE_API 3 44 | 45 | #endif // __HAPI_VERSION_h__ 46 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniAssetActorFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "ActorFactories/ActorFactory.h" 30 | #include "HoudiniAssetActorFactory.generated.h" 31 | 32 | class FText; 33 | class AActor; 34 | class UObject; 35 | class UHoudiniAssetComponent; 36 | 37 | struct FAssetData; 38 | 39 | UCLASS(config = Editor) 40 | class UHoudiniAssetActorFactory : public UActorFactory 41 | { 42 | GENERATED_UCLASS_BODY() 43 | 44 | public: 45 | // UActorFactory methods: 46 | // Return true if Actor can be created from a given asset. 47 | virtual bool CanCreateActorFrom(const FAssetData & AssetData, FText & OutErrorMsg) override; 48 | // Given an instance of an actor pertaining to this factory, find the asset that should be used to create a new actor. 49 | virtual UObject * GetAssetFromActorInstance(AActor * Instance) override; 50 | // Modify the actor after it has been spawned. 51 | virtual void PostSpawnActor(UObject * Asset, AActor * NewActor) override; 52 | // Called after a blueprint is created by this factory to update the blueprint's CDO properties 53 | // with state from the asset for this factory. 54 | virtual void PostCreateBlueprint(UObject * Asset, AActor * CDO) override; 55 | 56 | protected: 57 | bool AddHoudiniLogoToComponent(UHoudiniAssetComponent* HAC); 58 | }; 59 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniAssetBroker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniAssetBroker.h" 28 | 29 | #include "HoudiniAssetComponent.h" 30 | #include "HoudiniAsset.h" 31 | 32 | #define LOCTEXT_NAMESPACE HOUDINI_LOCTEXT_NAMESPACE 33 | 34 | FHoudiniAssetBroker::~FHoudiniAssetBroker() 35 | { 36 | 37 | } 38 | 39 | UClass * 40 | FHoudiniAssetBroker::GetSupportedAssetClass() 41 | { 42 | return UHoudiniAsset::StaticClass(); 43 | } 44 | 45 | bool 46 | FHoudiniAssetBroker::AssignAssetToComponent(UActorComponent * InComponent, UObject * InAsset) 47 | { 48 | if (UHoudiniAssetComponent * HoudiniAssetComponent = Cast< UHoudiniAssetComponent >(InComponent)) 49 | { 50 | UHoudiniAsset * HoudiniAsset = Cast< UHoudiniAsset >(InAsset); 51 | if (HoudiniAsset || !InAsset) 52 | { 53 | HoudiniAssetComponent->SetHoudiniAsset(HoudiniAsset); 54 | return true; 55 | } 56 | } 57 | 58 | return false; 59 | } 60 | 61 | UObject * 62 | FHoudiniAssetBroker::GetAssetFromComponent(UActorComponent * InComponent) 63 | { 64 | if (UHoudiniAssetComponent * HoudiniAssetComponent = Cast< UHoudiniAssetComponent >(InComponent)) 65 | { 66 | return HoudiniAssetComponent->GetHoudiniAsset(); 67 | } 68 | 69 | return nullptr; 70 | } 71 | 72 | #undef LOCTEXT_NAMESPACE -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniAssetBroker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "ComponentAssetBroker.h" 30 | 31 | class UObject; 32 | class UActorComponent; 33 | 34 | class FHoudiniAssetBroker : public IComponentAssetBroker 35 | { 36 | public: 37 | 38 | virtual ~FHoudiniAssetBroker(); 39 | 40 | // IComponentAssetBroker methods. 41 | // Reports the asset class this broker knows how to handle. 42 | UClass * GetSupportedAssetClass() override; 43 | 44 | // Assign the assigned asset to the supplied component. 45 | bool AssignAssetToComponent(UActorComponent * InComponent, UObject * InAsset) override; 46 | 47 | // Get the currently assigned asset from the component. 48 | UObject * GetAssetFromComponent(UActorComponent * InComponent) override; 49 | }; 50 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniAssetComponentDetails.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "IDetailCustomization.h" 31 | #include "HoudiniPDGDetails.h" 32 | #include "HoudiniOutputDetails.h" 33 | #include "HoudiniParameterDetails.h" 34 | #include "HoudiniEngineDetails.h" 35 | 36 | class UHoudiniAssetComponent; 37 | class UStaticMesh; 38 | 39 | class FHoudiniAssetComponentDetails : public IDetailCustomization 40 | { 41 | public: 42 | 43 | // Constructor. 44 | FHoudiniAssetComponentDetails(); 45 | 46 | // Destructor. 47 | virtual ~FHoudiniAssetComponentDetails(); 48 | 49 | // IDetailCustomization methods. 50 | virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override; 51 | 52 | // Create an instance of this detail layout class. 53 | static TSharedRef MakeInstance(); 54 | 55 | // Adds a text row that indicate the status of the Houdini Session 56 | static void AddSessionStatusRow(IDetailCategoryBuilder& InCategory); 57 | 58 | static bool GetSessionStatusAndColor(FString& OutStatusString, FLinearColor& OutStatusColor); 59 | 60 | private: 61 | 62 | // Adds a text row indicate we're using a Houdini indie license 63 | void AddIndieLicenseRow(IDetailCategoryBuilder& InCategory); 64 | 65 | // Adds a category for baking options 66 | void AddBakeMenu(IDetailCategoryBuilder& InCategory, UHoudiniAssetComponent* HAC); 67 | 68 | // Handler for double clicking the static mesh thumbnail, opens the editor. 69 | FReply OnThumbnailDoubleClick( 70 | const FGeometry& InMyGeometry, const FPointerEvent& InMouseEvent, UObject* Object); 71 | 72 | 73 | private: 74 | 75 | // Components which are being customized. 76 | TArray> HoudiniAssetComponents; 77 | 78 | // Structure holding the output's details 79 | TSharedPtr OutputDetails; 80 | 81 | // Structure holding the parameter's details 82 | TSharedPtr ParameterDetails; 83 | 84 | // Structure holding the PDG Asset Link's details 85 | TSharedPtr PDGDetails; 86 | 87 | // Structure holding the HoudiniAsset details 88 | TSharedPtr HoudiniEngineDetails; 89 | 90 | 91 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniAssetFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "EditorReimportHandler.h" 30 | #include "Factories/Factory.h" 31 | #include "HoudiniAssetFactory.generated.h" 32 | 33 | class UClass; 34 | class UObject; 35 | class FFeedbackContext; 36 | 37 | UCLASS(config = Editor) 38 | class UHoudiniAssetFactory : public UFactory, public FReimportHandler 39 | { 40 | GENERATED_UCLASS_BODY() 41 | 42 | public: 43 | 44 | // UFactory methods. 45 | // return true if it supports this class 46 | virtual bool DoesSupportClass(UClass * Class) override; 47 | 48 | // Returns the name of the factory for menus 49 | virtual FText GetDisplayName() const override; 50 | 51 | // Create a new object by importing it from a binary buffer. 52 | virtual UObject * FactoryCreateBinary( 53 | UClass * InClass, UObject * InParent, FName InName, EObjectFlags Flags, 54 | UObject * Context, const TCHAR * Type, const uint8 *& Buffer, const uint8 * BufferEnd, 55 | FFeedbackContext * Warn) override; 56 | 57 | // Create a new object by importing it from a file name. 58 | virtual UObject* FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, 59 | EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, 60 | FFeedbackContext* Warn, bool& bOutOperationCanceled) override; 61 | 62 | // FReimportHandler methods. 63 | // Check to see if we have a handler to manage the reimporting of the object 64 | virtual bool CanReimport(UObject * Obj, TArray< FString > & OutFilenames) override; 65 | 66 | // Sets the reimport path(s) for the specified object 67 | virtual void SetReimportPaths(UObject * Obj, const TArray< FString > & NewReimportPaths) override; 68 | 69 | // Attempt to reimport the specified object from its source 70 | virtual EReimportResult::Type Reimport(UObject * Obj) override; 71 | }; 72 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniEngineStyle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "Styling/SlateStyle.h" 30 | 31 | class FHoudiniEngineStyle 32 | { 33 | public: 34 | static void Initialize(); 35 | static void Shutdown(); 36 | static TSharedPtr Get(); 37 | static FName GetStyleSetName(); 38 | 39 | private: 40 | //static FString InContent(const FString &RelativePath, const ANSICHAR *Extension); 41 | static TSharedPtr StyleSet; 42 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniGeoFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "EditorReimportHandler.h" 30 | #include "Factories/Factory.h" 31 | #include "HoudiniGeoFactory.generated.h" 32 | 33 | class UClass; 34 | class UObject; 35 | class FFeedbackContext; 36 | 37 | UCLASS(config = Editor) 38 | class UHoudiniGeoFactory : public UFactory, public FReimportHandler 39 | { 40 | GENERATED_UCLASS_BODY() 41 | 42 | public: 43 | 44 | // 45 | // UFactory Interface 46 | // 47 | // Returns the name of the factory for menus 48 | virtual FText GetDisplayName() const override; 49 | // return true if it supports this class 50 | virtual bool DoesSupportClass(UClass * Class) override; 51 | // 52 | virtual UClass* ResolveSupportedClass() override; 53 | // 54 | //virtual UClass* ResolveSupportedClass() override; 55 | // Return true if we can import the file 56 | virtual bool FactoryCanImport(const FString& Filename) override; 57 | 58 | // Create a new object by importing it from a file name. 59 | virtual UObject* FactoryCreateFile(UClass* InClass, UObject* InParent, FName InName, 60 | EObjectFlags Flags, const FString& Filename, const TCHAR* Parms, 61 | FFeedbackContext* Warn, bool& bOutOperationCanceled) override; 62 | 63 | // 64 | // FReimportHandler Interface 65 | // 66 | UObject* Import(UClass* InClass, UPackage* OuterObject, const FString & FileName, const FString & AbsoluteFilePath, EObjectFlags Flags, const bool& bReimport); 67 | 68 | // Check to see if we have a handler to manage the reimporting of the object 69 | virtual bool CanReimport(UObject * Obj, TArray< FString > & OutFilenames) override; 70 | 71 | // Sets the reimport path(s) for the specified object 72 | virtual void SetReimportPaths(UObject * Obj, const TArray< FString > & NewReimportPaths) override; 73 | // Attempt to reimport the specified object from its source 74 | virtual EReimportResult::Type Reimport(UObject * Obj) override; 75 | 76 | //void ShowImportOptionsWindow(TSharedPtr& Options, FString FilePath, const UHoudiniGeoImporter& Importer); 77 | 78 | virtual int32 GetPriority() const override; 79 | 80 | // 81 | // 82 | // 83 | }; 84 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniHandleDetails.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "DetailWidgetRow.h" 31 | 32 | class UHoudiniHandleComponent; 33 | class IDetailCategoryBuilder; 34 | enum class EHoudiniHandleType : uint8; 35 | 36 | class FHoudiniHandleDetails : public TSharedFromThis 37 | { 38 | public: 39 | static void CreateWidget(IDetailCategoryBuilder & HouHandleCategory, TArray &InHandles); 40 | 41 | static void CreateNameWidget(FDetailWidgetRow& Row); 42 | 43 | static FString GetHandleTypeString(const EHoudiniHandleType& HandleType); 44 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniPublicAPIBlueprintLib.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniPublicAPIBlueprintLib.h" 28 | #include "HoudiniPublicAPI.h" 29 | 30 | 31 | UHoudiniPublicAPIBlueprintLib::UHoudiniPublicAPIBlueprintLib(class FObjectInitializer const & ObjectInitializer) 32 | : Super(ObjectInitializer) 33 | { 34 | } 35 | 36 | UHoudiniPublicAPI* UHoudiniPublicAPIBlueprintLib::GetAPI() 37 | { 38 | static UHoudiniPublicAPI* Obj = NewObject(GetTransientPackage(), NAME_None, RF_MarkAsRootSet); 39 | return Obj; 40 | } 41 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniPublicAPIObjectBase.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniPublicAPIObjectBase.h" 28 | #include "HoudiniEngineRuntimePrivatePCH.h" 29 | 30 | UHoudiniPublicAPIObjectBase::UHoudiniPublicAPIObjectBase() 31 | : LastErrorMessage() 32 | , bHasError(false) 33 | , bIsLoggingErrors(true) 34 | { 35 | 36 | } 37 | 38 | bool 39 | UHoudiniPublicAPIObjectBase::GetLastErrorMessage_Implementation(FString& OutLastErrorMessage) const 40 | { 41 | if (!bHasError) 42 | { 43 | OutLastErrorMessage = FString(); 44 | return false; 45 | } 46 | 47 | OutLastErrorMessage = LastErrorMessage; 48 | return true; 49 | } 50 | 51 | void 52 | UHoudiniPublicAPIObjectBase::ClearErrorMessages_Implementation() 53 | { 54 | LastErrorMessage = FString(); 55 | bHasError = false; 56 | } 57 | 58 | void 59 | UHoudiniPublicAPIObjectBase::SetErrorMessage_Implementation( 60 | const FString& InErrorMessage, 61 | const EHoudiniPublicAPIErrorLogOption InLoggingOption) const 62 | { 63 | LastErrorMessage = InErrorMessage; 64 | bHasError = true; 65 | switch (InLoggingOption) 66 | { 67 | case EHoudiniPublicAPIErrorLogOption::Invalid: 68 | case EHoudiniPublicAPIErrorLogOption::Auto: 69 | case EHoudiniPublicAPIErrorLogOption::Log: 70 | { 71 | static const FString Prefix = TEXT("[HoudiniEngine:PublicAPI]"); 72 | HOUDINI_LOG_WARNING(TEXT("%s %s"), *Prefix, *InErrorMessage); 73 | break; 74 | } 75 | case EHoudiniPublicAPIErrorLogOption::NoLog: 76 | // Don't log 77 | break; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniPublicAPIOutputTypes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniPublicAPIOutputTypes.h" 28 | 29 | #include "HoudiniOutput.h" 30 | 31 | FHoudiniPublicAPIOutputObjectIdentifier::FHoudiniPublicAPIOutputObjectIdentifier() 32 | : SplitIdentifier() 33 | , PartName() 34 | , ObjectId(-1) 35 | , GeoId(-1) 36 | , PartId(-1) 37 | 38 | , PrimitiveIndex(-1) 39 | , PointIndex(-1) 40 | , bLoaded(false) 41 | { 42 | } 43 | 44 | FHoudiniPublicAPIOutputObjectIdentifier::FHoudiniPublicAPIOutputObjectIdentifier(const FHoudiniOutputObjectIdentifier& InIdentifier) 45 | : SplitIdentifier() 46 | , PartName() 47 | { 48 | SetIdentifier(InIdentifier); 49 | } 50 | 51 | void 52 | FHoudiniPublicAPIOutputObjectIdentifier::SetIdentifier(const FHoudiniOutputObjectIdentifier& InIdentifier) 53 | { 54 | ObjectId = InIdentifier.ObjectId; 55 | GeoId = InIdentifier.GeoId; 56 | PartId = InIdentifier.PartId; 57 | SplitIdentifier = InIdentifier.SplitIdentifier; 58 | PartName = InIdentifier.PartName; 59 | PrimitiveIndex = InIdentifier.PrimitiveIndex; 60 | PointIndex = InIdentifier.PointIndex; 61 | bLoaded = InIdentifier.bLoaded; 62 | } 63 | 64 | /** Returns the internal output object identifier wrapped by this class. */ 65 | FHoudiniOutputObjectIdentifier 66 | FHoudiniPublicAPIOutputObjectIdentifier::GetIdentifier() const 67 | { 68 | FHoudiniOutputObjectIdentifier Identifier; 69 | Identifier.ObjectId = ObjectId; 70 | Identifier.GeoId = GeoId; 71 | Identifier.PartId = PartId; 72 | Identifier.SplitIdentifier = SplitIdentifier; 73 | Identifier.PartName = PartName; 74 | Identifier.PrimitiveIndex = PrimitiveIndex; 75 | Identifier.PointIndex = PointIndex; 76 | Identifier.bLoaded = bLoaded; 77 | 78 | return Identifier; 79 | } 80 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniRuntimeSettingsDetails.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "DetailCategoryBuilder.h" 30 | #include "IDetailCustomization.h" 31 | 32 | class FHoudiniRuntimeSettingsDetails : public IDetailCustomization 33 | { 34 | public: 35 | 36 | /** Constructor. **/ 37 | FHoudiniRuntimeSettingsDetails(); 38 | 39 | /** Destructor. **/ 40 | virtual ~FHoudiniRuntimeSettingsDetails(); 41 | 42 | /** IDetailCustomization methods. **/ 43 | public: 44 | 45 | virtual void CustomizeDetails(IDetailLayoutBuilder & DetailBuilder) override; 46 | 47 | public: 48 | 49 | /** Create an instance of this detail layout class. **/ 50 | static TSharedRef< IDetailCustomization > MakeInstance(); 51 | 52 | protected: 53 | 54 | /** Used to create Houdini version entry. **/ 55 | void CreateHoudiniEntry( 56 | const FText & EntryName, IDetailCategoryBuilder & DetailCategoryBuilder, 57 | int32 VersionMajor, int32 VersionMinor, int32 VersionBuild, int32 VersionPatch); 58 | 59 | /** Used to create Houdini Engine version entry. **/ 60 | void CreateHoudiniEngineEntry( 61 | const FText & EntryName, IDetailCategoryBuilder & DetailCategoryBuilder, 62 | int32 VersionMajor, int32 VersionMinor, int32 VersionApi); 63 | 64 | /** Used to create libHAPI dynamic library path entry. **/ 65 | void CreateHAPILibraryPathEntry( 66 | const FString & LibHAPIPath, IDetailCategoryBuilder & DetailCategoryBuilder); 67 | 68 | /** Used to create libHAPI license information entry. **/ 69 | void CreateHAPILicenseEntry( 70 | const FString & LibHAPILicense, IDetailCategoryBuilder & DetailCategoryBuilder); 71 | }; 72 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniTool.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/HoudiniTool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | UENUM() 30 | enum class EHoudiniToolType : uint8 31 | { 32 | // For tools that generates geometry, and do not need input 33 | HTOOLTYPE_GENERATOR UMETA(DisplayName = "Generator"), 34 | 35 | // For tools that have a single input, the selection will be merged in that single input 36 | HTOOLTYPE_OPERATOR_SINGLE UMETA(DisplayName = "Operator (single)"), 37 | 38 | // For Tools that have multiple input, a single selected asset will be applied to each input 39 | HTOOLTYPE_OPERATOR_MULTI UMETA(DisplayName = "Operator (multiple)"), 40 | 41 | // For tools that needs to be applied each time for each single selected 42 | HTOOLTYPE_OPERATOR_BATCH UMETA(DisplayName = "Batch Operator") 43 | }; 44 | 45 | UENUM() 46 | enum class EHoudiniToolSelectionType : uint8 47 | { 48 | // For tools that can be applied both to Content Browser and World selection 49 | HTOOL_SELECTION_ALL UMETA(DisplayName = "Content Browser AND World"), 50 | 51 | // For tools that can be applied only to World selection 52 | HTOOL_SELECTION_WORLD_ONLY UMETA(DisplayName = "World selection only"), 53 | 54 | // For tools that can be applied only to Content Browser selection 55 | HTOOL_SELECTION_CB_ONLY UMETA(DisplayName = "Content browser selection only") 56 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/Tests/HoudiniEditorTestUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if WITH_DEV_AUTOMATION_TESTS 4 | 5 | #include "CoreMinimal.h" 6 | 7 | class UHoudiniAssetComponent; 8 | class ULevel; 9 | class SWindow; 10 | 11 | class FHoudiniEditorTestUtils 12 | { 13 | public: 14 | enum EEditorScreenshotType 15 | { 16 | ENTIRE_EDITOR, 17 | ACTIVE_WINDOW, // Gets the active window. Probably never use this. 18 | DETAILS_WINDOW, 19 | VIEWPORT 20 | }; 21 | 22 | static void InitializeTests(FAutomationTestBase* Test); 23 | 24 | static UObject* FindAssetUObject(FAutomationTestBase* Test, const FName AssetUObjectPath); 25 | 26 | static UHoudiniAssetComponent* InstantiateAsset(FAutomationTestBase* Test, const FName AssetUObjectPath, TFunction OnFinishInstantiate, const bool ErrorOnFail = true); 27 | 28 | static void TakeScreenshotEditor(FAutomationTestBase* Test, const FString ScreenshotName, const EEditorScreenshotType EditorScreenshotType, const FVector2D Size); 29 | 30 | static void TakeScreenshotViewport(FAutomationTestBase* Test, const FString ScreenshotName); 31 | 32 | static void SetUseLessCPUInTheBackground(); 33 | 34 | static TSharedPtr GetMainFrameWindow(); 35 | 36 | static TSharedPtr GetActiveTopLevelWindow(); 37 | 38 | static TSharedPtr CreateNewDetailsWindow(); 39 | 40 | static TSharedPtr CreateViewportWindow(); 41 | 42 | static const FVector2D GDefaultEditorSize; 43 | 44 | private: 45 | static void WaitForScreenshotAndCopy(FAutomationTestBase* Test, FString BaseName, TFunction OnScreenshotGenerated); 46 | 47 | static void CopyScreenshotToTestFolder(FAutomationTestBase* Test, FString BaseName); 48 | 49 | static FString GetTestDirectory(); 50 | 51 | static FString GetUnrealTestDirectory(); 52 | 53 | static FString FormatScreenshotOutputName(FString BaseName); 54 | 55 | static void ForceRefreshViewport(); 56 | }; 57 | 58 | #endif -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/Tests/HoudiniEditorTests.cpp: -------------------------------------------------------------------------------- 1 | #include "HoudiniEditorTests.h" 2 | 3 | 4 | #if WITH_DEV_AUTOMATION_TESTS 5 | #include "HoudiniEditorTestUtils.h" 6 | 7 | #include "Core/Public/HAL/FileManager.h" 8 | #include "Misc/AutomationTest.h" 9 | #include "HoudiniAssetComponent.h" 10 | 11 | 12 | IMPLEMENT_SIMPLE_AUTOMATION_TEST(HoudiniEditorEvergreenTest, "Houdini.Editor.EvergreenScreenshots", EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) 13 | 14 | bool HoudiniEditorEvergreenTest::RunTest(const FString & Parameters) 15 | { 16 | // Really force editor size 17 | // TODO: Move to HoudiniEditorUtils 18 | FHoudiniEditorTestUtils::InitializeTests(this); 19 | 20 | FHoudiniEditorTestUtils::InstantiateAsset(this, TEXT("/Game/TestHDAs/Evergreen"), 21 | [=](UHoudiniAssetComponent * HAC, const bool IsSuccessful) 22 | { 23 | FHoudiniEditorTestUtils::TakeScreenshotEditor(this, "EverGreen_EntireEditor.png", FHoudiniEditorTestUtils::ENTIRE_EDITOR, FHoudiniEditorTestUtils::GDefaultEditorSize); 24 | FHoudiniEditorTestUtils::TakeScreenshotEditor(this, "EverGreen_Details.png", FHoudiniEditorTestUtils::DETAILS_WINDOW, FVector2D(400, 1130)); 25 | FHoudiniEditorTestUtils::TakeScreenshotEditor(this, "EverGreen_EditorViewport.png", FHoudiniEditorTestUtils::VIEWPORT, FVector2D(640, 360)); 26 | //FHoudiniEditorTestUtils::TakeScreenshotViewport(this, "EverGreen_Viewport.png"); // Viewport resolution might be inconsisent 27 | }); 28 | return true; 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Private/Tests/HoudiniEditorTests.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #if WITH_DEV_AUTOMATION_TESTS 3 | 4 | #include "CoreMinimal.h" 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Public/HoudiniPublicAPIBlueprintLib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "Kismet/BlueprintFunctionLibrary.h" 31 | 32 | #include "HoudiniPublicAPIBlueprintLib.generated.h" 33 | 34 | class UHoudiniPublicAPI; 35 | 36 | /** 37 | * Houdini Public API Blueprint function library 38 | */ 39 | UCLASS(Category="Houdini Engine|Public API") 40 | class HOUDINIENGINEEDITOR_API UHoudiniPublicAPIBlueprintLib : public UBlueprintFunctionLibrary 41 | { 42 | GENERATED_UCLASS_BODY() 43 | 44 | public: 45 | /** Returns the Houdini Public API instance. */ 46 | UFUNCTION(BlueprintPure, meta = (DisplayName = "GetHoudiniEnginePublicAPI"), Category = "Houdini Engine") 47 | static UHoudiniPublicAPI* GetAPI(); 48 | }; 49 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Public/HoudiniPublicAPIOutputTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2018> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | 31 | #include "HoudiniEngineRuntimeCommon.h" 32 | 33 | #include "HoudiniPublicAPIOutputTypes.generated.h" 34 | 35 | 36 | struct FHoudiniOutputObjectIdentifier; 37 | 38 | /** 39 | * This class represents an output object identifier for an output object of a wrapped Houdini asset in the 40 | * public API. 41 | */ 42 | USTRUCT(BlueprintType, Category="Houdini Engine | Public API | Outputs") 43 | struct FHoudiniPublicAPIOutputObjectIdentifier 44 | { 45 | GENERATED_BODY() 46 | 47 | public: 48 | FHoudiniPublicAPIOutputObjectIdentifier(); 49 | 50 | FHoudiniPublicAPIOutputObjectIdentifier(const FHoudiniOutputObjectIdentifier& InIdentifier); 51 | 52 | /** Returns the internal output object identifier wrapped by this class. */ 53 | FHoudiniOutputObjectIdentifier GetIdentifier() const; 54 | 55 | /** 56 | * Sets the internal output object identifier wrapped by this class. 57 | * @param InIdentifier The internal output object identifier. 58 | */ 59 | void SetIdentifier(const FHoudiniOutputObjectIdentifier& InIdentifier); 60 | 61 | /** String identifier for the split that created the output object identified by this identifier. */ 62 | UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Houdini Engine | Public API | Outputs") 63 | FString SplitIdentifier; 64 | 65 | /** Name of the part used to generate the output object identified by this identifier. */ 66 | UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Houdini Engine | Public API | Outputs") 67 | FString PartName; 68 | 69 | protected: 70 | 71 | // NodeId of corresponding Houdini Object. 72 | UPROPERTY() 73 | int32 ObjectId = -1; 74 | 75 | // NodeId of corresponding Houdini Geo. 76 | UPROPERTY() 77 | int32 GeoId = -1; 78 | 79 | // PartId 80 | UPROPERTY() 81 | int32 PartId = -1; 82 | 83 | // First valid primitive index for this output 84 | // (used to read generic attributes) 85 | UPROPERTY() 86 | int32 PrimitiveIndex = -1; 87 | 88 | // First valid point index for this output 89 | // (used to read generic attributes) 90 | UPROPERTY() 91 | int32 PointIndex = -1; 92 | 93 | bool bLoaded = false; 94 | }; 95 | -------------------------------------------------------------------------------- /Source/HoudiniEngineEditor/Public/IHoudiniEngineEditor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2018> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "Modules/ModuleInterface.h" 30 | 31 | class IHoudiniEngineEditor : public IModuleInterface 32 | { 33 | public: 34 | /** Register and unregister component visualizers used by this module. **/ 35 | virtual void RegisterComponentVisualizers() {} 36 | virtual void UnregisterComponentVisualizers() {} 37 | 38 | /** Register and unregister detail presenters used by this module. **/ 39 | virtual void RegisterDetails() {} 40 | virtual void UnregisterDetails() {} 41 | 42 | /** Register and unregister asset type actions. **/ 43 | virtual void RegisterAssetTypeActions() {} 44 | virtual void UnregisterAssetTypeActions() {} 45 | 46 | /** Create and register / unregister asset brokers. **/ 47 | virtual void RegisterAssetBrokers() {} 48 | virtual void UnregisterAssetBrokers() {} 49 | 50 | /** Create and register actor factories. **/ 51 | virtual void RegisterActorFactories() {} 52 | 53 | /** Extend menu. **/ 54 | virtual void ExtendMenu() {} 55 | 56 | /** Register and unregister thumbnails. **/ 57 | virtual void RegisterThumbnails() {} 58 | virtual void UnregisterThumbnails() {} 59 | 60 | /** Register and unregister for undo/redo notifications. **/ 61 | virtual void RegisterForUndo() {} 62 | virtual void UnregisterForUndo() {} 63 | 64 | /** Create custom modes **/ 65 | virtual void RegisterModes() {} 66 | virtual void UnregisterModes() {} 67 | 68 | /** Create custom placement extensions */ 69 | virtual void RegisterPlacementModeExtensions() {} 70 | virtual void UnregisterPlacementModeExtensions() {} 71 | }; 72 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/HoudiniEngineRuntime.Build.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | 28 | using UnrealBuildTool; 29 | using System; 30 | using System.IO; 31 | 32 | public class HoudiniEngineRuntime : ModuleRules 33 | { 34 | public HoudiniEngineRuntime( ReadOnlyTargetRules Target ) : base( Target ) 35 | { 36 | bPrecompile = true; 37 | PCHUsage = PCHUsageMode.NoSharedPCHs; 38 | PrivatePCHHeaderFile = "Private/HoudiniEngineRuntimePrivatePCH.h"; 39 | 40 | // Check if we are compiling for unsupported platforms. 41 | if ( Target.Platform != UnrealTargetPlatform.Win64 && 42 | Target.Platform != UnrealTargetPlatform.Mac && 43 | Target.Platform != UnrealTargetPlatform.Linux && 44 | Target.Platform != UnrealTargetPlatform.Switch ) 45 | { 46 | System.Console.WriteLine( string.Format( "Houdini Engine Runtime: Compiling for untested target platform. Please let us know how it goes!" ) ); 47 | } 48 | 49 | 50 | PublicIncludePaths.AddRange( 51 | new string[] {} 52 | ); 53 | 54 | PrivateIncludePaths.AddRange( 55 | new string[] { } 56 | ); 57 | 58 | // Add common dependencies. 59 | PublicDependencyModuleNames.AddRange( 60 | new string[] 61 | { 62 | "Core", 63 | "CoreUObject", 64 | "Engine", 65 | "RenderCore", 66 | "InputCore", 67 | "RHI", 68 | "Foliage", 69 | "Landscape", 70 | "MeshUtilitiesCommon" 71 | } 72 | ); 73 | 74 | PrivateDependencyModuleNames.AddRange( 75 | new string[] 76 | { 77 | "Landscape", 78 | "PhysicsCore" 79 | } 80 | ); 81 | 82 | if (Target.bBuildEditor == true) 83 | { 84 | PrivateDependencyModuleNames.AddRange( 85 | new string[] 86 | { 87 | "UnrealEd", 88 | "Kismet", 89 | } 90 | ); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniAssetStateTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "UObject/ObjectMacros.h" 31 | 32 | 33 | UENUM() 34 | enum class EHoudiniAssetState : uint8 35 | { 36 | // Loaded / Duplicated HDA, 37 | // Will need to be instantiated upon change/update 38 | NeedInstantiation, 39 | 40 | // Newly created HDA, fetch its default parameters then proceed to PreInstantiation 41 | NewHDA, 42 | 43 | // Newly created HDA, after default parameters fetch, needs to be instantiated immediately 44 | PreInstantiation, 45 | 46 | // Instantiating task in progress 47 | Instantiating, 48 | 49 | // Instantiated HDA, needs to be cooked immediately 50 | PreCook, 51 | 52 | // Cooking task in progress 53 | Cooking, 54 | 55 | // Cooking has finished 56 | PostCook, 57 | 58 | // Cooked HDA, needs to be processed immediately 59 | PreProcess, 60 | 61 | // Processing task in progress 62 | Processing, 63 | 64 | // Processed / Updated HDA 65 | // Will need to be cooked upon change/update 66 | None, 67 | 68 | // Asset needs to be rebuilt (Deleted/Instantiated/Cooked) 69 | NeedRebuild, 70 | 71 | // Asset needs to be deleted 72 | NeedDelete, 73 | 74 | // Deleting 75 | Deleting, 76 | 77 | // Process component template. This is ticking has very limited 78 | // functionality, typically limited to checking for parameter updates 79 | // in order to trigger PostEditChange() to run construction scripts again. 80 | ProcessTemplate, 81 | }; 82 | 83 | UENUM() 84 | enum class EHoudiniAssetStateResult : uint8 85 | { 86 | None, 87 | Working, 88 | Success, 89 | FinishedWithError, 90 | FinishedWithFatalError, 91 | Aborted 92 | }; 93 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniEngineCopyPropertiesInterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniEngineCopyPropertiesInterface.h" 28 | 29 | void IHoudiniEngineCopyPropertiesInterface::CopyPropertiesFrom(UObject* FromObject) 30 | { 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniEngineCopyPropertiesInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | 31 | #include "Engine/Engine.h" 32 | #include "UObject/ObjectMacros.h" 33 | #include "UObject/Interface.h" 34 | #include "HoudiniEngineCopyPropertiesInterface.generated.h" 35 | 36 | 37 | UINTERFACE(MinimalAPI, meta = (CannotImplementInterfaceInBlueprint)) 38 | class UHoudiniEngineCopyPropertiesInterface : public UInterface 39 | { 40 | GENERATED_BODY() 41 | }; 42 | 43 | class HOUDINIENGINERUNTIME_API IHoudiniEngineCopyPropertiesInterface 44 | { 45 | GENERATED_BODY() 46 | 47 | public: 48 | virtual void CopyPropertiesFrom(UObject* FromObject); 49 | }; 50 | 51 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniInputTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "UObject/ObjectMacros.h" 31 | #include "HoudiniEngineRuntimeCommon.h" 32 | 33 | // Maintain an iterable list of houdini input types 34 | static const EHoudiniInputType HoudiniInputTypeList[] = { 35 | EHoudiniInputType::Geometry, 36 | EHoudiniInputType::Curve, 37 | EHoudiniInputType::Asset, 38 | EHoudiniInputType::Landscape, 39 | EHoudiniInputType::World, 40 | EHoudiniInputType::Skeletal }; 41 | 42 | UENUM() 43 | enum class EHoudiniXformType : uint8 44 | { 45 | None, 46 | IntoThisObject, 47 | Auto 48 | }; 49 | 50 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniMeshSplitInstancerComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "Components/SceneComponent.h" 30 | #include "Engine/StaticMesh.h" 31 | #include "Materials/MaterialInterface.h" 32 | #include "HoudiniMeshSplitInstancerComponent.generated.h" 33 | 34 | /** 35 | * UHoudiniMeshSplitInstancerComponent is used to manage a single static mesh being 36 | * 'instanced' multiple times by multiple UStaticMeshComponents. This is as opposed to the 37 | * UInstancedStaticMeshComponent wherein a single mesh is instanced multiple times by one component. 38 | */ 39 | 40 | UCLASS()//( config = Engine ) 41 | class HOUDINIENGINERUNTIME_API UHoudiniMeshSplitInstancerComponent : public USceneComponent 42 | { 43 | GENERATED_UCLASS_BODY() 44 | 45 | friend class UHoudiniMeshSplitInstancerComponent_V1; 46 | 47 | public: 48 | 49 | virtual void Serialize(FArchive & Ar) override; 50 | 51 | virtual void OnComponentDestroyed(bool bDestroyingHierarchy) override; 52 | 53 | static void AddReferencedObjects(UObject * InThis, FReferenceCollector & Collector); 54 | 55 | // Static Mesh mutator 56 | void SetStaticMesh(class UStaticMesh* StaticMesh) { InstancedMesh = StaticMesh; } 57 | 58 | // Static mesh accessor 59 | class UStaticMesh* GetStaticMesh() const { return InstancedMesh; } 60 | 61 | // Overide material mutator 62 | void SetOverrideMaterials(const TArray& InMaterialOverrides) { OverrideMaterials = InMaterialOverrides; } 63 | 64 | // Destroy existing instances, keeping a given number of them to be reused 65 | void ClearInstances(int32 NumToKeep); 66 | 67 | // Set the instances. Transforms are given in local space of this component. 68 | bool SetInstanceTransforms(const TArray& InstanceTransforms); 69 | 70 | // Instance Accessor 71 | TArray& GetInstancesForWrite() { return Instances; } 72 | // const Instance accessor 73 | const TArray& GetInstances() const { return Instances; } 74 | 75 | TArray GetOverrideMaterials() const { return OverrideMaterials; } 76 | 77 | private: 78 | 79 | UPROPERTY(VisibleInstanceOnly, Category = Instances) 80 | TArray Instances; 81 | 82 | UPROPERTY(VisibleInstanceOnly, Category = Instances) 83 | TArray OverrideMaterials; 84 | 85 | UPROPERTY(VisibleAnywhere, Category = Instances) 86 | class UStaticMesh* InstancedMesh; 87 | }; 88 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterButton.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterButton.h" 28 | 29 | UHoudiniParameterButton::UHoudiniParameterButton(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | { 32 | ParmType = EHoudiniParameterType::Button; 33 | } 34 | 35 | UHoudiniParameterButton * 36 | UHoudiniParameterButton::Create( UObject* InOuter, const FString& InParamName ) 37 | { 38 | FString ParamNameStr = "HoudiniParameterButton_" + InParamName; 39 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterButton::StaticClass(), *ParamNameStr); 40 | 41 | // We need to create a new parameter 42 | UHoudiniParameterButton * HoudiniAssetParameter = NewObject< UHoudiniParameterButton >( 43 | InOuter, UHoudiniParameterButton::StaticClass(), ParamName, RF_Public | RF_Transactional); 44 | 45 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Button); 46 | 47 | //HoudiniAssetParameterButton->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 48 | 49 | return HoudiniAssetParameter; 50 | } 51 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterButton.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterButton.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterButton : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterButton * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterButtonStrip.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterButtonStrip.h" 28 | 29 | UHoudiniParameterButtonStrip::UHoudiniParameterButtonStrip(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | { 32 | ParmType = EHoudiniParameterType::ButtonStrip; 33 | } 34 | 35 | UHoudiniParameterButtonStrip * 36 | UHoudiniParameterButtonStrip::Create( 37 | UObject* InOuter, 38 | const FString& InParamName) 39 | { 40 | FString ParamNameStr = "HoudiniParameterButton_" + InParamName; 41 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterButtonStrip::StaticClass(), *ParamNameStr); 42 | 43 | // We need to create a new parameter 44 | UHoudiniParameterButtonStrip * HoudiniAssetParameter = NewObject< UHoudiniParameterButtonStrip >( 45 | InOuter, UHoudiniParameterButtonStrip::StaticClass(), ParamName, RF_Public | RF_Transactional); 46 | 47 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::ButtonStrip); 48 | 49 | HoudiniAssetParameter->Count = 0; 50 | 51 | return HoudiniAssetParameter; 52 | } 53 | 54 | FString * 55 | UHoudiniParameterButtonStrip::GetStringLabelAt(const int32 & InIndex) 56 | { 57 | if (!Labels.IsValidIndex(InIndex)) 58 | return nullptr; 59 | 60 | return &(Labels[InIndex]); 61 | } 62 | 63 | bool 64 | UHoudiniParameterButtonStrip::SetValueAt(const int32 & InIdx, int32 InVal) 65 | { 66 | if (!Values.IsValidIndex(InIdx)) 67 | return false; 68 | 69 | if (Values[InIdx] == InVal) 70 | return false; 71 | 72 | Values[InIdx] = InVal; 73 | return true; 74 | } -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterButtonStrip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterButtonStrip.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterButtonStrip : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterButtonStrip * Create( 42 | UObject* InOuter, 43 | const FString& InParamName); 44 | 45 | UPROPERTY() 46 | int32 Count; 47 | 48 | UPROPERTY() 49 | TArray Labels; 50 | 51 | UPROPERTY() 52 | TArray Values; 53 | 54 | 55 | void InitializeLabels(const int32 & InSize) { Labels.SetNumZeroed(InSize); Values.SetNumZeroed(InSize); Count = InSize; }; 56 | 57 | bool SetValueAt(const int32 & InIdx, int32 InVal); 58 | 59 | 60 | FString * GetStringLabelAt(const int32 & InIndex); 61 | 62 | int32* GetValuesPtr() { return Values.Num() > 0 ? &Values[0] : nullptr; }; 63 | 64 | 65 | 66 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterColor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterColor.h" 28 | 29 | UHoudiniParameterColor::UHoudiniParameterColor(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | , Color( FLinearColor::White ) 32 | { 33 | ParmType = EHoudiniParameterType::Color; 34 | } 35 | 36 | UHoudiniParameterColor * 37 | UHoudiniParameterColor::Create( UObject* InOuter, const FString& InParamName) 38 | { 39 | FString ParamNameStr = "HoudiniParameterColor_" + InParamName; 40 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterColor::StaticClass(), *ParamNameStr); 41 | 42 | // We need to create a new parameter 43 | UHoudiniParameterColor * HoudiniAssetParameter = NewObject< UHoudiniParameterColor >( 44 | InOuter, UHoudiniParameterColor::StaticClass(), ParamName, RF_Public | RF_Transactional); 45 | 46 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Color); 47 | //HoudiniAssetParameter->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 48 | 49 | HoudiniAssetParameter->bIsChildOfRamp = false; 50 | return HoudiniAssetParameter; 51 | } 52 | 53 | bool 54 | UHoudiniParameterColor::SetColorValue(const FLinearColor& InColor) 55 | { 56 | if (InColor == Color) 57 | return false; 58 | 59 | Color = InColor; 60 | 61 | return true; 62 | } 63 | 64 | bool 65 | UHoudiniParameterColor::IsDefault() const 66 | { 67 | if (bIsChildOfRamp) 68 | return true; 69 | 70 | return Color == DefaultColor; 71 | } 72 | 73 | void 74 | UHoudiniParameterColor::RevertToDefault() 75 | { 76 | if (!bIsChildOfRamp) 77 | { 78 | bPendingRevertToDefault = true; 79 | TuplePendingRevertToDefault.Empty(); 80 | TuplePendingRevertToDefault.Add(-1); 81 | 82 | MarkChanged(true); 83 | } 84 | } -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterColor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterColor.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterColor : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterColor * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | 45 | // Accessor 46 | FLinearColor GetColorValue() const { return Color; }; 47 | 48 | bool IsDefault() const override; 49 | 50 | bool IsChildOfRamp() const { return bIsChildOfRamp; }; 51 | 52 | // Mutators 53 | bool SetColorValue(const FLinearColor& InColor); 54 | 55 | void SetDefaultValue() { DefaultColor = Color; }; 56 | 57 | void SetIsChildOfRamp() { bIsChildOfRamp = true; }; 58 | 59 | void RevertToDefault() override; 60 | 61 | protected: 62 | 63 | // Color for this property. 64 | UPROPERTY() 65 | FLinearColor Color; 66 | 67 | // Default color for this property 68 | UPROPERTY() 69 | FLinearColor DefaultColor; 70 | 71 | UPROPERTY() 72 | bool bIsChildOfRamp; 73 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterFile.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterFile.h" 28 | 29 | #include "HoudiniAsset.h" 30 | #include "HoudiniAssetComponent.h" 31 | 32 | #include "Misc/Paths.h" 33 | 34 | UHoudiniParameterFile::UHoudiniParameterFile(const FObjectInitializer & ObjectInitializer) 35 | : Super(ObjectInitializer) 36 | , Filters() 37 | , bIsReadOnly(false) 38 | { 39 | ParmType = EHoudiniParameterType::File; 40 | } 41 | 42 | UHoudiniParameterFile * 43 | UHoudiniParameterFile::Create( 44 | UObject* InOuter, 45 | const FString& InParamName) 46 | { 47 | FString ParamNameStr = "HoudiniParameterFile_" + InParamName; 48 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterFile::StaticClass(), *ParamNameStr); 49 | 50 | // We need to create a new parameter 51 | UHoudiniParameterFile * HoudiniAssetParameter = NewObject< UHoudiniParameterFile >( 52 | InOuter, UHoudiniParameterFile::StaticClass(), ParamName, RF_Public | RF_Transactional); 53 | 54 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::File); 55 | 56 | return HoudiniAssetParameter; 57 | } 58 | 59 | 60 | bool 61 | UHoudiniParameterFile::SetValueAt(const FString& InValue, const uint32& Index) 62 | { 63 | if (!Values.IsValidIndex(Index)) 64 | return false; 65 | 66 | if (Values[Index] == InValue) 67 | return false; 68 | 69 | Values[Index] = InValue; 70 | 71 | return true; 72 | } 73 | 74 | bool 75 | UHoudiniParameterFile::IsDefault() const 76 | { 77 | for (int32 Idx = 0; Idx < Values.Num(); ++Idx) 78 | { 79 | if (!DefaultValues.IsValidIndex(Idx)) 80 | break; 81 | 82 | if (Values[Idx] != DefaultValues[Idx]) 83 | return false; 84 | } 85 | 86 | return true; 87 | } 88 | 89 | void 90 | UHoudiniParameterFile::SetDefaultValues() 91 | { 92 | if (DefaultValues.Num() > 0) 93 | return; 94 | 95 | DefaultValues.Empty(); 96 | for (int32 Idx = 0; Idx < Values.Num(); ++Idx) 97 | { 98 | DefaultValues.Add(Values[Idx]); 99 | } 100 | } 101 | 102 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterFile.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterFile.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterFile : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterFile * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | 45 | // Accessors 46 | FString GetFileFilters() const { return Filters; }; 47 | bool IsReadOnly() const { return bIsReadOnly; }; 48 | FString GetValueAt(int32 Index) { return Values[Index]; }; 49 | int32 GetNumValues() { return Values.Num(); }; 50 | 51 | void SetNumberOfValues(const uint32& NumValues) { Values.SetNum(NumValues); }; 52 | bool SetValueAt(const FString& InValue, const uint32& Index); 53 | 54 | bool IsDefault() const override; 55 | 56 | // Mutators 57 | void SetFileFilters(const FString& InFilters) { Filters = InFilters; }; 58 | void SetReadOnly(const bool& InReadOnly) { bIsReadOnly = InReadOnly; }; 59 | 60 | void SetDefaultValues(); 61 | 62 | protected: 63 | 64 | // Values of this property. 65 | UPROPERTY() 66 | TArray Values; 67 | 68 | UPROPERTY() 69 | TArray DefaultValues; 70 | 71 | // Filters of this property. 72 | UPROPERTY() 73 | FString Filters; 74 | 75 | // Is the file parameter read-only? 76 | UPROPERTY() 77 | bool bIsReadOnly; 78 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterFolder.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterFolder.h" 28 | 29 | UHoudiniParameterFolder::UHoudiniParameterFolder(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | ,bExpanded(true) 32 | ,bChosen(false) 33 | { 34 | ParmType = EHoudiniParameterType::Folder; 35 | } 36 | 37 | UHoudiniParameterFolder * 38 | UHoudiniParameterFolder::Create( 39 | UObject* InOuter, 40 | const FString& InParamName) 41 | { 42 | FString ParamNameStr = "HoudiniParameterFolder_" + InParamName; 43 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterFolder::StaticClass(), *ParamNameStr); 44 | 45 | // We need to create a new parameter 46 | UHoudiniParameterFolder * HoudiniAssetParameter = NewObject< UHoudiniParameterFolder >( 47 | InOuter, UHoudiniParameterFolder::StaticClass(), ParamName, RF_Public | RF_Transactional); 48 | 49 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Folder); 50 | //HoudiniAssetParameter->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 51 | return HoudiniAssetParameter; 52 | } 53 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterFolder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterFolder.generated.h" 32 | 33 | UENUM() 34 | enum class EHoudiniFolderParameterType : uint8 35 | { 36 | Invalid, 37 | 38 | Collapsible, 39 | Simple, 40 | Tabs, 41 | Radio, 42 | Other, 43 | }; 44 | 45 | UCLASS() 46 | class HOUDINIENGINERUNTIME_API UHoudiniParameterFolder : public UHoudiniParameter 47 | { 48 | GENERATED_UCLASS_BODY() 49 | 50 | public: 51 | 52 | // Create instance of this class. 53 | static UHoudiniParameterFolder * Create( 54 | UObject* Outer, 55 | const FString& ParamName); 56 | 57 | FORCEINLINE 58 | EHoudiniFolderParameterType GetFolderType() const { return FolderType; }; 59 | 60 | FORCEINLINE 61 | void SetFolderType(EHoudiniFolderParameterType Type) { FolderType = Type; }; 62 | 63 | FORCEINLINE 64 | void SetExpanded(const bool InExpanded) { bExpanded = InExpanded; }; 65 | FORCEINLINE 66 | bool IsExpanded() const { return bExpanded; }; 67 | FORCEINLINE 68 | void ExpandButtonClicked() { bExpanded = !bExpanded; }; 69 | 70 | FORCEINLINE 71 | void SetChosen(const bool InChosen) { bChosen = InChosen; }; 72 | FORCEINLINE 73 | bool IsChosen() const { return bChosen; }; 74 | 75 | FORCEINLINE 76 | bool IsTab() const { return FolderType == EHoudiniFolderParameterType::Tabs || FolderType == EHoudiniFolderParameterType::Radio; }; 77 | 78 | 79 | FORCEINLINE 80 | void ResetChildCounter() { ChildCounter = TupleSize; } 81 | 82 | FORCEINLINE 83 | int32& GetChildCounter() { return ChildCounter; }; 84 | 85 | FORCEINLINE 86 | bool IsContentShown() const { return bIsContentShown; }; 87 | 88 | FORCEINLINE 89 | void SetIsContentShown(const bool& bInShown) { bIsContentShown = bInShown; }; 90 | 91 | 92 | 93 | private: 94 | UPROPERTY() 95 | EHoudiniFolderParameterType FolderType; 96 | 97 | UPROPERTY() 98 | bool bExpanded; 99 | 100 | UPROPERTY() 101 | bool bChosen; 102 | 103 | 104 | UPROPERTY() 105 | int32 ChildCounter; 106 | 107 | UPROPERTY() 108 | bool bIsContentShown; 109 | 110 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterFolderList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterFolderList.generated.h" 32 | 33 | class UHoudiniParameterFolder; 34 | 35 | UCLASS() 36 | class HOUDINIENGINERUNTIME_API UHoudiniParameterFolderList : public UHoudiniParameter 37 | { 38 | GENERATED_UCLASS_BODY() 39 | 40 | public: 41 | 42 | // Create instance of this class. 43 | static UHoudiniParameterFolderList * Create( 44 | UObject* Outer, 45 | const FString& ParamName); 46 | 47 | void AddTabFolder(UHoudiniParameterFolder* InFolderParm); 48 | 49 | FORCEINLINE 50 | TArray& GetTabs() { return TabFolders; }; 51 | 52 | FORCEINLINE 53 | bool IsTabMenu() const { return bIsTabMenu; }; 54 | 55 | FORCEINLINE 56 | void SetIsTabMenu(const bool InIsTabMenu) { bIsTabMenu = InIsTabMenu; }; 57 | 58 | FORCEINLINE 59 | bool IsTabsShown() const { return bIsTabsShown; }; 60 | 61 | FORCEINLINE 62 | void SetTabsShown(const bool& bInTabsShown) { bIsTabsShown = bInTabsShown; }; 63 | 64 | bool IsTabParseFinished() const; 65 | 66 | UPROPERTY() 67 | bool bIsTabMenu; 68 | 69 | UPROPERTY() 70 | bool bIsTabsShown; 71 | 72 | UPROPERTY() 73 | TArray TabFolders; 74 | 75 | 76 | //------------------------------------------------------------------------------------------------ 77 | // UHoudiniParameter overrides 78 | //------------------------------------------------------------------------------------------------ 79 | virtual void RemapParameters(const TMap& InputMapping) override; 80 | 81 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterLabel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterLabel.h" 28 | 29 | UHoudiniParameterLabel::UHoudiniParameterLabel(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | { 32 | ParmType = EHoudiniParameterType::Label; 33 | } 34 | 35 | UHoudiniParameterLabel * 36 | UHoudiniParameterLabel::Create( 37 | UObject* InOuter, 38 | const FString& InParamName) 39 | { 40 | FString ParamNameStr = "HoudiniParameterLabel_" + InParamName; 41 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterLabel::StaticClass(), *ParamNameStr); 42 | 43 | // We need to create a new parameter 44 | UHoudiniParameterLabel * HoudiniAssetParameter = NewObject< UHoudiniParameterLabel >( 45 | InOuter, UHoudiniParameterLabel::StaticClass(), ParamName, RF_Public | RF_Transactional); 46 | 47 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Label); 48 | //HoudiniAssetParameter->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 49 | 50 | return HoudiniAssetParameter; 51 | } 52 | 53 | FString 54 | UHoudiniParameterLabel::GetStringAtIndex(int32 Index) 55 | { 56 | if (LabelStrings.IsValidIndex(Index)) 57 | { 58 | return LabelStrings[Index]; 59 | } 60 | 61 | return FString(""); 62 | } 63 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterLabel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterLabel.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterLabel : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterLabel * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | 45 | UPROPERTY() 46 | TArray LabelStrings; 47 | 48 | FORCEINLINE 49 | void AddLabelString(FString &NewString) { LabelStrings.Add(NewString); }; 50 | 51 | FString GetStringAtIndex(int32 Index); 52 | 53 | FORCEINLINE 54 | void EmptyLabelString() { LabelStrings.Empty(); }; 55 | 56 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterOperatorPath.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterOperatorPath.h" 28 | 29 | #include "HoudiniInput.h" 30 | 31 | 32 | UHoudiniParameterOperatorPath::UHoudiniParameterOperatorPath( 33 | const FObjectInitializer &ObjectInitializer) 34 | : Super(ObjectInitializer) 35 | { 36 | 37 | } 38 | 39 | UHoudiniParameterOperatorPath * 40 | UHoudiniParameterOperatorPath::Create(UObject *InOuter, const FString &InParamName) 41 | { 42 | FString ParamNameStr = "HoudiniParameterMultiParm_" + InParamName; 43 | FName ParamName = MakeUniqueObjectName( 44 | InOuter, UHoudiniParameterOperatorPath::StaticClass(), *ParamNameStr); 45 | 46 | // We need to create a new parameter 47 | UHoudiniParameterOperatorPath *HoudiniAssetParameter = 48 | NewObject( 49 | InOuter, UHoudiniParameterOperatorPath::StaticClass(), ParamName, 50 | RF_Public | RF_Transactional); 51 | 52 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Input); 53 | 54 | 55 | return HoudiniAssetParameter; 56 | } 57 | 58 | bool UHoudiniParameterOperatorPath::HasChanged() const 59 | { 60 | if (Super::HasChanged()) 61 | return true; 62 | if (HoudiniInput.IsValid() && HoudiniInput->HasChanged()) 63 | return true; 64 | return false; 65 | } 66 | 67 | bool UHoudiniParameterOperatorPath::NeedsToTriggerUpdate() const 68 | { 69 | if (Super::NeedsToTriggerUpdate()) 70 | return true; 71 | if (HoudiniInput.IsValid() && HoudiniInput->NeedsToTriggerUpdate()) 72 | return true; 73 | return false; 74 | } 75 | 76 | void UHoudiniParameterOperatorPath::MarkChanged(const bool & bInChanged) 77 | { 78 | Super::MarkChanged(bInChanged); 79 | } 80 | 81 | void 82 | UHoudiniParameterOperatorPath::RemapInputs(const TMap& InputMapping) 83 | { 84 | if (!HoudiniInput.IsValid()) 85 | return; 86 | 87 | if (InputMapping.Contains(HoudiniInput.Get())) 88 | { 89 | HoudiniInput = InputMapping.FindRef(HoudiniInput.Get()); 90 | } 91 | else 92 | { 93 | HoudiniInput = nullptr; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterOperatorPath.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterOperatorPath.generated.h" 32 | 33 | 34 | class UHoudiniInput; 35 | 36 | UCLASS() 37 | class HOUDINIENGINERUNTIME_API UHoudiniParameterOperatorPath 38 | : public UHoudiniParameter 39 | { 40 | GENERATED_UCLASS_BODY() 41 | 42 | public: 43 | // Create instance of this class. 44 | static UHoudiniParameterOperatorPath * 45 | Create(UObject *Outer, const FString &ParamName); 46 | 47 | virtual bool HasChanged() const override; 48 | virtual bool NeedsToTriggerUpdate() const override; 49 | virtual void MarkChanged(const bool& bInChanged) override; 50 | 51 | //------------------------------------------------------------------------------------------------ 52 | // UHoudiniParameter overrides 53 | //------------------------------------------------------------------------------------------------ 54 | virtual void RemapInputs(const TMap& InputMapping) override; 55 | 56 | UPROPERTY() 57 | TWeakObjectPtr HoudiniInput; 58 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterSeparator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterSeparator.h" 28 | 29 | UHoudiniParameterSeparator::UHoudiniParameterSeparator(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | { 32 | ParmType = EHoudiniParameterType::Separator; 33 | } 34 | 35 | UHoudiniParameterSeparator * 36 | UHoudiniParameterSeparator::Create( 37 | UObject* InOuter, 38 | const FString& InParamName) 39 | { 40 | FString ParamNameStr = "HoudiniParameterSeparator_" + InParamName; 41 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterSeparator::StaticClass(), *ParamNameStr); 42 | 43 | // We need to create a new parameter 44 | UHoudiniParameterSeparator * HoudiniAssetParameter = NewObject< UHoudiniParameterSeparator >( 45 | InOuter, UHoudiniParameterSeparator::StaticClass(), ParamName, RF_Public | RF_Transactional); 46 | 47 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Separator); 48 | //HoudiniAssetParameter->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 49 | 50 | return HoudiniAssetParameter; 51 | } 52 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterSeparator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterSeparator.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterSeparator : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterSeparator * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterString.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | 31 | #include "HoudiniParameterString.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterString : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterString * Create( 42 | UObject* Outer, const FString& ParamName); 43 | 44 | // Accessor 45 | FString GetValueAt(const uint32& Index) const { return Values.IsValidIndex(Index) ? Values[Index] : FString(); }; 46 | 47 | UObject* GetAssetAt(const uint32& Index) const { return ChosenAssets.IsValidIndex(Index) ? ChosenAssets[Index] : nullptr; }; 48 | 49 | int32 GetNumberOfValues() { return Values.Num(); }; 50 | 51 | bool IsAssetRef() const { return bIsAssetRef; }; 52 | 53 | bool IsDefaultValueAtIndex(const int32& Idx) const; 54 | bool IsDefault() const override; 55 | 56 | // Mutators 57 | void SetIsAssetRef(const bool& InIsAssetRef) { bIsAssetRef = InIsAssetRef; }; 58 | 59 | bool SetValueAt(const FString& InValue, const uint32& Index); 60 | 61 | void SetAssetAt(UObject* InObject, const uint32& Index); 62 | 63 | void SetNumberOfValues(const uint32& InNumValues) { Values.SetNum(InNumValues); ChosenAssets.SetNum(InNumValues); }; 64 | 65 | TArray & GetChosenAssets() { return ChosenAssets; }; 66 | 67 | void SetDefaultValues(); 68 | 69 | // Utility 70 | 71 | // Get the asset reference string for a given UObject 72 | static FString GetAssetReference(UObject* InObject); 73 | 74 | 75 | protected: 76 | 77 | // Values of this property. 78 | UPROPERTY() 79 | TArray< FString > Values; 80 | 81 | UPROPERTY() 82 | TArray< FString > DefaultValues; 83 | 84 | UPROPERTY() 85 | TArray ChosenAssets; 86 | 87 | // Indicates this string parameter should be treated as an asset reference 88 | // and display an object picker 89 | UPROPERTY() 90 | bool bIsAssetRef; 91 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterToggle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniParameterToggle.h" 28 | 29 | UHoudiniParameterToggle::UHoudiniParameterToggle(const FObjectInitializer & ObjectInitializer) 30 | : Super(ObjectInitializer) 31 | { 32 | ParmType = EHoudiniParameterType::Toggle; 33 | } 34 | 35 | UHoudiniParameterToggle * 36 | UHoudiniParameterToggle::Create( 37 | UObject* InOuter, 38 | const FString& InParamName) 39 | { 40 | FString ParamNameStr = "HoudiniParameterToggle_" + InParamName; 41 | FName ParamName = MakeUniqueObjectName(InOuter, UHoudiniParameterToggle::StaticClass(), *ParamNameStr); 42 | 43 | // We need to create a new parameter 44 | UHoudiniParameterToggle * HoudiniAssetParameter = NewObject< UHoudiniParameterToggle >( 45 | InOuter, UHoudiniParameterToggle::StaticClass(), ParamName, RF_Public | RF_Transactional); 46 | 47 | HoudiniAssetParameter->SetParameterType(EHoudiniParameterType::Toggle); 48 | //HoudiniAssetParameter->UpdateFromParmInfo(InParentParameter, InNodeId, ParmInfo); 49 | 50 | return HoudiniAssetParameter; 51 | } 52 | 53 | bool 54 | UHoudiniParameterToggle::SetValueAt(const bool& InValue, const uint32& Index) 55 | { 56 | if (!Values.IsValidIndex(Index)) 57 | return false; 58 | 59 | if (Values[Index] == 0 && !InValue) 60 | return false; 61 | 62 | if (Values[Index] == 1 && InValue) 63 | return false; 64 | 65 | Values[Index] = InValue ? 1 : 0; 66 | return true; 67 | } 68 | 69 | bool 70 | UHoudiniParameterToggle::IsDefault() const 71 | { 72 | for (int32 Idx = 0; Idx < Values.Num(); ++Idx) 73 | { 74 | if (!DefaultValues.IsValidIndex(Idx)) 75 | break; 76 | 77 | if (Values[Idx] != DefaultValues[Idx]) 78 | return false; 79 | } 80 | 81 | return true; 82 | } 83 | 84 | void 85 | UHoudiniParameterToggle::SetDefaultValues() 86 | { 87 | if (DefaultValues.Num() > 0) 88 | return; 89 | 90 | DefaultValues.Empty(); 91 | for (int32 Idx = 0; Idx < Values.Num(); ++Idx) 92 | { 93 | DefaultValues.Add(Values[Idx]); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniParameterToggle.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniParameter.h" 30 | #include "Styling/SlateTypes.h" 31 | #include "HoudiniParameterToggle.generated.h" 32 | 33 | UCLASS() 34 | class HOUDINIENGINERUNTIME_API UHoudiniParameterToggle : public UHoudiniParameter 35 | { 36 | GENERATED_UCLASS_BODY() 37 | 38 | public: 39 | 40 | // Create instance of this class. 41 | static UHoudiniParameterToggle * Create( 42 | UObject* Outer, 43 | const FString& ParamName); 44 | 45 | // Accessor 46 | bool GetValueAt(const uint32& Index) const { return Values.IsValidIndex(Index) ? (bool)Values[Index] : false; }; 47 | 48 | int32* GetValuesPtr() { return Values.Num() > 0 ? &Values[0] : nullptr; }; 49 | 50 | bool IsDefault() const override; 51 | 52 | // Mutators 53 | bool SetValueAt(const bool& InValue, const uint32& Index); 54 | void SetNumberOfValues(const uint32& InNumValues) { Values.SetNumUninitialized(InNumValues); }; 55 | 56 | int32 GetNumValues() { return Values.Num(); }; 57 | 58 | void SetDefaultValues(); 59 | 60 | protected: 61 | 62 | // Values of this property. 63 | UPROPERTY() 64 | TArray Values; 65 | 66 | UPROPERTY() 67 | TArray DefaultValues; 68 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniPluginSerializationVersion.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniPluginSerializationVersion.h" 28 | 29 | #include "Serialization/CustomVersion.h" 30 | #include "Misc/Guid.h" 31 | 32 | const FGuid FHoudiniCustomSerializationVersion::GUID( 0x1AB9CECC, 0x6913, 0x4875, 0x203d51fb ); 33 | 34 | // Register the custom version with core 35 | FCustomVersionRegistration GRegisterHoudiniCustomVersion( FHoudiniCustomSerializationVersion::GUID, VER_HOUDINI_PLUGIN_SERIALIZATION_AUTOMATIC_VERSION, TEXT( "HoudiniUE4PluginVer" ) ); 36 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniStaticMeshComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "Components/MeshComponent.h" 31 | 32 | #include "HoudiniStaticMeshComponent.generated.h" 33 | 34 | class UHoudiniStaticMesh; 35 | class UBillboardComponent; 36 | 37 | UCLASS(EditInlineNew, ClassGroup = "Houdini Engine | Rendering") 38 | class HOUDINIENGINERUNTIME_API UHoudiniStaticMeshComponent : public UMeshComponent 39 | { 40 | GENERATED_BODY() 41 | 42 | public: 43 | UHoudiniStaticMeshComponent(const FObjectInitializer &InInitialzer); 44 | 45 | UFUNCTION() 46 | void SetMesh(UHoudiniStaticMesh *InMesh); 47 | 48 | UFUNCTION() 49 | UHoudiniStaticMesh* GetMesh() { return Mesh; } 50 | 51 | // Call this if the mesh updated (outside of calling SetMesh). 52 | UFUNCTION() 53 | void NotifyMeshUpdated(); 54 | 55 | virtual void OnRegister() override; 56 | 57 | //virtual void PostLoad() override; 58 | 59 | // UPrimitiveComponent interface 60 | virtual FPrimitiveSceneProxy* CreateSceneProxy() override; 61 | virtual int32 GetNumMaterials() const override; 62 | virtual UMaterialInterface* GetMaterial(int32 ElementIndex) const override; 63 | virtual int32 GetMaterialIndex(FName MaterialSlotName) const override; 64 | virtual TArray GetMaterialSlotNames() const override; 65 | virtual bool IsMaterialSlotNameValid(FName MaterialSlotName) const override; 66 | // end - UPrimitiveComponent interface 67 | 68 | // USceneComponent Interface. 69 | virtual FBoxSphereBounds CalcBounds(const FTransform& InLocalToWorld) const override; 70 | // end - USceneComponent Interface. 71 | 72 | #if WITH_EDITOR 73 | virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; 74 | #endif 75 | 76 | UFUNCTION() 77 | bool IsHoudiniIconVisible() const { return bHoudiniIconVisible; } 78 | 79 | UFUNCTION() 80 | void SetHoudiniIconVisible(bool bInHoudiniIconVisible); 81 | 82 | protected: 83 | #if WITH_EDITORONLY_DATA 84 | virtual void UpdateSpriteComponent(); 85 | #endif 86 | 87 | /** The mesh. */ 88 | UPROPERTY(EditAnywhere, Category = "Mesh") 89 | UHoudiniStaticMesh *Mesh; 90 | 91 | /** Local space bounds of mesh. */ 92 | UPROPERTY() 93 | FBox LocalBounds; 94 | 95 | UPROPERTY(EditAnywhere, Category = "Icons") 96 | bool bHoudiniIconVisible; 97 | 98 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniTranslatorTypes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "HoudiniTranslatorTypes.h" 28 | 29 | FHoudiniLandscapeTileSizeInfo::FHoudiniLandscapeTileSizeInfo() 30 | : bIsCached(false) 31 | , UnrealSizeX(-1) 32 | , UnrealSizeY(-1) 33 | , NumSectionsPerComponent(-1) 34 | , NumQuadsPerSection(-1) 35 | { 36 | 37 | } 38 | 39 | FHoudiniLandscapeExtent::FHoudiniLandscapeExtent() 40 | : bIsCached(false) 41 | , MinX(0), MaxX(0), MinY(0), MaxY(0) 42 | , ExtentsX(0) 43 | , ExtentsY(0) 44 | { 45 | 46 | } 47 | 48 | FHoudiniLandscapeReferenceLocation::FHoudiniLandscapeReferenceLocation() 49 | : bIsCached(false) 50 | , SectionCoordX(0) 51 | , SectionCoordY(0) 52 | , TileLocationX(0.f) 53 | , TileLocationY(0.f) 54 | { 55 | } 56 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/HoudiniTranslatorTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "HoudiniEngineRuntimePrivatePCH.h" 30 | 31 | class ALandscape; 32 | 33 | // Used to cache data to use as a reference point during landscape construction 34 | // The very first tile will calculate landscape 35 | struct HOUDINIENGINERUNTIME_API FHoudiniLandscapeTileSizeInfo 36 | { 37 | FHoudiniLandscapeTileSizeInfo(); 38 | bool bIsCached; 39 | 40 | // Tile sizes 41 | int32 UnrealSizeX; 42 | int32 UnrealSizeY; 43 | int32 NumSectionsPerComponent; 44 | int32 NumQuadsPerSection; 45 | }; 46 | 47 | // Used to cache the extent of the landscape so that it doesn't have to be recalculated 48 | // for each landscape tile. 49 | // The very first tile will calculate landscape 50 | struct HOUDINIENGINERUNTIME_API FHoudiniLandscapeExtent 51 | { 52 | FHoudiniLandscapeExtent(); 53 | bool bIsCached; 54 | 55 | // Landscape extents (in quads) 56 | int32 MinX, MaxX, MinY, MaxY; 57 | int32 ExtentsX; 58 | int32 ExtentsY; 59 | }; 60 | 61 | // Used to cache data to use as a reference point during landscape construction 62 | // The very first tile will calculate a reference point as well as a component-space location. 63 | // Every subsequent tile can then derive a component-space location from this location. 64 | struct HOUDINIENGINERUNTIME_API FHoudiniLandscapeReferenceLocation 65 | { 66 | FHoudiniLandscapeReferenceLocation(); 67 | 68 | bool bIsCached; 69 | // Absolute section base coordinate for the cached tile. 70 | int32 SectionCoordX; 71 | int32 SectionCoordY; 72 | // Scaled location for the reference tile. 73 | float TileLocationX; 74 | float TileLocationY; 75 | // Transform of the main landscape actor. 76 | FTransform MainTransform; 77 | }; -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/IHoudiniAssetStateEvents.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2018> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #include "IHoudiniAssetStateEvents.h" 28 | 29 | void 30 | IHoudiniAssetStateEvents::HandleOnHoudiniAssetStateChange(UObject* InHoudiniAssetContext, const EHoudiniAssetState InFromState, const EHoudiniAssetState InToState) 31 | { 32 | if (InFromState == InToState) 33 | return; 34 | 35 | FOnHoudiniAssetStateChange& StateChangeDelegate = GetOnHoudiniAssetStateChangeDelegate(); 36 | if (StateChangeDelegate.IsBound()) 37 | StateChangeDelegate.Broadcast(InHoudiniAssetContext, InFromState, InToState); 38 | } 39 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/IHoudiniAssetStateEvents.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2018> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "CoreMinimal.h" 30 | #include "UObject/Interface.h" 31 | 32 | #include "HoudiniAssetStateTypes.h" 33 | 34 | #include "IHoudiniAssetStateEvents.generated.h" 35 | 36 | // Delegate for when EHoudiniAssetState changes from InFromState to InToState on an instantiated Houdini Asset (InHoudiniAssetContext). 37 | DECLARE_MULTICAST_DELEGATE_ThreeParams(FOnHoudiniAssetStateChange, UObject*, const EHoudiniAssetState, const EHoudiniAssetState); 38 | 39 | UINTERFACE() 40 | class HOUDINIENGINERUNTIME_API UHoudiniAssetStateEvents : public UInterface 41 | { 42 | GENERATED_BODY() 43 | }; 44 | 45 | 46 | /** 47 | * EHoudiniAssetState events: event handlers for when a Houdini Asset changes state. 48 | */ 49 | class HOUDINIENGINERUNTIME_API IHoudiniAssetStateEvents 50 | { 51 | GENERATED_BODY() 52 | 53 | public: 54 | virtual void HandleOnHoudiniAssetStateChange(UObject* InHoudiniAssetContext, const EHoudiniAssetState InFromState, const EHoudiniAssetState InToState); 55 | 56 | virtual FOnHoudiniAssetStateChange& GetOnHoudiniAssetStateChangeDelegate() = 0; 57 | }; 58 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/Tests/HoudiniRuntimeTests.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #if WITH_DEV_AUTOMATION_TESTS 4 | 5 | #include "HoudiniRuntimeTests.h" 6 | #include "HoudiniEngineRuntime.h" 7 | #include "Misc/AutomationTest.h" 8 | 9 | IMPLEMENT_SIMPLE_AUTOMATION_TEST(HoudiniRuntimeTestAutomation, "Houdini.Runtime.TestAutomation", EAutomationTestFlags::EditorContext | EAutomationTestFlags::ProductFilter) 10 | 11 | bool HoudiniRuntimeTestAutomation::RunTest(const FString & Parameters) 12 | { 13 | 14 | return true; 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Private/Tests/HoudiniRuntimeTests.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if WITH_DEV_AUTOMATION_TESTS 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Source/HoudiniEngineRuntime/Public/HoudiniAssetActor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) <2021> Side Effects Software Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * 11 | * 2. The name of Side Effects Software may not be used to endorse or 12 | * promote products derived from this software without specific prior 13 | * written permission. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE "AS IS" AND ANY EXPRESS 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 18 | * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 20 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 21 | * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 22 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 23 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #pragma once 28 | 29 | #include "UObject/ObjectMacros.h" 30 | #include "Components/ActorComponent.h" 31 | #include "GameFramework/Actor.h" 32 | 33 | #include "HoudiniAssetActor.generated.h" 34 | 35 | class UHoudiniAssetComponent; 36 | class UHoudiniPDGAssetLink; 37 | 38 | UCLASS(hidecategories = (Input), ConversionRoot, meta = (ChildCanTick), Blueprintable) 39 | class HOUDINIENGINERUNTIME_API AHoudiniAssetActor : public AActor 40 | { 41 | GENERATED_UCLASS_BODY() 42 | 43 | // Pointer to the root HoudiniAssetComponent 44 | UPROPERTY(Category = HoudiniAssetActor, VisibleAnywhere, BlueprintReadOnly, meta = (ExposeFunctionCategories = "Mesh,Rendering,Physics,Components|HoudiniEngine")/*, AllowPrivateAccess = "true"*/) 45 | UHoudiniAssetComponent * HoudiniAssetComponent; 46 | 47 | public: 48 | 49 | // Returns the actor's houdini component. 50 | UHoudiniAssetComponent* GetHoudiniAssetComponent() const; 51 | 52 | bool IsUsedForPreview() const; 53 | 54 | // Gets the Houdini PDG asset link associated with this actor, if it has one. 55 | UHoudiniPDGAssetLink* GetPDGAssetLink() const; 56 | 57 | #if WITH_EDITOR 58 | 59 | // Called after a property has been changed 60 | // Used to forward property changes to the HAC 61 | virtual void PostEditChangeProperty(FPropertyChangedEvent & PropertyChangedEvent) override; 62 | 63 | // Used by the "Sync to Content Browser" right-click menu option in the editor. 64 | virtual bool GetReferencedContentObjects(TArray< UObject * >& Objects) const; 65 | 66 | /* 67 | public: 68 | 69 | // Called before editor paste, true allow import 70 | virtual bool ShouldImport(FString * ActorPropString, bool IsMovingLevel) override; 71 | 72 | // Used by the "Sync to Content Browser" right-click menu option in the editor. 73 | virtual bool GetReferencedContentObjects(TArray< UObject * >& Objects) const; 74 | */ 75 | #endif 76 | }; 77 | --------------------------------------------------------------------------------