From fb280d7cf510676c9bd047852843e8523b19565d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Lemaignan?= Date: Wed, 7 Nov 2012 22:56:54 +0100 Subject: [PATCH] [pyassimp] Make it easier to import pyassimp 'import pyassimp' (instead of 'from pyassimp import core') is now sufficient --- port/PyAssimp/README.md | 4 ++-- port/PyAssimp/pyassimp/__init__.py | 1 + port/PyAssimp/scripts/advanced_3d_viewer.py | 4 ++-- port/PyAssimp/scripts/sample.py | 4 ++-- port/PyAssimp/scripts/simple_opengl_viewer.py | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/port/PyAssimp/README.md b/port/PyAssimp/README.md index db014a5b3..77db57fae 100644 --- a/port/PyAssimp/README.md +++ b/port/PyAssimp/README.md @@ -25,7 +25,7 @@ substituted by assertions ...): ```python -from pyassimp.core import * +from pyassimp import * scene = load('hello.3ds') assert len(scene.meshes) @@ -44,7 +44,7 @@ scene: ```python -from pyassimp.core import * +from pyassimp import * scene = load('hello.3ds') for c in scene.rootnode.children: diff --git a/port/PyAssimp/pyassimp/__init__.py b/port/PyAssimp/pyassimp/__init__.py index e69de29bb..bb67a43fa 100644 --- a/port/PyAssimp/pyassimp/__init__.py +++ b/port/PyAssimp/pyassimp/__init__.py @@ -0,0 +1 @@ +from .core import * diff --git a/port/PyAssimp/scripts/advanced_3d_viewer.py b/port/PyAssimp/scripts/advanced_3d_viewer.py index 33fa84524..87dbaa01c 100755 --- a/port/PyAssimp/scripts/advanced_3d_viewer.py +++ b/port/PyAssimp/scripts/advanced_3d_viewer.py @@ -15,7 +15,7 @@ Based on: import sys import logging -logger = logging.getLogger("underworlds.3d_viewer") +logger = logging.getLogger("pyassimp") gllogger = logging.getLogger("OpenGL") gllogger.setLevel(logging.WARNING) logging.basicConfig(level=logging.INFO) @@ -38,7 +38,7 @@ import math, random import numpy from numpy import linalg -from pyassimp import core as pyassimp +import pyassimp from pyassimp.postprocess import * from pyassimp.helper import * diff --git a/port/PyAssimp/scripts/sample.py b/port/PyAssimp/scripts/sample.py index b843b82ba..adc80f81b 100755 --- a/port/PyAssimp/scripts/sample.py +++ b/port/PyAssimp/scripts/sample.py @@ -7,9 +7,9 @@ This module demonstrates the functionality of PyAssimp. import os, sys import logging -logging.basicConfig(level=logging.DEBUG) +logging.basicConfig(level=logging.INFO) -from pyassimp import core as pyassimp +import pyassimp def recur_node(node,level = 0): print(" " + "\t" * level + "- " + str(node)) diff --git a/port/PyAssimp/scripts/simple_opengl_viewer.py b/port/PyAssimp/scripts/simple_opengl_viewer.py index 5365e99f3..48c157917 100755 --- a/port/PyAssimp/scripts/simple_opengl_viewer.py +++ b/port/PyAssimp/scripts/simple_opengl_viewer.py @@ -35,7 +35,7 @@ logging.basicConfig(level=logging.INFO) import math import numpy -from pyassimp import core as pyassimp +import pyassimp from pyassimp.postprocess import * from pyassimp.helper import *