From 98b6f2c3226095673e7ce8c5b07a245db168be1f Mon Sep 17 00:00:00 2001 From: nds Date: Sat, 9 May 2020 10:17:24 +0300 Subject: [PATCH] refs 474:Possibility to create and play animations - tag 11 for animations label (10 is used for VisMaterials) --- src/XCAFDoc/XCAFDoc_DocumentTool.cxx | 22 ++++++++++++---------- src/XCAFDoc/XCAFDoc_DocumentTool.hxx | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx index f0c56f5704..81731d2542 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.cxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.cxx @@ -227,17 +227,7 @@ TDF_Label XCAFDoc_DocumentTool::NotesLabel(const TDF_Label& acces) TDataStd_Name::Set(L, "Notes"); return L; } -//======================================================================= -//function : AnimationsLabel -//purpose : -//======================================================================= -TDF_Label XCAFDoc_DocumentTool::AnimationsLabel(const TDF_Label& acces) -{ - TDF_Label L = DocLabel(acces).FindChild(10, Standard_True); - TDataStd_Name::Set(L, "Animations"); - return L; -} //======================================================================= //function : VisMaterialLabel //purpose : @@ -249,6 +239,18 @@ TDF_Label XCAFDoc_DocumentTool::VisMaterialLabel (const TDF_Label& theLabel) return aLabel; } +//======================================================================= +//function : AnimationsLabel +//purpose : +//======================================================================= + +TDF_Label XCAFDoc_DocumentTool::AnimationsLabel(const TDF_Label& acces) +{ + TDF_Label L = DocLabel(acces).FindChild(11, Standard_True); + TDataStd_Name::Set(L, "Animations"); + return L; +} + //======================================================================= //function : ShapeTool //purpose : diff --git a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx index 548af81ae9..dd6bb4eb9d 100644 --- a/src/XCAFDoc/XCAFDoc_DocumentTool.hxx +++ b/src/XCAFDoc/XCAFDoc_DocumentTool.hxx @@ -90,12 +90,12 @@ public: //! Returns sub-label of DocLabel() with tag 9. Standard_EXPORT static TDF_Label NotesLabel(const TDF_Label& acces); - //! Returns sub-label of DocLabel() with tag 10. - Standard_EXPORT static TDF_Label AnimationsLabel(const TDF_Label& acces); - //! Returns sub-label of DocLabel() with tag 10. Standard_EXPORT static TDF_Label VisMaterialLabel (const TDF_Label& theLabel); + //! Returns sub-label of DocLabel() with tag 11. + Standard_EXPORT static TDF_Label AnimationsLabel(const TDF_Label& acces); + //! Creates (if it does not exist) ShapeTool attribute on ShapesLabel(). Standard_EXPORT static Handle(XCAFDoc_ShapeTool) ShapeTool (const TDF_Label& acces); -- 2.39.5