System Information
Operating system: Windows 10
Graphics card: Nvidia GTX 980 Ti
Blender Version
Broken:
2.80, ad707115d5bc, blender2.8, 2019-01-17
Short description of error
after changing location or rotation and calling for bpy.context.scene.update(), the world_matrix does not change.
It seems to stay stale as long as the popup is active.
On popup reactivation, the matrix gets updated once(sometimes twice) and then goes stale again.
Exact steps for others to reproduce the error
- paste code below to 'scripting' and run it
- launch operator from 'space'(search) popup: 'TEZZT_P'
- change float property
- notice, how the object is moving, but the printed in the console(as 'INFO' message) values do not change
- release operator popup
- launch again
- notice that the printed 'INFO' values have changed, but do not via slider any more
import bpy
class OpTeztPopup(bpy.types.Operator):
bl_idname = "tezt.op_tezt_p"
bl_label = "TEZZT_P"
bl_options = {'REGISTER', 'UNDO'}
location_x : bpy.props.FloatProperty()
def execute(self, context):
d1 = str(context.object.matrix_world[0][3])
context.object.location[0] = self.location_x
#throw everything, something might stick:
context.scene.update()
bpy.context.scene.update()
d2 = str(context.object.matrix_world[0][3])
debug = "{} ::: {}".format(d1, d2)
print(debug)
op : bpy.types.Operator = self
op.report({'INFO'}, debug)
return {"FINISHED"}
def invoke(self, context, event):
return context.window_manager.invoke_props_popup(self, event)
classes = [
OpTeztPopup
]
def register():
for c in classes:
bpy.utils.register_class(c)
def unregister():
for c in classes:
bpy.utils.unregister_class(c)
if __name__ == '__main__':
register()