Module renaming

Use blendfile for the library
Use blender-file for the module (pip install blender-file)
This commit is contained in:
Dalai Felinto
2016-12-01 17:39:57 +01:00
parent 23ef11c9dc
commit fb1c363254
4 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ Basic usage can be grasped from the test suit.
Import the module in your script and you are good to go: Import the module in your script and you are good to go:
>>> import blender_file >>> import blendfile
This module supports both Python2.x and Python3.x at the moment. This module supports both Python2.x and Python3.x at the moment.
Python 2.x support may be dropped in the future. Python 2.x support may be dropped in the future.

View File

@@ -1,14 +1,14 @@
from setuptools import setup from setuptools import setup
setup( setup(
name='blender_file', name='blender-file',
version='1.0', version='1.0',
description='Blender File', description='Blender File',
url='https://developer.blender.org/diffusion/BBF/', url='https://developer.blender.org/diffusion/BBF/',
author='At Mind B.V. - Jeroen Bakker, Blender Foundation - Campbell Barton', author='At Mind B.V. - Jeroen Bakker, Blender Foundation - Campbell Barton',
author_email='foundation@blender.org', author_email='foundation@blender.org',
license='GNU General Public License v2 or later (GPLv2+)', license='GNU General Public License v2 or later (GPLv2+)',
packages=['blender_file'], packages=setuptools.find_packages('.', exclude=['tests']),
tests_require=[ tests_require=[
'pytest', 'pytest',
], ],

View File

@@ -2,7 +2,7 @@
"""Unitests for blender_format""" """Unitests for blender_format"""
import os import os
import blender_file import blendfile
# Utils # Utils
@@ -29,7 +29,7 @@ def views_iter(scene):
def query_main_scene(filepath, callbacks): def query_main_scene(filepath, callbacks):
"""Return the equivalent to bpy.context.scene""" """Return the equivalent to bpy.context.scene"""
with blender_file.open_blend(filepath) as blend: with blendfile.open_blend(filepath) as blend:
# There is no bpy.context.scene, we get it from the main window # There is no bpy.context.scene, we get it from the main window
window_manager = [block for block in blend.blocks if block.code == b'WM'][0] window_manager = [block for block in blend.blocks if block.code == b'WM'][0]
window = window_manager.get_pointer(b'winactive') window = window_manager.get_pointer(b'winactive')