Difference between revisions of "Pane Class"

From TouchDesigner Documentation
Jump to: navigation, search
(Pane Class Auto Create)
(officializing)
(Tag: 2020.20000)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TDClassSummary|summary=The Pane class describes an instance of a pane interface.  It can be accessed through the ui.panes object. It is the parent class of the NetworkEditor Class.}}
+
{{TDClassSummary|label=Pane|summary=The Pane class describes an instance of a [[Pane|pane]] interface.  It can be accessed through the [[Panes Class|ui.panes]] object. It is the parent class of the [[NetworkEditor Class]].}}
 
<section begin=HELPBODY />
 
<section begin=HELPBODY />
 
{{ClassMemberSection|empty=
 
{{ClassMemberSection|empty=
 
|Sectionsummary=
 
|Sectionsummary=
 
|items=
 
|items=
 
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
     |name=bottomLeft
+
     |name=owner
     |type=
+
     |type=COMP
 +
    |set=1
 +
    |text=Get or set the [[COMP Class|component]] this pane points to.}}
 +
{{ClassMember
 +
    |class=Pane
 +
    |name=id
 +
    |type=int
 
     |set=0
 
     |set=0
     |text=The coordinates of the bottom left corner, expressed in both pixels and uv offsets, in a named tuple.
+
     |text=A unique numeric identifier.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
 
     |name=link
 
     |name=link
     |type=
+
     |type=int
     |set=0
+
     |set=1
 
     |text=Get or set the numeric link index.
 
     |text=Get or set the numeric link index.
 +
}}
 +
{{ClassMember
 +
    |class=Pane
 +
    |name=enable
 +
    |type=bool
 +
    |set=1
 +
    |text=Get or set mouse and keyboard interactivity on the pane.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
 
     |name=maximize
 
     |name=maximize
     |type=
+
     |type=bool
     |set=0
+
     |set=1
 
     |text=Enable or disable the pane maximize state.
 
     |text=Enable or disable the pane maximize state.
 
}}
 
}}
Line 29: Line 41:
 
     |class=Pane
 
     |class=Pane
 
     |name=name
 
     |name=name
     |type=
+
     |type=str
     |set=0
+
     |set=1
 
     |text=Get or set the pane name.
 
     |text=Get or set the pane name.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
     |name=owner
+
     |name=ratio
     |type=
+
     |type=float
     |set=0
+
     |set=1
     |text=Get or set the component this pane points to.
+
     |text=Get or set the split proportion of the pane, if the pane was previously split.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
     |name=ratio
+
     |name=bottomLeft
     |type=
+
     |type=tuple(x,y,u,v)
 
     |set=0
 
     |set=0
     |text=Get or set the split proportion of the pane, if the pane was previously split.
+
     |text=The coordinates of the bottom left corner, expressed in both pixels and uv offsets, in a named tuple.
 
}}
 
}}
 
{{ClassMember
 
{{ClassMember
 
     |class=Pane
 
     |class=Pane
 
     |name=topRight
 
     |name=topRight
     |type=
+
     |type=tuple(x,y,u,v)
 
     |set=0
 
     |set=0
 
     |text=The coordinates of the top right corner, expressed in both pixels and uv offsets, in a named tuple.
 
     |text=The coordinates of the top right corner, expressed in both pixels and uv offsets, in a named tuple.
Line 57: Line 69:
 
     |class=Pane
 
     |class=Pane
 
     |name=type
 
     |name=type
     |type=
+
     |type=PaneType
 
     |set=0
 
     |set=0
 
     |text=The enumerated type of the pane. Example: NetworkEditor.
 
     |text=The enumerated type of the pane. Example: NetworkEditor.
 
The enumeration is called PaneType and consists of:
 
The enumeration is called PaneType and consists of:
PaneType.NETWORKEDITOR
+
*PaneType.NETWORKEDITOR
PaneType.PANEL
+
*PaneType.PANEL
PaneType.GEOMETRYVIEWER
+
*PaneType.GEOMETRYVIEWER
PaneType.TOPVIEWER
+
*PaneType.TOPVIEWER
PaneType.CHOPVIEWER
+
*PaneType.CHOPVIEWER
PaneType.ANIMATIONEDITOR
+
*PaneType.ANIMATIONEDITOR
PaneType.PARAMETERS
+
*PaneType.PARAMETERS
PaneType.TEXTPORT
+
*PaneType.TEXTPORT
}}
 
{{ClassMember
 
    |class=Pane
 
    |name=id
 
    |type=
 
    |set=0
 
    |text=A unique numeric identifier.
 
 
}}}}
 
}}}}
 
{{ClassMethodSection|empty=
 
{{ClassMethodSection|empty=
 
|Sectionsummary=
 
|Sectionsummary=
 
|items=
 
|items=
 
 
{{ClassMethod
 
{{ClassMethod
 
     |class=Pane
 
     |class=Pane
     |name=floatingCopy
+
     |name=changeType
     |call=floatingCopy()
+
     |call=changeType(paneType)
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Change the pane to the specified type.  Will return a new Pane object that represents the Pane. After being called, the current Pane instance will no longer be valid.
Return a floating copy of the pane.
+
*paneType - The type of pane to change this pane to.
 +
<syntaxhighlight lang=python>
 +
p = ui.panes[0]
 +
p = p.changeType(PaneType.TOPVIEWER)  # note: must re-assign p to new object.
 +
</syntaxhighlight>
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
Line 93: Line 101:
 
     |name=close
 
     |name=close
 
     |call=close()
 
     |call=close()
     |returns=
+
     |returns=None
     |text=:
+
     |text=Close the pane.
Close the pane.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
 
     |class=Pane
 
     |class=Pane
     |name=splitBottom
+
     |name=floatingCopy
     |call=splitBottom()
+
     |call=floatingCopy()
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Return a floating copy of the pane.
Split the bottom portion of the pane into a new pane.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
 
     |class=Pane
 
     |class=Pane
     |name=splitRight
+
     |name=splitBottom
     |call=splitRight()
+
     |call=splitBottom()
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Split the bottom portion of the pane into a new pane.
Split the right portion of the pane into a new pane.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
Line 117: Line 122:
 
     |name=splitLeft
 
     |name=splitLeft
 
     |call=splitLeft()
 
     |call=splitLeft()
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Split the left portion of the pane into a new pane.
Split the left portion of the pane into a new pane.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
 
     |class=Pane
 
     |class=Pane
     |name=changeType
+
     |name=splitRight
     |call=changeType(paneType)
+
     |call=splitRight()
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Split the right portion of the pane into a new pane.
Change the pane to the specified type.  Will return a new Pane object that represents the Pane. After being called, the current Pane instance will no longer be valid.
 
paneType - The type of pane to change this pane to.
 
p = ui.panes[0]
 
p = p.changeType(PaneType.TOPVIEWER)  #note: must re-assign p to new object.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
Line 136: Line 136:
 
     |name=splitTop
 
     |name=splitTop
 
     |call=splitTop()
 
     |call=splitTop()
     |returns=
+
     |returns=td.Pane
     |text=: -> Pane
+
     |text=Split the top portion of the pane into a new pane.
Split the top portion of the pane into a new pane.
 
 
}}
 
}}
 
{{ClassMethod
 
{{ClassMethod
Line 144: Line 143:
 
     |name=tearAway
 
     |name=tearAway
 
     |call=tearAway()
 
     |call=tearAway()
     |returns=
+
     |returns=bool
     |text=: -> boolean
+
     |text=Detach the pane into a floating window. Returns True if successful.
Detach the pane into a floating window. Returns True if successful.
 
 
}}}}
 
}}}}
 
<section end=HELPBODY />
 
<section end=HELPBODY />
 
{{History}}
 
{{History}}
 
{{#invoke:Category|list|Python Reference}}
 
{{#invoke:Category|list|Python Reference}}

Latest revision as of 17:37, 19 February 2020

The Pane class describes an instance of a pane interface. It can be accessed through the ui.panes object. It is the parent class of the NetworkEditor Class.


Members[edit]

ownerCOMP :

Get or set the component this pane points to.

idint (Read Only):

A unique numeric identifier.

linkint :

Get or set the numeric link index.

enablebool :

Get or set mouse and keyboard interactivity on the pane.

maximizebool :

Enable or disable the pane maximize state.

namestr :

Get or set the pane name.

ratiofloat :

Get or set the split proportion of the pane, if the pane was previously split.

bottomLefttuple(x,y,u,v) (Read Only):

The coordinates of the bottom left corner, expressed in both pixels and uv offsets, in a named tuple.

topRighttuple(x,y,u,v) (Read Only):

The coordinates of the top right corner, expressed in both pixels and uv offsets, in a named tuple.

typePaneType (Read Only):

The enumerated type of the pane. Example: NetworkEditor.

The enumeration is called PaneType and consists of:

  • PaneType.NETWORKEDITOR
  • PaneType.PANEL
  • PaneType.GEOMETRYVIEWER
  • PaneType.TOPVIEWER
  • PaneType.CHOPVIEWER
  • PaneType.ANIMATIONEDITOR
  • PaneType.PARAMETERS
  • PaneType.TEXTPORT

Methods[edit]

changeType(paneType)td.Pane:

Change the pane to the specified type. Will return a new Pane object that represents the Pane. After being called, the current Pane instance will no longer be valid.

  • paneType - The type of pane to change this pane to.
p = ui.panes[0]
p = p.changeType(PaneType.TOPVIEWER)  # note: must re-assign p to new object.

close()None:

Close the pane.

floatingCopy()td.Pane:

Return a floating copy of the pane.

splitBottom()td.Pane:

Split the bottom portion of the pane into a new pane.

splitLeft()td.Pane:

Split the left portion of the pane into a new pane.

splitRight()td.Pane:

Split the right portion of the pane into a new pane.

splitTop()td.Pane:

Split the top portion of the pane into a new pane.

tearAway()bool:

Detach the pane into a floating window. Returns True if successful.

TouchDesigner Build:

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.

A work area in TouchDesigner's layout that includes the Network Editor and 7 other pane types used for different tasks. The TouchDesigner interface can consist of a single pane, or be split into multiple panes.