Several defects in Editor


#1

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


#2

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


#3

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


#4

Started happening after the PaintSelection PR.


#5

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


#6

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


#7

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.


#8

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.


#9

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.


#10

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


#11

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.


#12

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


#13

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