@chart3388 In response to the issue you were having with importing a model into an existing resource, this MR contains updates to the rendering code that should hopefully fix 1/2 of your problem. The resource panel will still not update to show the newly added model (a fix for this is still WIP), but the second model should now render 100% of the time.
FWIW, the MR also contains updates to the mesh session to exercise the ability to load a model into an existing resource.
@tj.corona - So far my testing shows this did fix 1/2 of the problem of rendering 100% of the time. I will push out to a few others to validate as well. Thank you
No update, but the issue definitely hasn’t fallen off of our radar!
@chart3388 I believe the second half of the issue is now resolved. However, I think there is a third “half” to this issue: currently, when an import operation does not result in the creation of a new resource, ParaView’s File→Open semantics mean that 2 ParaView representations will be created for the same resource. That results in every model entity in the resource being rendered twice and causes problems with visibility controls:
On Monday, @tj.corona and I discussed the problem we were seeing with Utkarsh, but for ParaView our use case does not make much sense (reading in ParaView is a 2-step process since many readers allow data subsets to be chosen before the actual read occurs when you click Apply).
There seem to be a few solutions but no clear winner:
- Copy significant portions of ParaView’s File→Open QAction into a new method that can properly handle SMTK imports. Then replace File→Open with our new QAction. This would add a large maintenance burden to ModelBuilder and it is unclear how well this would work in “ParaView+plugins” mode (i.e., using SMTK within ParaView rather than running the ModelBuilder application).
- Make “Import” separate from “Open”; they will have different menu items. This will require users to understand the difference between the two.
- Make Import and Open behave differently in ParaView vs. ModelBuilder. The idea would be to provide (i) a ParaView-only plugin that always imports data into a new resource rather than existing resources by registering ImportGroup operations with File→Open and (ii) a ModelBuilder-only plugin that imports data into existing resources whenever possible by registering ImportGroup operations to this new QAction.
- Use the existing File→Open framework as-is, but follow up with another signal/slot – generated when importing into an existing resource – that deletes one of the pipeline sources.
We should discuss the best way to resolve the situation next week.