[Bf-committers] Missing half of bpy_extras module

patrick boelens p_boelens at msn.com
Thu Aug 7 21:20:40 CEST 2014


Ah, alright then. Purely out of curiosity though: Why does

import bpy_extras
bpy_extras.[ctrl space]

autocomplete show two or three of the submodules, but not all of them? In a similar vein,

import bpy_extras
bpy_extras.image_utils

throws an error. This seems inconsistent with the bpy module, which "just works" and does import the related Python files (ops, path and utils). Could we do the same type of import for bpy_extras, or is this messy somehow?

Either way, thanks for your reply!

Cheers,
Patrick

> Date: Fri, 8 Aug 2014 04:35:14 +1000
> From: ideasman42 at gmail.com
> To: bf-committers at blender.org
> Subject: Re: [Bf-committers] Missing half of bpy_extras module
> 
> This is just how Python imports works, you can do:
> 
> from bpy_extras.image_utils import load_image
> load_image(...)
> 
> or...
> from bpy_extras import image_utils
> image_utils.load_image(...)
> 
> or...
> import bpy_extras.image_utils
> bpy_extras.image_utils.load_image(...)
> 
> On Fri, Aug 8, 2014 at 4:08 AM, patrick boelens <p_boelens at msn.com> wrote:
> > Hi all,
> >
> > I just looked into this a bit more and found two things:
> >
> > - I start out with only io_utils and object_utils
> > - Opening the preferences once adds keyconfig_utils
> > - Adding manual imports[1] to scripts/modules/bpy_extras/__init__.py gives me full access to all utils
> >
> > Is this intentional and am I circumventing something here, or is this a bug?
> >
> > Cheers,
> > Patrick
> >
> > [1] from . import anim_utils, object_utils, io_utils, image_utils, keyconfig_utils, mesh_utils, view3d_utils
> >
> >> From: p_boelens at msn.com
> >> To: bf-committers at blender.org
> >> Date: Wed, 30 Jul 2014 23:09:57 +0200
> >> Subject: [Bf-committers] Missing half of bpy_extras module
> >>
> >> Hey everyone,
> >>
> >> I was looking for a way to easily load an image through Python (and store the resulting image in a variable) and found "bpy_extras.image_utils.load_image()". However, my bpy_extras module only contained the following two submodules:
> >>
> >> - io_utils
> >> - object_utils
> >>
> >> Thinking it was my old version of Blender (2.69) I downloaded 2.71 and found only one new entry:
> >>
> >> - keyconfig_utils
> >>
> >> What happened to all the others (anim, image, mesh and view3d)? All of these are listed in the API docs, even for 2.69[1]. Do they (still) exist? Have they been (re)moved/ renamed?
> >>
> >> Thanks,
> >> Patrick
> >>
> >> [1] http://www.blender.org/documentation/blender_python_api_2_69_1/bpy_extras.html
> >>
> >> _______________________________________________
> >> Bf-committers mailing list
> >> Bf-committers at blender.org
> >> http://lists.blender.org/mailman/listinfo/bf-committers
> >
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
> 
> 
> 
> -- 
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
 		 	   		  


More information about the Bf-committers mailing list