Metasequoia BBS

| 新規投稿 | 通常表示 | ツリー表示 |
状態
タグ
キーワード
[5170] How to make child object in plugin code / nick
[質問] 返信
Metasequoia 4.3.4, Win8.1 32bit, SDK 4.3.3, VS2013 Community Edition

I am writing an import plugin but cannot create child objects.

objclone->SetDepth(1) does set depth to 1 but depth is 0 after AddObject(objclone).

What am I doing wrong?

    MQObject obj = MQ_CreateObject();        
    // obj's vertices and faces are read from a file

    
    MQObject ob = MQ_CreateObject();
    doc->AddObject(ob); // add empty object
    
    for (int i = 0; i < 4; ++i)
    {
        MQObject objclone = obj->Clone();
        objclone->SetDepth(1);
        doc->AddObject(objclone); // objclone is not child of ob. Why?

続きを表示...
2015-01-26 12:34
[5171] Re: How to make child object in plugin code / 管理者
AddObject() erases an object's depth. Please call SetDepth() after AddObject().
2015-01-26 17:33
[5172] Re: How to make child object in plugin code / Nick
OK. Thank you.
2015-01-26 18:53