Several defects in Editor

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/ -w, screen resolution is 1366x768

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

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

Started happening after the PaintSelection PR.

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

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

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.

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.


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/,9 - Exception 'Null pointer access' in 'void TerrainEditor::CreateTerrain()'
AngelScript callstack:
	Scripts/Editor/ 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.

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

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.

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

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