With the ability to have more than one model loaded into ModelBuilder, there needs to be someway of focusing the workflow on a specific model to prevent the user from being confused or worse, associate attributes to the wrong model or have model entities from different models be used in an operation. The concept of an Active Model will have the following effects on ModelBuilder:
Only the Active Model can have its model entity components selected
Only the Active Model can be used be used in operations with the exception of the following:
Creating a new model - the new model would automatically become the Active Model
Loading in an existing model - in this case the loaded model would become the new Active Model
Only the Active Model can have attributes associated with it
Only the Active Model will have its model components displayed in the model tree and can have their properties changed
Only operations that can be applied to the Active Model or its model components will be displayed
Closing the Active Model would make one of the existing models active
The following capabilities could be added depending on effort
The Tree View could list the other models but they cannot be expanded in terms of showing their model entities.
The user can make these models visible/invisible
The user can make the meshes of these model visible/invisble
The Selection Manager needs to be told there is an Active Model - anything selected that is not active should not be broadcasted to other managers
The UI Manager need to be told there is an Active Model
This will prevent attributes from being assigned to non-active components
This might also prevent non-active components from being selected in an operation
The Model Tree View needs to be told there is an Active Model to display only the active components and show the non-active models and their meshes with the above restricted functionality.
The Operation Manager (dock widget) needs to be told there is an Active Model to display only the operations that can be applied to it and its components.
Until CMB 5, this may cause some issues with the CGM session, where model bodies are represented as submodels of a parent model.
For further investigation and implementation
Each model has its own representation... can we turn off pickability for all but the active model?
Is there always an active model? What about at startup?
Selection manager resets selection whenever the active model changes.