Page MenuHome

Object remains in phantom mode between edit and object
Closed, ArchivedPublic

Description

As visible in the video,

when running this code as part of a unit test, the mesh goes into this weird mode

def setUp(self):
        bpy.ops.wm.read_homefile()
        bpy.data.objects.remove(bpy.data.objects['Cube'], do_unlink=True)

(...)

def test_add_column(self):
        bpy.context.scene.cursor_location = (3, 3.275, 0)
        bpy.ops.toaster.add(mesh="column")
        self.assertIsNotNone(bpy.data.objects['Cube'], "No column created")
        self.assertEquals(bpy.data.objects['Cube'].location[0], 3, "Column not at the correct position")

which then eventually calls

bpy.ops.mesh.primitive_cube_add(location=(0,0,z))
bpy.ops.transform.resize(value=(1,1,4))
return bpy.context.object

The code fails to resize (due to unrelated context reason - the version shown in the video uses bpy.context.scene.active_object and resizing worked) and then blender stays in the phantom state as shown in the video.

Removing the line bpy.ops.wm.read_homefile() makes the bug go away.

To reproduce, you need both zip files installed as addons and enabled (install from file should work, though untested). Then click on the tests on the tools panel.


Details

Type
Bug

Event Timeline

Bastien Montagne (mont29) lowered the priority of this task from Normal to Needs Information from User.Mar 14 2019, 10:44 AM

Is this still happening in blender 2.8?

I will have to check, but this might take a while.

Philipp Oeser (lichtwerk) closed this task as Archived.

Since last asking for information it has been 7 or more days, due to the policy of our bug tracker we will have to archive the report until the requested information is given.
(@Michael Demetriou (qwazix) : just reopen if you've checked and issues persist)