Archive 17/01/2023.

Several defects in Editor

Eugene

May anybody check or reproduce the following problems?

  1. Resource Browser preview has wrong scale or like this, its content is not centered:

  2. Hierarchy is spammed with this strange node (temporaries are hidden):

    This item disappear on save.

Command line: Data/Scripts/Editor.as -w, screen resolution is 1366x768

1vanK

Confirmed, it seems it’s added in one of the latest patches

cadaver

Confirmed. Looks like the editor is confusing the main scene and the browser preview scene.

cadaver

Started happening after the PaintSelection PR.

cadaver

Appears the editor preview camera position is a separate issue; it didn’t start directly from the PaintSelection.

1vanK

Also if create node with AnimatedModel component and drag model (Mutant fot example) it cause error
Not set - drag from resource browser

cadaver

The extra node is easily fixable with proper scene detection in the event handlers, the rest of the issues are related to AngelScript update. Will make an issue, this certainly needs resolving before release.

cadaver

Issues listed in this thread should be fixed. Additionally, I silenced the warning of calling StaticModel::SetModel() on AnimatedModel from the AngelScript API, the resource browser could cause this. Redirection is now done in AngelScript API to allow this, instead of in StaticModel code.

KonstantTom

I found another bug in editor: if you press “Create terrain” when editor launched from binary package, it will cause error:

[Tue Mar 07 19:39:28 2017] ERROR: Could not open file D:/CXXProjects/Urho3D-Windows-Static-Build/SDK/bin/Data/Textures/heightmap-1488908367.png
[Tue Mar 07 19:39:28 2017] ERROR: Could not find resource D:/CXXProjects/Urho3D-Windows-Static-Build/SDK/bin/Data/Textures/heightmap-1488908367.png
[Tue Mar 07 19:39:28 2017] ERROR: Scripts/Editor/EditorTerrain.as:324,9 - Exception 'Null pointer access' in 'void TerrainEditor::CreateTerrain()'
AngelScript callstack:
	Scripts/Editor/EditorTerrain.as:void TerrainEditor::CreateTerrain():324,9

The origin of this error is in:

    private void CreateTerrain()
    {
        String fileName = "Textures/heightmap-" + time.timeSinceEpoch  + ".png";
        String fileLocation = fileSystem.programDir + "Data/" + fileName;
        ...

In Urho3D binary package resources placed separately and there isn’t Data folder in program dir. Also if we create this dir, heightmap will be outside resource paths.

Eugene

Actually, I faced this error even when run Editor as always.

KonstantTom

When I run editor from BUILD_DIR/bin directory, all works normally.
And I found another defect: there isn’t any button for saving changed heightmap!
UPD: Heighmap can be saved by executing script from console, but it’s very unconvinient.

xDarkShadowKnightx

@KonstantTom the heightmap can be saved by simply saving the scene :slight_smile:

KonstantTom

@xDarkShadowKnightx Thanks for your reply! But, in my opinion, there should be button for saving heightmap without saving scene.