Hi!
I' working with the CurveBrush example and my goal is to save strokes into mudbox file that when save and reopen the file, the strokes could be there. Could someone point me into right direction. I have this info so far:
Saving custom data into mudbox file happens in CurveCreator::Serialize() There is this line:
s == attribute1 == attribute2 == attribute3; and if I have understood right this line says what attributes are saved into file. Does this also loads the attributes from the file? I tried to put gLines (QVector <Store <Vector>*>):
s == glines; but this seams to be wrong way to handle this.
Solved! Go to Solution.
Hi!
I' working with the CurveBrush example and my goal is to save strokes into mudbox file that when save and reopen the file, the strokes could be there. Could someone point me into right direction. I have this info so far:
Saving custom data into mudbox file happens in CurveCreator::Serialize() There is this line:
s == attribute1 == attribute2 == attribute3; and if I have understood right this line says what attributes are saved into file. Does this also loads the attributes from the file? I tried to put gLines (QVector <Store <Vector>*>):
s == glines; but this seams to be wrong way to handle this.
Solved! Go to Solution.
Solved by imre.major. Go to Solution.
Hi,
The operator == you see there is a combination of the << and >> (save and load) operators. So
s == m_iMyAttrib;
is equivalent to
if ( s.IsStoring() )
s << m_iMyAttribute;
else
s >> m_iMyAttribute;
However complex data types are not guaranteed to work. Which version of Mudbox are you using? If you use the most recent version, both QVector and the Store class should work, but I would recommend you one or the other. Assuming you want to store an array of vectors, I would say you should use QVector<Vector>. Let me know if you have something more complicated data, and I will help you with this issue.
Hi,
The operator == you see there is a combination of the << and >> (save and load) operators. So
s == m_iMyAttrib;
is equivalent to
if ( s.IsStoring() )
s << m_iMyAttribute;
else
s >> m_iMyAttribute;
However complex data types are not guaranteed to work. Which version of Mudbox are you using? If you use the most recent version, both QVector and the Store class should work, but I would recommend you one or the other. Assuming you want to store an array of vectors, I would say you should use QVector<Vector>. Let me know if you have something more complicated data, and I will help you with this issue.
Thanks for the help. I was able to make it work with your info so all is good again 🙂
Thanks for the help. I was able to make it work with your info so all is good again 🙂
Can't find what you're looking for? Ask the community or share your knowledge.