add_utils import add_object_data

from add_utils import add_object_data

anyone remember by what we can replace this command lines in old script ?

thanks

Hi Ricky,

is it this one?


>>> from bpy_extras.object_utils import 
                                        AddObjectHelper
                                        BoolProperty
                                        FloatVectorProperty
                                        add_object_align_init
                                        bpy
                                        mathutils
                                        object_add_grid_scale
                                        <b>object_data_add</b>

from old script
got these lines

from add_utils import AddObjectHelper, add_object_data

then

me.validate(verbose = True)
add_object_data(bpy.context, me, operator = None)

i think this has been replace with something else but what ?

may be new module or new command !

i found an old note

replace old way
from add_utils import add_object_data
from add_utils import AddObjectHelper
with
from bpy_extras import object_data_add
from bpy_extras import AddObjectHelper
and replace add_object_data by object_data_add

are these changes still valid ?

thanks

as batFINGER said, these functions should be located in bpy_extras.object_utils, but may use different names now.

seems to work now

but having problem to read as bmesh data now

object = bpy.context.object
mesh = object.data
bm = bmesh.new() # create an empty BMesh
bmesh=bm.from_mesh(object) # fill it in from a Mesh

this is not working

can you tell how to make it work?

i have some old script from last spring
and none of them are working because of some changes

thanks

as the function states, from_mesh expects a mesh, but you supply an object. If you wanna do so, you need to use from_object instead.

i found it this weekend

so all corrected

thanks