confusion between Inline and externproto nodes
authorCampbell Barton <ideasman42@gmail.com>
Wed, 7 Jan 2009 03:34:12 +0000 (03:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 7 Jan 2009 03:34:12 +0000 (03:34 +0000)
release/scripts/import_web3d.py

index 5ea433ad48469d2ed600fcb5db70f2d69cf68e77..efe30d9a9b8c05a4f3c40e237921080eb5bfc798 100755 (executable)
@@ -983,24 +983,24 @@ class vrmlNode(object):
                                                        child.parse(0)
                                                        
                                                        # if self.getExternprotoName():
-                                                       
-                                                       if not extern_key: # if none is spesified - use the name
-                                                               extern_key = self.getSpec()
-                                                       
-                                                       if extern_key:
-                                                               
-                                                               self.children.remove(child)
-                                                               child.parent = None
+                                                       if self.getExternprotoName():
+                                                               if not extern_key: # if none is spesified - use the name
+                                                                       extern_key = self.getSpec()
                                                                
-                                                               extern_child = child.findSpecRecursive(extern_key)
-                                                               
-                                                               if extern_child:
-                                                                       self.children.append(extern_child)
-                                                                       extern_child.parent = self
+                                                               if extern_key:
                                                                        
-                                                                       if DEBUG: print "\tEXTERNPROTO ID found!:", extern_key
-                                                               else:
-                                                                       print "\tEXTERNPROTO ID not found!:", extern_key
+                                                                       self.children.remove(child)
+                                                                       child.parent = None
+                                                                       
+                                                                       extern_child = child.findSpecRecursive(extern_key)
+                                                                       
+                                                                       if extern_child:
+                                                                               self.children.append(extern_child)
+                                                                               extern_child.parent = self
+                                                                               
+                                                                               if DEBUG: print "\tEXTERNPROTO ID found!:", extern_key
+                                                                       else:
+                                                                               print "\tEXTERNPROTO ID not found!:", extern_key
                                                                        
                                                        # Watch it! - restore lines
                                                        lines[:] = lines_old