- dir() now works for collection functions
[blender-staging.git] / release / scripts / io / import_scene_obj.py
index d1b29a3024da96f7e61d48cfeae118f05f1e109f..2bce99ffb3e5a818709bb210c5c064f15d3babb1 100644 (file)
@@ -864,7 +864,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
        
        ob= bpy.data.add_object("MESH", "Mesh")
        ob.data= me
-       scn.add_object(ob)
+       scn.objects.link(ob)
 #      ob= scn.objects.new(me)
        new_objects.append(ob)
 
@@ -1601,18 +1601,18 @@ class IMPORT_OT_obj(bpy.types.Operator):
        def execute(self, context):
                # print("Selected: " + context.active_object.name)
 
-               load_obj(self.path,
+               load_obj(self.properties.path,
                                 context,
-                                self.CLAMP_SIZE,
-                                self.CREATE_FGONS,
-                                self.CREATE_SMOOTH_GROUPS,
-                                self.CREATE_EDGES,
-                                self.SPLIT_OBJECTS,
-                                self.SPLIT_GROUPS,
-                                self.SPLIT_MATERIALS,
-                                self.ROTATE_X90,
-                                self.IMAGE_SEARCH,
-                                self.POLYGROUPS)
+                                self.properties.CLAMP_SIZE,
+                                self.properties.CREATE_FGONS,
+                                self.properties.CREATE_SMOOTH_GROUPS,
+                                self.properties.CREATE_EDGES,
+                                self.properties.SPLIT_OBJECTS,
+                                self.properties.SPLIT_GROUPS,
+                                self.properties.SPLIT_MATERIALS,
+                                self.properties.ROTATE_X90,
+                                self.properties.IMAGE_SEARCH,
+                                self.properties.POLYGROUPS)
 
                return ('FINISHED',)