ZumoLabs / zpy

Synthetic data for computer vision. An open source toolkit using Blender and Python.
GNU General Public License v3.0
304 stars 35 forks source link

Better Run button #65

Closed hu-po closed 3 years ago

hu-po commented 3 years ago

To properly run the "run" script, a zpy user has to click the "Run" button under the ZPY panel. If they click the "Run" button in the Blender script panel, it will not save and reset the scene, resulting in simulation drift. We should provide a warning, or simply make the "run" button in the blender script also a valid option.

hu-po commented 3 years ago

clicking the Run button in the Execute Panel is causing Blender to fudge the context in some way? I've tried smaller versions of the scripts and run them from the text editor's run button and they work fine, it's when you use the zpy Run function that things go wrong

hu-po commented 3 years ago

Object selection does not change bpy.context.active_object image

hu-po commented 3 years ago

image

sammiezumo commented 3 years ago

image

sammiezumo commented 3 years ago

selection != active object is what I've found so far. This snippet clears both selection and active object, then sets again. Works to select the object but doesn't seem to fix the problem with the make objects real operator.

hu-po commented 3 years ago

Might have found a clue here. There seems to be a difference between "active" and "selected" image

hu-po commented 3 years ago

Also hitting Play button on the script does not cause this: image