|
|
| 메뉴 위치 |
|---|
| 편집 → 파이썬 콘솔로 보내기 |
| 작업대 |
| 모두 |
| 기본 단축키 |
| Ctrl+Shift+P |
| 도입 버전 |
| 0.19 |
| 참조 |
| 없음 |
표준 파이썬 콘솔로 보내기(Std SendToPythonConsole) 명령은 선택한 개체를 참조하는 변수를 파이썬 콘솔 안에 생성합니다. 만약 개체의 하위 셰이프를 선택했다면 변수 2개가 더 생성됩니다. 하나는 개체의 셰이프를 참조하고 다른 하나는 하위 셰이프 자체를 참조합니다. 관련 변수와 코드는 파이썬 코드를 작성하는데 사용할 수 있습니다.
The following variables are created:
| Variable | Referenced object(s) |
|---|---|
sels |
A list of selection objects (one for each selected object) |
sel |
The last item in sels (belonging to the last selected object)
|
doc |
The document containing the selected objects |
objs |
A list with an item for each selected object: The selected object itself (if it is not a Link) |
obj |
The last item in objs (belonging to the last selected object)
|
lnks |
A list with an item for each selected object: The selected object itself (if it is a Link) |
lnk |
The last item in lnks (belonging to the last selected object)
|
shps |
A list with an item for each obj in objs:The |
shp |
The last item in shps (belonging to the last item in objs)
|
subs |
A list with the selected subobjects. The list is empty if no subobjects have been selected. |
sub |
The last item in subs, or None if subs is empty.
|
names |
A list with a tuple for each selected object. Each tuple contains the names of the subobjects belonging to that object. The tuple is empty if no subobjects have been selected for the object. |
name |
The last item in the last tuple in names, or None if that tuple is empty.
|
App::Link) and whose linked object has a Shape, the item in shps will be the shape of the linked object. If the Links have been transformed or scaled and you want to access the scaled/transformed shapes, you can do so with this code:lnk_shps = [Part.getShape(l) if l else None for l in lnks]
lnk_shp = Part.getShape(lnk) if lnk else None