Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Meakk committed Jun 14, 2023
1 parent 2ecdf9f commit 2e94057
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions plugins/usd/f3d-usd-formats.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="model/vnd.usd">
<comment>USD</comment>
<glob pattern="*.usd"/>
</mime-type>
<mime-type type="model/vnd.usda">
<comment>USD ASCII</comment>
<glob pattern="*.usda"/>
</mime-type>
<mime-type type="model/vnd.usdc">
<comment>USD Binary</comment>
<glob pattern="*.usdc"/>
</mime-type>
<mime-type type="model/vnd.usdz+zip">
<comment>Compressed USD</comment>
<glob pattern="*.usdz"/>
Expand Down
7 changes: 2 additions & 5 deletions plugins/usd/module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ vtk_module_add_module(f3d::VTKExtensionsUSDReader
FORCE_STATIC
CLASSES ${classes})

# It seems that USD CMake file is not propagating TBB dependency correctly on Linux for some reason
find_package(TBB REQUIRED)
vtk_module_link(f3d::VTKExtensionsUSDReader PRIVATE ${PXR_LIBRARIES})

vtk_module_link(f3d::VTKExtensionsUSDReader PRIVATE ${PXR_LIBRARIES} TBB::tbb)

vtk_module_definitions(f3d::VTKExtensionsUSDReader PRIVATE TBB_SUPPRESS_DEPRECATED_MESSAGES)
vtk_module_set_properties(f3d::VTKExtensionsUSDReader CXX_STANDARD 17)
6 changes: 5 additions & 1 deletion plugins/usd/module/vtkF3DUSDImporter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,11 @@ class vtkF3DUSDImporter::vtkInternals
std::string ext = assetPath.substr(assetPath.find_last_of("."));

vtkSmartPointer<vtkImageReader2> reader;

// CreateImageReader2FromExtension needs https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8211
#if VTK_VERSION_NUMBER >= VTK_VERSION_CHECK(9, 0, 20210729)
reader.TakeReference(vtkImageReader2Factory::CreateImageReader2FromExtension(ext.c_str()));
#endif

if (!reader)
{
Expand Down Expand Up @@ -642,7 +646,7 @@ class vtkF3DUSDImporter::vtkInternals
timeRange[1] = this->Stage->GetEndTimeCode() / this->Stage->GetTimeCodesPerSecond();
}

pxr::UsdStageRefPtr Stage;
UsdStageRefPtr Stage;

private:
std::unordered_map<std::string, vtkSmartPointer<vtkActor> > ActorMap;
Expand Down

0 comments on commit 2e94057

Please sign in to comment.