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>2010-12-23 00:41:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-23 00:41:21 +0300
commit1efbaf92ae58278c0b5675b35f3a0970265cb895 (patch)
tree3112322307935c6be5f2020810e1b68cbcabefc0 /io_convert_image_to_mesh_img/__init__.py
parentd6026d486e5b8349f513774e7e9ebadbfe029091 (diff)
use imp.reload() rather then reload().
Diffstat (limited to 'io_convert_image_to_mesh_img/__init__.py')
-rw-r--r--io_convert_image_to_mesh_img/__init__.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/io_convert_image_to_mesh_img/__init__.py b/io_convert_image_to_mesh_img/__init__.py
index 000cda06..853ca151 100644
--- a/io_convert_image_to_mesh_img/__init__.py
+++ b/io_convert_image_to_mesh_img/__init__.py
@@ -39,17 +39,18 @@ bl_addon_info = {
"func=detail&aid=24897&group_id=153&atid=467",
"category": "Import/Export"}
+
+if "bpy" in locals():
+ import imp
+ imp.reload(import_img)
+else:
+ from . import import_img
+
+
import bpy
from bpy.props import *
from io_utils import ImportHelper
-try:
- init_data
- reload( io_convert_image_to_mesh_img.import_img )
-except:
- import io_convert_image_to_mesh_img.import_img
-
-init_data = True
class ImportHiRISEIMGDTM(bpy.types.Operator, ImportHelper):
'''Import a HiRISE DTM formatted as a PDS IMG file'''
@@ -59,14 +60,13 @@ class ImportHiRISEIMGDTM(bpy.types.Operator, ImportHelper):
filename_ext = ".IMG"
filter_glob = StringProperty(default="*.IMG", options={'HIDDEN'})
- scale = FloatProperty(
- name="Scale",
- description="Scale the IMG by this value",
- min=0.0001,
- max=10.0,
- soft_min=0.001,
- soft_max=100.0,
- default=0.01)
+ scale = FloatProperty(name="Scale",
+ description="Scale the IMG by this value",
+ min=0.0001,
+ max=10.0,
+ soft_min=0.001,
+ soft_max=100.0,
+ default=0.01)
bin_mode = EnumProperty(items=(
('NONE', "None", "Don't bin the image"),
@@ -79,7 +79,7 @@ class ImportHiRISEIMGDTM(bpy.types.Operator, ImportHelper):
name="Binning",
description="Import Binning.",
default='BIN12-FAST'
- )
+ )
#red_material = BoolProperty(name="Mars Red Mesh",
# description="Set the mesh as a 'Mars' red value",