Custom blueprint import ability added#9026
Custom blueprint import ability added#9026astralmaster wants to merge 3 commits intocarla-simulator:ue4-devfrom
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes. |
|
Could you add a small .md on how have you done it to help people in the community? |
As part of the CHANGELOG.md or separate .md? Where should that go? |
You should add the title of the feature in the CHANGELOG.md and a tutorial of how to do it in |
|
That should do it! |
|
Yeah! |
|
The PR has compilinng issues; |
Description
Adds the ability to import custom blueprints created in UE4 to Carla's blueprint library, spawnable via Python API. Ported from Carla ue5-dev branch. In order to add your blueprint, create
BlueprintParameters.jsonfile in/CarlaUE4/Content/Carla/Config/with following format:If, for example, in your UE4 Content Browser you have a blueprint with path
"Content -> Blueprints -> SomeBlueprintName", then you would modify thePathinBlueprintParameters.jsonas"Path": "/Game/Blueprints/SomeBlueprintName".Then, from Python API:
Fixes #9018
Where has this been tested?
Possible Drawbacks
The code uses
FindFunction()to determine whetherPostProcessBlueprinthas been used/implemented in UE4, should probably check if there is an easier, more robust way. This was needed to correctly determine whether the return value ofPostProcessBlueprintshould be taken into account when setting theSpawnResult.StatusinBlueprintActorFactory.cpp'sSpawnActor(). In the originalBlueprintActorFactory.cppfrom UE5, the code checks ifPostProcessBlueprintreturns true/false and sets theSpawnResult.Statusaccordingly, but ifPostProcessBlueprintis not used in UE4, then the default return value isfalseand that wrongly (I assume) sets theSpawnResult.StatustoEActorSpawnResultStatus::UnknownError.This change is