Page MenuHome

Make a design for operators CoW support
Closed, ResolvedPublic

Description

Make a design which will cover the following topics:

  • What exactly is in bContext? (need to LOCK DOWN whether it's original or evaluated entities)
  • How to efficiently and reliably (in terms of being robust against mistakes) access evaluated/original datablocks.
  • How will interface and python API access original/evaluated data.

The goal is: make a design document which we can just follow and start porting operators to CoW without worrying how to do it.

Details

Type
To Do

Event Timeline

Sergey Sharybin (sergey) triaged this task as Normal priority.

Some quick notes on progress.

After discussion with @Brecht Van Lommel (brecht), we agree on:

  • bContext contains original datablocks. This means CTX_data_scene will give original scene, NOT evaluated.
  • Same applies to datablocks from python's copntext.
  • bpy.data is original data, same as bmain.
  • We make it very clear in naming whether datablocks is original or not. Convention is: ob is original object, ob_eval is evaluated one (same applies to any datablock, just ALWAYS use _eval for evaluated version of datablocks)

What is done so far:

  • Properties in the interface are now shown from evaluated data, rB821722ac057,
  • Following example changes are pending on review:
    • D3036: Manipulator: Use evaluated object's matrix to get maipulator position
    • D3158: Make View Selected to be aware of copy-on-write
    • D3159 :Camera manipulator: Make it aware of evaluated version of object

Next steps:

  1. Get agree on the code and conventions.
  2. Make a formal design document.
  3. Commit all pending patches as examples.
  4. We will be ready for task force!
Dalai Felinto (dfelinto) closed this task as Resolved.Apr 30 2018, 10:10 AM