View Issue Details

IDProjectCategoryView StatusLast Update
0001047FreeCADBugpublic2013-03-08 16:56
Reportergdo35Assigned Toyorik 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.12 
Target VersionFixed in Version0.14 
Summary0001047: Duplicate code inside importDAE.py ?
DescriptionA french user was facing an error while trying importing .dae file.

Exception (Fri Mar 1 09:10:18 2013): local variable ‘node’ referenced before assignement Stack Trace: TraceBack (most recent call last):
File <string>, line 4, in <module>
File /Applications/FreeCAD.app/Contents/Mod/Arch/importDAE.py, line 147 in export myscene = collada.scene.Scene(myscene, [node])

I look at the code and find this in Mod/Arch/importDAE.py :

            node = collada.scene.Node("node"+str(objind), children=[geomnode])
            scenenodes.append(node)
            objind += 1
    myscene = collada.scene.Scene("myscene", scenenodes)
    colmesh.scenes.append(myscene)
    colmesh.scene = myscene
    myscene = collada.scene.Scene("myscene", [node])
    colmesh.scenes.append(myscene)
    colmesh.scene = myscene
    colmesh.write(filename)

I think this 3 lines should be deleted since they replace the previous "myscene" affectation :
    myscene = collada.scene.Scene("myscene", [node])
    colmesh.scenes.append(myscene)
    colmesh.scene = myscene
Additional Informationhttps://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=12&t=3640&start=10

I have no information about the Freecad version, I just know it is a 0.13 release.
TagsNo tags attached.

Activities

yorik

2013-03-07 14:27

administrator   ~0002966

Will do! Thanks for notifying.

yorik

2013-03-08 16:56

administrator   ~0002971

Fixed in 1b016c4
Also added support for Part-based objects, and corrected the alignment axis

Issue History

Date Modified Username Field Change
2013-03-07 08:00 gdo35 New Issue
2013-03-07 14:27 yorik Status new => assigned
2013-03-07 14:27 yorik Assigned To => yorik
2013-03-07 14:27 yorik Note Added: 0002966
2013-03-08 16:56 yorik Note Added: 0002971
2013-03-08 16:56 yorik Status assigned => closed
2013-03-08 16:56 yorik Resolution open => fixed
2013-03-08 16:56 yorik Fixed in Version => 0.14