Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-03 06:18:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-03 06:18:12 +0400
commit2f37da95a310d8590cf3a6aaf16b54bcba3ffa84 (patch)
treee5b4bfec9f78dc758c29219225cb8c6235e78de3 /io_anim_acclaim
parent83068cf62a6d98280b7ab79405c84556f331e118 (diff)
more edits & dont use try/except to check if the property exists
Diffstat (limited to 'io_anim_acclaim')
-rw-r--r--io_anim_acclaim/__init__.py29
1 files changed, 18 insertions, 11 deletions
diff --git a/io_anim_acclaim/__init__.py b/io_anim_acclaim/__init__.py
index 640d9b5d..955ff6e7 100644
--- a/io_anim_acclaim/__init__.py
+++ b/io_anim_acclaim/__init__.py
@@ -407,22 +407,29 @@ class AmcImporter(bpy.types.Operator):
bl_idname = "import_anim.amc"
bl_label = "Import AMC"
- filepath = StringProperty(name="File Path", maxlen=1024, default="",
- description="Path to the AMC file")
- frame_skip = IntProperty(name="Fps divisor", default=4,
- # usually the sample rate is 120, so the default 4 gives you 30fps
- description="Frame supersampling factor", min=1)
- use_frame_no = BoolProperty(name="Use frame numbers", default=False,
- description="Offset start of animation according to the source")
+ filepath = StringProperty(
+ name="File Path", maxlen=1024,
+ description="Path to the AMC file",
+ )
+ frame_skip = IntProperty(
+ name="Fps divisor",
+ default=4,
+ # usually the sample rate is 120, so the default 4 gives you 30fps
+ description="Frame supersampling factor",
+ min=1,
+ )
+ use_frame_no = BoolProperty(
+ name="Use frame numbers",
+ default=False,
+ description="Offset start of animation according to the source",
+ )
+
filter_glob = StringProperty(default="*.amc", options={'HIDDEN'})
@classmethod
def poll(cls, context):
ob = context.active_object
- try:
- return (ob and ob.type == 'ARMATURE' and ob['source_file_path'])
- except:
- return False
+ return (ob and ob.type == 'ARMATURE' and 'source_file_path' in ob)
def execute(self, context):
ob = context.active_object