Skip to content

instance_image in collada 1.5 files exported from c4d #234

Closed

Description

@kimkulling

Hi,

it seems cinema exporter was using this attribute to export textures, instead of (as done in version 1.4). This error was showing when trying to load this kind of files:

Expected start of element.

I'm attaching a patch with some changes, avoiding this behaviour when format 1.5 is detected.

Best regards,
Sergio

patch:
diff -r 038eda279259 code/ColladaParser.cpp
--- a/code/ColladaParser.cpp Wed Feb 05 16:57:34 2014 +0100
+++ b/code/ColladaParser.cpp Fri Feb 07 18:00:59 2014 +0100
@@ -1446,7 +1446,7 @@
// don't care for remaining stuff
SkipElement( "surface");
}

  •       else if( IsElement( "sampler2D"))
    
  •       else if( IsElement( "sampler2D") && FV_1_4_n == mFormat )
        {
            // surface ID is given inside <source> tags
            TestOpening( "source");
    

    @@ -1457,6 +1457,17 @@

            // don't care for remaining stuff
            SkipElement( "sampler2D");
    
  •       }
    
  •       else if( IsElement( "sampler2D") && FV_1_5_n == mFormat )
    
  •       {
    
  •           // surface ID is given inside <instance_image> tags
    
  •           TestOpening( "instance_image");
    
  •           int attrURL = GetAttribute("url");
    
  •           const char \* url = mReader->getAttributeValue( attrURL);
    
  •           url = url+1;
    
  •           pParam.mType = Param_Sampler;
    
  •           pParam.mReference = url;
    
  •           SkipElement( "sampler2D");
        } else
        {
            // ignore unknown element
    

Activity

  1. added this to the assimp4-rc milestone on Mar 13, 2014
  2. added
    Collada
    C4D
    3D Format Support
    on Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3D Format SupportC4DCollada

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions