[Beta 4 RESOLVED] Datablock Editor Treeview not displaying correctly
by Robert Lee · in Torque 3D Professional · 07/18/2009 (9:25 am) · 6 replies
The Datablock Editor is not displaying the tree view correctly in the Beta 4 distribution. If you want the fix before the next beta, apply the changes shown in the thread. This is confirmed as fixed in the trunk.
#2
07/18/2009 (10:11 am)
No "jumping" here either. Don't really see how it could be more clearly delineated or organized -- except for some sort of skin as James mentioned, maybe some sort of unique icon for each 'class'.
#3
This is what it looks like for me:
Here
That matches the screen shots on the blog. Are you seeing something different? - I would expect that the lines for child nodes would obviously stand out as child nodes.
Moving this out of the bug list pending your response.
07/18/2009 (10:42 am)
Hmm, let me look into this more. I see what you are suggesting it should look like and it makes sense, but it actually displays visually for me as like a listbox as opposed to a tree view, thus the confusion.This is what it looks like for me:
Here
That matches the screen shots on the blog. Are you seeing something different? - I would expect that the lines for child nodes would obviously stand out as child nodes.
Moving this out of the bug list pending your response.
#4
It appears the problem is with the code in the DatablockEditor itself.
After replacing the DataBlockEditorPlugin::addExistingItem() method with the following, I get much better results. The old code used "%id" where I now have "%classId", which retains the parent value and now renders correctly.
07/18/2009 (11:38 am)
Ok, I've figured it out.It appears the problem is with the code in the DatablockEditor itself.
After replacing the DataBlockEditorPlugin::addExistingItem() method with the following, I get much better results. The old code used "%id" where I now have "%classId", which retains the parent value and now renders correctly.
function DatablockEditorPlugin::addExistingItem(%this, %datablock)
{
%class = %datablock.getClassName();
%classId = DatablockEditorTree.findItemByName(%class);
if(%classId == 0)
%classId = DatablockEditorTree.insertItem(0, %class);
%name = %datablock.getName();
if(%name $= "")
%name = "unnamed";
// it doesn't exist so lets add it
if(%id == 0)
{
if(%this.PM.isDirty(%datablock))
%name = %name @ " *";
%id = DatablockEditorTree.insertItem(%classId, %name, %datablock);
}
return %id;
}
#5
But I think it's safe to say that someone has already made changes in how the datablock editor looks/behaves.
This is what it looks like now (fresh from trunk):
07/18/2009 (11:43 am)
I, and I guess James too, was using a build from the repo. I suppose this is one of those cases where I should have had Beta4 installed before speaking up. But I think it's safe to say that someone has already made changes in how the datablock editor looks/behaves.
This is what it looks like now (fresh from trunk):
#6
07/18/2009 (11:47 am)
Ahh, much better. Probably the same fix I applied, thanks.
Associate James Ford
Sickhead Games
Clearly the reason they are there is for organization, so if you know you are looking for an SFXProfile but don't remember the first letter you only have to scan through all SFXProfiles not every datablock in the system.
This is a standard treeView control - some elements are branches and some elements are leafs. Actually I bet this is just a result of the horrible skin... the treeview skin used in the Object Editor has very clear folder icons that could be used for the datablock categories/classes.
*Disclaimer to MattF*
I know this was a very last minute addition to beta4 - and it kicks ass.