Community
Mudbox Forum
Welcome to Autodesk’s Mudbox Forums. Share your knowledge, ask questions, and explore popular Mudbox topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDK question about saving custom data into mudbox file.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
haikalle2771
489 Views, 2 Replies

SDK question about saving custom data into mudbox file.

haikalle2771
Contributor
Contributor

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. 

0 Likes

SDK question about saving custom data into mudbox file.

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. 

2 REPLIES 2
Message 2 of 3
imre.major
in reply to: haikalle2771

imre.major
Alumni
Alumni
Accepted 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.

0 Likes

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.

Message 3 of 3
haikalle2771
in reply to: imre.major

haikalle2771
Contributor
Contributor

Thanks for the help. I was able to make it work with your info so all is good again 🙂

0 Likes

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.

Post to forums  

Autodesk Design & Make Report