Page MenuHome

Add Object Tool (WIP)
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Jan 27 2020, 2:12 AM.
Tokens
"Burninate" token, awarded by Dir-Surya."Love" token, awarded by LeoSch."Love" token, awarded by Schamph."Love" token, awarded by Schiette."Love" token, awarded by jfmatheu."Love" token, awarded by franMarz."Love" token, awarded by Leul."Love" token, awarded by amonpaike."Love" token, awarded by billreynish.

Details

Reviewers
None
Maniphest Tasks
T57210: Add Object Tools Todo
Summary

This is a work in progress patch for T57210: Add Object Tools Todo, this isn't ready for review yet.

What works:

  • Interactively adding primitives with two clicks.
  • Scene orientation used for new objects.
  • Position enum [ view-plane / axis-plane / surface ]
  • Origin enum [ base / center ]
  • Primitive object types [ cube / cylinder / cone / uv-sphere / ico-sphere ]
  • Settings for object types in the top-bar.
  • Constrain 1:1 aspect (Shift).
  • Toggle center (Alt).
  • Snapping (Ctrl).
  • Handle "Error" cases (when the cursor-plane intersection is behind the view for example).

TODO:

  • Add "Cone" icon.
  • Show a preview plane before adding the object.
  • Gizmos to adjust the dimensions after adding the object.

Diff Detail

Repository
rB Blender
Branch
TEMP-OBJECT-ADD (branched from master)
Build Status
Buildable 6526
Build 6526: arc lint + arc unit

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from Add Object Tool (WIP patch) to Add Object Tool (WIP).Jan 27 2020, 2:17 AM
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)

Update:

  • Add position [view-plane / axis-plane / surface].
  • Origin [base / center].
  • Use scene orientation setting for object rotation.
  • Add object types [cube / cylinder / cone / uv-sphere / ico-sphere ]
  • Expose settings object type settings in the top-bar.
Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)
  • Remove redundant headers
  • Add modal keymap, fix aspect option
  • Modifier keys to toggle center & fixed aspect ratio
  • When X-ray is disabled, draw in two passes, so it's possible to tell which lines are behind existing objects without obscuring the lines completely.
  • Use gizmo color.
  • Use thick line shader.
  • Rebase on master.
  • Add snapping support
  • Cleanup, move to 3D view, remove commented code
  • Add missing doc-strings, tweak UI spacing
  • Move add tools out of edit-mesh
  • Add descriptions for placement enum items
  • Use fallback when the projected point is behind the view
  • Fix center object toggle
  • Use plane as fallback for surface

Support running the operator directly (not as a tool)

Expose hide_keymap to RNA API