mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
clean up "Add" menubar categoes on the 3d object side via the following:
SceneObject now defaults to a category of "misc" getCategoryOfClass now checks parent classes for what categories they hold so that variants can inherit categories are in one of a few rough groups and subgroups depending on actual mapper needs/usages
This commit is contained in:
parent
edbb76155b
commit
fbcfe02098
157 changed files with 127 additions and 131 deletions
|
|
@ -472,7 +472,10 @@ function EditorGui::buildMenus(%this)
|
|||
for(%c=0; %c < getFieldCount(%enumeratedClasses); %c++)
|
||||
{
|
||||
%class = getField(%enumeratedClasses, %c);
|
||||
|
||||
//SceneObject itself is not directly spawnable
|
||||
if (%class $= "SceneObject")
|
||||
continue;
|
||||
|
||||
%category = getCategoryOfClass(%class);
|
||||
|
||||
if(%category $= "")
|
||||
|
|
@ -480,7 +483,13 @@ function EditorGui::buildMenus(%this)
|
|||
error("Attempted to fetch category of class " @ %class @ " but none were found.");
|
||||
continue;
|
||||
}
|
||||
|
||||
//skip classes explicitly tagged not for listing (typically due to being unspawnable)
|
||||
if(%category $= "UNLISTED")
|
||||
continue;
|
||||
|
||||
if(%category $= "MISC")
|
||||
warn("unsorted class: "@ %class);
|
||||
|
||||
%parentMenu = %addMenu; //start at the top
|
||||
for(%cat=0; %cat < getFieldCount(%category); %cat++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue