sprockets A:M Decaling Screen frosted donut medals buildings Rubik's Cube Nidaros Cathedral Tongue Sandwich
sprockets
Recent Posts | Unread Content | Previous Banner Topics
Jump to content
Hash, Inc. - Animation:Master

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

I found the way (taken from SDK)

HChor *chor;
HModelCache *hmc_new;
HModel *working = hmc_new->NewInstance(chor);
chor->InsertChildAtTail(working,TRUE);

For some reason it hangs the app

 

What I do:

IEPolyModel* model = new IEPolyModel;
// setting up model..

HModelCache *hmc = HModelCache::New("Foo", TRUE);
hmc->MergeIEModel(model, "Foo", 0.0, TRUE, TRUE);
delete model;

HProject* prj = GetHProject();

if (HChorContainer* chors = prj->GetChildChorContainer()) {
    for (HHashObject* c = chors->GetChild(); c; c = c->GetSibling()) {
        HChor* chor = (HChor*)c;            
        HModel* mdl = hmc->NewInstance(chor);
        chor->InsertChildAtTail(mdl, TRUE);
    }
}

Any ideas?

Posted

ok. after removing this line

chor->InsertChildAtTail(mdl, TRUE);

it start working as expected. Kind of understand why it behaves odd

Posted

I still have an issue. As I understood without

chor->InsertChildAtTail(mdl, TRUE);

model will be added, but with default settings. When I apply some transformations on brand new model it works only locally. After, in scene all values are equal zero. Actually start hating this shit =(

  • Hash Fellow
Posted

When I apply some transformations on brand new model it works only locally. After, in scene all values are equal zero. Actually start hating this shit =(

 

It works but then it doesn't? I'm not clear on when it stops working.

 

With only one exception i can think of, changes made to a model in a chor do not ever affect the original model.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...