mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
|
|
@ -831,11 +831,19 @@ DefineEngineFunction( getCategoryOfClass, const char*, ( const char* className
|
|||
"@ingroup Console")
|
||||
{
|
||||
AbstractClassRep* rep = AbstractClassRep::findClassRep( className );
|
||||
if( rep )
|
||||
return rep->getCategory();
|
||||
|
||||
Con::errorf( "getCategoryOfClass - no class called '%s'", className );
|
||||
return "";
|
||||
if (rep == NULL)
|
||||
{
|
||||
Con::errorf("getCategoryOfClass - no class called '%s'", className);
|
||||
return "";
|
||||
}
|
||||
while (rep && rep->getParentClass())
|
||||
{
|
||||
if (dStrcmp(rep->getCategory(), "") != 0)
|
||||
break;
|
||||
rep = rep->getParentClass();
|
||||
}
|
||||
return rep ? rep->getCategory() : "";
|
||||
}
|
||||
|
||||
DefineEngineFunction( enumerateConsoleClasses, const char*, ( const char* className ), ( "" ),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue