Normals when exporting using Melange



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/12/2010 at 09:19, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   12 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello!

    I'm writing an exporter to write c4d files from an application using melange. I'm missing the function MakeVariableTag to generate a Tnormal tag. My first thought was, that you could use MakeTag for all tags in melange. But the newly created tag doesn't allocate any normals. What is the right way in melange to generate a normals tag?

    I'm using the newest melange sdk: Build #36137 - Nov 25 2010

    Cheers
    Frank



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/12/2010 at 09:46, xxxxxxxx wrote:

    I haven't really looked into Melange yet, but most of the MakeVariableTag() variants were replaced by explicit new tag-types in the regular SDK... see if there's a NormalTag::Alloc() that you can use.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/12/2010 at 00:51, xxxxxxxx wrote:

    Two ways that should work:
    BaseTag *bt = BaseTag::Alloc(Tnormal);
    NormalTag *tag = (NormalTag * )bt;
    OR
    NormalTag *tag = NormalTag::Alloc();



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/12/2010 at 01:02, xxxxxxxx wrote:

    Thanks for the infos. Unfortunately NormalTag doesn't have an Alloc function in melange, but after looking at the header (instead of only looking at the docs ;-) ), I found, that there is a Resize function:

    _melange_::NormalTag* nTag = static_cast<_melange_::NormalTag*>(node->MakeTag(Tnormal));
    if(nTag!=NULL) {
      nTag->Resize(numPolys);
      .....
    }



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/12/2010 at 12:31, xxxxxxxx wrote:

    Surely, you can use the Alloc() method found in the base classes that NormalTag is derived from? (BaseTag, BaseList2D, etc...)


Log in to reply