1
$\begingroup$

Faced with a problem that causes crash Blender 2.80. For automation I created a script from a sequence of actions which works great if I run it in the blender console window, or if i Run Script in a text editor.

But when I run this script through the command line without the graphical shell of the blender - he crashed.

enter image description here

Еhe exception method was used to find the reason. This is the command bpy.ops.object.material_slot_assign ()

She is responsible for applying the material to the vertices in Edit Mode.

import bpy 

bpy.ops.object.editmode_toggle()    
bpy.ops.mesh.select_all(action='SELECT')    
bpy.context.object.active_material_index = 1    
bpy.ops.object.material_slot_assign() 

If I exclude bpy.ops.object.material_slot_assign (), the script succeeds, except that the materials are not used.

Who knows how to get around this command?

$\endgroup$
0
$\begingroup$

A little later, I reported to the developers and they fixed this error. T70714 This question has ceased to be relevant.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.