[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23476] trunk/blender/release/io: - use pythons time module rather then bpy.sys.time()
Campbell Barton
ideasman42 at gmail.com
Fri Sep 25 07:25:44 CEST 2009
Revision: 23476
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23476
Author: campbellbarton
Date: 2009-09-25 07:25:44 +0200 (Fri, 25 Sep 2009)
Log Message:
-----------
- use pythons time module rather then bpy.sys.time()
- comment poll functions, maybe could check for editable scene later
- importing OBJs imports triangle meshes.
Modified Paths:
--------------
trunk/blender/release/io/import_3ds.py
trunk/blender/release/io/import_obj.py
Modified: trunk/blender/release/io/import_3ds.py
===================================================================
--- trunk/blender/release/io/import_3ds.py 2009-09-25 04:51:04 UTC (rev 23475)
+++ trunk/blender/release/io/import_3ds.py 2009-09-25 05:25:44 UTC (rev 23476)
@@ -1154,10 +1154,10 @@
wm = context.manager
wm.add_fileselect(self.__operator__)
return ('RUNNING_MODAL',)
-
- def poll(self, context): # Poll isnt working yet
+ '''
+ def poll(self, context):
print("Poll")
- return context.active_object != None
+ return context.active_object != None'''
bpy.ops.add(IMPORT_OT_3ds)
Modified: trunk/blender/release/io/import_obj.py
===================================================================
--- trunk/blender/release/io/import_obj.py 2009-09-25 04:51:04 UTC (rev 23475)
+++ trunk/blender/release/io/import_obj.py 2009-09-25 05:25:44 UTC (rev 23476)
@@ -41,7 +41,7 @@
# --------------------------------------------------------------------------
import os
-
+import time
import bpy
import Mathutils
import Geometry
@@ -993,7 +993,7 @@
if SPLIT_OBJECTS or SPLIT_GROUPS or SPLIT_MATERIALS:
POLYGROUPS = False
- time_main= bpy.sys.time()
+ time_main= time.time()
# time_main= sys.time()
verts_loc= []
@@ -1032,7 +1032,7 @@
context_multi_line= ''
print('\tparsing obj file "%s"...' % filepath)
- time_sub= bpy.sys.time()
+ time_sub= time.time()
# time_sub= sys.time()
file= open(filepath, 'rU')
@@ -1241,7 +1241,7 @@
'''
file.close()
- time_new= bpy.sys.time()
+ time_new= time.time()
# time_new= sys.time()
print('%.4f sec' % (time_new-time_sub))
time_sub= time_new
@@ -1250,7 +1250,7 @@
print('\tloading materials and images...')
create_materials(filepath, material_libs, unique_materials, unique_material_images, IMAGE_SEARCH)
- time_new= bpy.sys.time()
+ time_new= time.time()
# time_new= sys.time()
print('%.4f sec' % (time_new-time_sub))
time_sub= time_new
@@ -1307,7 +1307,7 @@
# for ob in new_objects:
# ob.RotX = -1.570796326794896558
- time_new= bpy.sys.time()
+ time_new= time.time()
# time_new= sys.time()
print('%.4f sec' % (time_new-time_sub))
@@ -1585,9 +1585,9 @@
bpy.props.BoolProperty(attr="IMAGE_SEARCH", name="Image Search", description="Search subdirs for any assosiated images (Warning, may be slow)", default= True),
]
+ '''
def poll(self, context):
- print("Poll")
- return context.active_object != None
+ return True '''
def execute(self, context):
# print("Selected: " + context.active_object.name)
More information about the Bf-blender-cvs
mailing list