Commit Graph
2 Commits
Author SHA1 Message Date
Magne Sjaastad ebf75c09a1 #14411 Enforce name uniqueness for surfaces, polygons and folders
* #14411 Enforce name uniqueness for surfaces, polygons and folders

Names must be unique among siblings sharing the same parent folder. Items in different folders may keep identical names, and comparison is case sensitive.

Siblings are the objects held by the same caf::PdmChildArrayField. Items and folders live in two distinct child arrays in caf::PdmNestedCollection, so a folder and an item may share a name under the same parent.

The Python API gets an OnNameConflict flag on AddFolder, CreatePolygon, ImportSurface and NewRegularSurface, supporting FAIL (default), AUTO_RENAME and OVERWRITE. NewSurface is left out, as grid case surfaces derive their tree label from the case and K index and carry no name of their own.
2026-08-07 08:34:58 +02:00
Magne Sjaastad 1e0ba3cdec #13987 PDM: Add RicNewNestedCollectionFeature and RimcNestedCollectionBase
Generalise the per-domain "Add Folder" command and the scripting-side
add-folder method so they work against any container that exposes
caf::PdmNestedCollectionBase.

- RicNewNestedCollectionFeature: command feature that walks the
  selected PdmObject up to the nearest PdmNestedCollectionBase ancestor
  and calls addNewSubCollection(). Hidden via canAddSubCollection() for
  leaf containers.
- RimcNestedCollectionBase: scripting wrapper exposing the same
  add-sub-collection action through the Python interface, so generated
  Python bindings get the operation for free on every derived class.

Neither is wired to a concrete collection yet; the per-domain features
remain in place until the migration commit replaces them.
2026-05-13 14:53:00 +02:00