Core: Add getPlacementOf replacing previous getGlobalPlacement logic. (#26059)

* Core: Add getPlacementOf replacing previous getGlobalPlacement logic.

* Update src/App/DocumentObject.cpp

Co-authored-by: Kacper Donat <kadet1090@gmail.com>

* Update DocumentObject.cpp

* Fix error when called from python with targetObj == None

---------

Co-authored-by: Kacper Donat <kadet1090@gmail.com>
This commit is contained in:
PaddleStroke
2025-12-10 22:47:20 +01:00
committed by GitHub
parent c12ca7b3ba
commit 7a8135d863
11 changed files with 368 additions and 35 deletions

View File

@@ -325,3 +325,10 @@ class DocumentObject(ExtensionContainer):
Return true if the object is part of a document, false otherwise.
"""
...
def getPlacementOf(self, subname: str, target: DocumentObject = None, /) -> Any:
"""
Return the placement of the sub-object relative to the link object.
getPlacementOf(subname, [targetObj]) -> Base.Placement
"""
...