Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Implementation/CGdtfFixture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ VectorworksMVR::VCOMError VectorworksMVR::CGdtfFixtureImpl::GetGDTFVersion( Sint
return kVCOMError_NoError;
}


MvrString VectorworksMVR::CGdtfFixtureImpl::GetName()
{
if(!fFixtureObject) {return "";}
Expand Down
24 changes: 24 additions & 0 deletions src/Implementation/CMediaRessourceVectorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,30 @@ VectorworksMVR::VCOMError VectorworksMVR::CMediaRessourceVectorImpl::SetAbortCal
return kVCOMError_NoError;
}

VectorworksMVR::VCOMError VectorworksMVR::CMediaRessourceVectorImpl::GetMVRVersion(Sint32& major, Sint32& minor)
{
major = fExchangeObj.GetMVRFileMajorVersion();
minor = fExchangeObj.GetMVRFileMinorVersion();

return kVCOMError_NoError;
}

VectorworksMVR::VCOMError VCOM_CALLTYPE VectorworksMVR::CMediaRessourceVectorImpl::GetLatestMVRSupoortedVersion( Sint32& major, Sint32& minor )
{
major = kMVR_MajorVersion;
minor = kMVR_MinorVersion;

return kVCOMError_NoError;
}

VectorworksMVR::VCOMError VCOM_CALLTYPE VectorworksMVR::CMediaRessourceVectorImpl::GetLatestGDTFSupoortedVersion( Sint32& major, Sint32& minor )
{
major = kGDTF_CurrentMajorVersion;
minor = kGDTF_CurrentMinorVersion;

return kVCOMError_NoError;
}

VectorworksMVR::VCOMError VectorworksMVR::CMediaRessourceVectorImpl::GetLibVersion( size_t& major, size_t& minor )
{
major = LIBMVRGDTF_VERSION_MAJOR;
Expand Down
9 changes: 9 additions & 0 deletions src/Implementation/CMediaRessourceVectorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ namespace VectorworksMVR
// Check for duplicated uuids
virtual VCOMError VCOM_CALLTYPE GetDuplicatedUuids(bool& outDuplicated);

// Get MVR File Version
virtual VCOMError VCOM_CALLTYPE GetMVRVersion( Sint32& major, Sint32& minor );

// Get latest MVR supported version
virtual VCOMError VCOM_CALLTYPE GetLatestMVRSupoortedVersion( Sint32& major, Sint32& minor );

// Get latest GDTF supported version
virtual VCOMError VCOM_CALLTYPE GetLatestGDTFSupoortedVersion( Sint32& major, Sint32& minor );

// Returns the version of the library used to create the MVR/GDTF files
virtual VCOMError VCOM_CALLTYPE GetLibVersion( size_t& major, size_t& minor );
};
Expand Down
9 changes: 9 additions & 0 deletions src/Include/IMediaRessourceVectorInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,15 @@ namespace VectorworksMVR

// Check for duplicated uuids
virtual VCOMError VCOM_CALLTYPE GetDuplicatedUuids(bool& outDuplicated) = 0;

// Get MVR file version
virtual VCOMError VCOM_CALLTYPE GetMVRVersion( Sint32& major, Sint32& minor ) = 0;

// Get latest MVR supported version
virtual VCOMError VCOM_CALLTYPE GetLatestMVRSupoortedVersion( Sint32& major, Sint32& minor ) = 0;

// Get latest GDTF supported version
virtual VCOMError VCOM_CALLTYPE GetLatestGDTFSupoortedVersion( Sint32& major, Sint32& minor ) = 0;

// Returns the version of the library used to create the MVR/GDTF files
virtual VCOMError VCOM_CALLTYPE GetLibVersion(size_t& major, size_t& minor) = 0;
Expand Down
3 changes: 3 additions & 0 deletions src/Prefix/CommonPrefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@
const Sint32 kMVR_MajorVersion = 1;
const Sint32 kMVR_MinorVersion = 5;

const Sint32 kGDTF_CurrentMajorVersion = 1;
const Sint32 kGDTF_CurrentMinorVersion = 2;

// ----------------------------------------------------------------------------------------------------------------------------------
// GDTF XML Values

Expand Down
16 changes: 16 additions & 0 deletions src/SceneDataExchange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3805,6 +3805,12 @@ void SceneDataExchange::ReadFromGeneralSceneDescription(ISceneDataZipBuffer& xml
{
TXString rootName;
ASSERTN(kEveryone, rootName == XML_Val_RootNodeName);

TXString outMajorValue, outMinorValue;
rootNode->GetNodeAttributeValue(XML_Val_RootAttrMainVersion, outMajorValue);
rootNode->GetNodeAttributeValue( XML_Val_RootAttrMinorVersion, outMinorValue );
fMVRFileMajorVersion = outMajorValue.atoi();
fMVRFileMinorVersion = outMinorValue.atoi();

// ----------------------------------------------------------------
// Find the user data Node
Expand Down Expand Up @@ -4180,3 +4186,13 @@ bool SceneDataExchange::CheckAbort()
}
return false;
}

size_t SceneDataExchange::GetMVRFileMajorVersion() const
{
return fMVRFileMajorVersion;
}

size_t SceneDataExchange::GetMVRFileMinorVersion() const
{
return fMVRFileMinorVersion;
}
6 changes: 6 additions & 0 deletions src/SceneDataExchange.h
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,9 @@ namespace SceneData

//Abort reading flag
bool fAbortReading = false;

size_t fMVRFileMajorVersion = 0;
size_t fMVRFileMinorVersion = 0;

public:
// ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1110,6 +1113,9 @@ namespace SceneData
static void SetAbortCallback( const std::function<void( bool& )>& cb );
void GetAbortCallback( std::function<void( bool& )>& cb );

size_t GetMVRFileMajorVersion() const;
size_t GetMVRFileMinorVersion() const;

private:
void ReadFromGeneralSceneDescription(ISceneDataZipBuffer& xmlFile);
void ProcessLayer(const IXMLFileNodePtr& node);
Expand Down