0
$\begingroup$

I am generating some shape using python in Blender. Most of the times, when I run the code I get what I expect. But sometimes I see the broken mesh as I have shown in the figure.

As far as code's functionality is concerned, I am not using any random function/ number. Code is expected to give out deterministic result every time I run it.

Any suggestions on what might be causing this inconsistent behavior?

Broken Mesh

Expected Mesh

$\endgroup$
  • $\begingroup$ Possibly something in your code that triggers undefined behavior? docs.blender.org/api/current/… $\endgroup$ – Robert Gützkow Dec 5 '19 at 17:56
  • 1
    $\begingroup$ Are you using any bpy.ops commands? Some are context sensitive, require certain windows or react to e.g. the mouse position.# $\endgroup$ – Leander Dec 5 '19 at 18:26
  • $\begingroup$ @RobertGützkow -- yes I think bpy.ops is the cause. $\endgroup$ – Rahul Dec 11 '19 at 21:33
  • $\begingroup$ @Leander I am using bpy.ops. I think that might be the cause for the inconsistency. I have found this post and I will correct this and get back. $\endgroup$ – Rahul Dec 11 '19 at 21:35

Your Answer

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

Browse other questions tagged or ask your own question.