mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0026683: VRML 2.0: ImageTexture node not written
This commit is contained in:
parent
57c28b6122
commit
7d73d13f6e
@ -63,6 +63,12 @@ class VrmlData_ImageTexture : public VrmlData_Texture
|
|||||||
Standard_EXPORT virtual VrmlData_ErrorStatus
|
Standard_EXPORT virtual VrmlData_ErrorStatus
|
||||||
Read (VrmlData_InBuffer& theBuffer);
|
Read (VrmlData_InBuffer& theBuffer);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write the Node to output stream.
|
||||||
|
*/
|
||||||
|
Standard_EXPORT virtual VrmlData_ErrorStatus
|
||||||
|
Write (const char * thePrefix) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// ---------- PROTECTED METHODS ----------
|
// ---------- PROTECTED METHODS ----------
|
||||||
|
|
||||||
|
@ -32,19 +32,6 @@
|
|||||||
#pragma warning (disable:4996)
|
#pragma warning (disable:4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static VrmlData_Scene MyDefaultScene;
|
static VrmlData_Scene MyDefaultScene;
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -575,11 +562,9 @@ Standard_Boolean VrmlData_Appearance::IsDefault () const
|
|||||||
Standard_Boolean aResult (Standard_True);
|
Standard_Boolean aResult (Standard_True);
|
||||||
if (myMaterial.IsNull() == Standard_False)
|
if (myMaterial.IsNull() == Standard_False)
|
||||||
aResult = myMaterial->IsDefault();
|
aResult = myMaterial->IsDefault();
|
||||||
if (aResult == Standard_False)
|
if (aResult && myTexture.IsNull() == Standard_False)
|
||||||
if (myTexture.IsNull() == Standard_False)
|
|
||||||
aResult = myTexture->IsDefault();
|
aResult = myTexture->IsDefault();
|
||||||
if (aResult == Standard_False)
|
if (aResult && myTTransform.IsNull() == Standard_False)
|
||||||
if (myTTransform.IsNull() == Standard_False)
|
|
||||||
aResult = myTTransform->IsDefault();
|
aResult = myTTransform->IsDefault();
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
@ -648,3 +633,31 @@ VrmlData_ErrorStatus VrmlData_ImageTexture::Read (VrmlData_InBuffer& theBuffer)
|
|||||||
return aStatus;
|
return aStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Write
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
VrmlData_ErrorStatus VrmlData_ImageTexture::Write(const char *thePrefix) const
|
||||||
|
{
|
||||||
|
VrmlData_ErrorStatus aStatus = VrmlData_StatusOK;
|
||||||
|
const VrmlData_Scene& aScene = Scene();
|
||||||
|
static char header[] = "ImageTexture {";
|
||||||
|
if (aScene.IsDummyWrite() == Standard_False &&
|
||||||
|
OK(aStatus, aScene.WriteLine(thePrefix, header, GlobalIndent())))
|
||||||
|
{
|
||||||
|
TCollection_AsciiString url = "\"";
|
||||||
|
url += URL().First();
|
||||||
|
url += "\"";
|
||||||
|
|
||||||
|
try {
|
||||||
|
aStatus = aScene.WriteLine("url ", url.ToCString());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
aStatus = WriteClosing();
|
||||||
|
}
|
||||||
|
return aStatus;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user