Page MenuHome

bpy.ops.wm.append / link is broken
Closed, InvalidPublic


System Information
Win7 64bits / 760 GTX

Blender Version
Broken: 2.76 to 2.76b
Worked: 2.75 and before

Short description of error
The bpy.ops.wm.append and command doesn't seem to import items correctly.

Exact steps for others to reproduce the error
This code is running well on the 2.75, but doesn't do anything on the 2.76 release. There are no error message in the console but nothing object are imported.

folderpath = "C://ProjectsBlender"
filename = "my_file.blend"
datablock = "Object"
object_selected = "my_object"
bpy.ops.wm.append(directory=folderpath+filename+"/"+datablock+"/", filepath=filename, filename=object_selected)



Event Timeline

Vincent Girès (VincentG) set Type to Bug.
Vincent Girès (VincentG) created this task.
Vincent Girès (VincentG) raised the priority of this task from to Needs Triage by Developer.
Bastien Montagne (mont29) closed this task as Invalid.
Bastien Montagne (mont29) claimed this task.

I don’t know if that code worked in previous version of Blender, but if it did it was by mere accident. Here is correct code, which is working here (once adapted to linux paths):

import os
folderpath = "C://ProjectsBlender"
filename = "my_file.blend"
datablock = "Object"
object = "my_object"
bpy.ops.wm.append(directory=os.path.join(folderpath, filename, datablock), filename=object)

Thank you!
Sorry to have considered this as a bug.