# Get the DEF property of a x3d node

Currently when Blender loads an .x3d file it does not load the correct DEF attribute, i.e., each shape doesn't get its designated name, and instead is called ShapeIndexedFaceSetXXX.

Is there some way to fix this bug via Python scripting, or is it something deeper?

• it is in python you can find it in ,\scripts\addons\io_scene_x3d\import_x3d.py May 10, 2015 at 23:45
• You should file a bug report olamundo: developer.blender.org , or, if you do fix it submit a bug patch. May 11, 2015 at 5:07
• This question appears to be off-topic because it is about Blender's source code. These questions are considered outside the scope of this StackExchange as defined in the help center. Development questions should be asked of the developers directly instead, see the contacting developers page of the blender wiki.
– gandalf3
May 11, 2015 at 18:09

Found the problem: In Blender 2.74, inside

def getDefName(self):
data = self.x3dNode.getAttributeNode('DEF')
if data:
data.value  # XXX, return??
return None


Does not return the name in case it found it, changing it to

def getDefName(self):
data = self.x3dNode.getAttributeNode('DEF')
if data:
return data.value  # XXX, return??
return None


worked for me, however I don't know how to suggest it as a bug fix nor am I sure that it is indeed a worthy fix as clearly someone already noticed that this function doesn't return anything in case there is a DEF.