You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: changes.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,21 @@
1
1
# Change Log
2
2
3
+
XD Release 28.0.12 (March 2020)
4
+
-------------------------------------
5
+
XD 28 is a minor update for plugin developers:
6
+
7
+
*`SceneNode.BLEND_MODE_*` constants for use with the [`SceneNode.blendMode`](./reference/scenegraph.md#SceneNode-blendMode) property (which was introduced in XD 27).
8
+
* Quickly look up a scenenode by its GUID with [`scenegraph.getNodeByGUID()`](./reference/scenegraph.md#module_scenegraph-getNodeByGUID).
9
+
* Easily check if a scenenode is currently in scope for editing with [`isInEditContext()`](./reference/selection.md#selection-isInEditContext).
10
+
11
+
### Known Issues
12
+
* XD 28 introduces two new types of interaction actions: audio-file playback, and "scroll to" actions. Interactions using these features are not visible to plugins yet (*speech*
13
+
playback interactions *are* exposed though). See the [interactions API documentation](./reference/interactions.md#module_interactions-allInteractions) for a complete list of
14
+
which interaction types are & aren't exposed to plugins at this time.
15
+
16
+
[Read more about XD 28 new features for end users on the Adobe blog](https://theblog.adobe.com/xd-march-2020-audio-prototyping-anchor-links-more).
17
+
18
+
3
19
XD Release 27.0.12 (February 2020)
4
20
-------------------------------------
5
21
XD 27 is a minor update for plugin developers, with one new added API:
Copy file name to clipboardExpand all lines: known-issues.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
- In the past, XD's renderer would fail asserts (possibly even crash) with 0-size objects. I couldn't repro that any more, but unless we're covering it well as an officially supported case, it could easily regress again. There are some other minor bugs though, e.g. sharing fails if you have any 0-width/height artboards and bitmap export fails if any of the top-level items you're trying to export are 0-width/height.
19
19
- Longer plugin command names may be truncated in the menu on Windows
20
20
- Workaround: keep your plugin command names short!
21
-
-Keypress/gamepad, hover, and component state-transition interactions are not returned to plugins yet when requesting the list of interactions on a scenenode or the entire document.
21
+
-Some types of interactions are not visible to plugins yet: keypress/gamepad, scrolling, hover, component state transitions, or non-speech audio playback.
> Interactions are a **fast-changing area** in XD. APIs here have a higher likelihood of becoming deprecated, or lagging behind new XD features, than other parts of XD's plugin APIs.
18
+
19
+
**Since**: XD 19+ (some APIs added later)
17
20
18
21
**Example**
19
22
```js
@@ -190,7 +193,8 @@ specifies a `triggerNode` and the result of getting [`triggerNode.triggeredInter
190
193
191
194
May include interactions that are impossible to trigger because the trigger node (or one of its ancestors) has `visible` = false.
192
195
193
-
Note: currently, this API excludes all of the document's keyboard/gamepad, hover, and component state-transition interactions.
196
+
> **Tip**
197
+
> Currently, this API excludes some types of interactions: keypress/gamepad, scrolling, hover, component state transitions, or non-speech audio playback.
194
198
195
199
**Kind**: static property of [<code>interactions</code>](#module_interactions)
@@ -105,7 +106,6 @@ Object representing the current selection state and [edit context](./core/edit-c
105
106
**Read only**: true
106
107
**Since**: XD 14
107
108
108
-
109
109
* * *
110
110
111
111
<aname="module_scenegraph-root"></a>
@@ -117,6 +117,37 @@ Root node of the current document's scenegraph. Also available as the second arg
117
117
**Read only**: true
118
118
**Since**: XD 14
119
119
120
+
* * *
121
+
122
+
<aname="module_scenegraph-getNodeByGUID"></a>
123
+
124
+
### *scenegraph.getNodeByGUID(guid)*
125
+
**Since**: XD 28
126
+
127
+
Returns the scenenode in this document that has the given [node GUID](#SceneNode-guid). Returns undefined if no such node exists connected
128
+
to the scenegraph tree (detached/orphan nodes will not be found). This provides a fast way of persistently remembering a node across plugin
129
+
operations and even across document open/closes.
130
+
131
+
**Kind**: static method of [<code>scenegraph</code>](#module_scenegraph)
132
+
**Returns**: `?SceneNode`
133
+
134
+
| Param | Type | Description |
135
+
| ------- | ------- | ------------- |
136
+
| guid | string | SceneNode GUID -- must be all lowercase, as returned by the [`guid` getter](#SceneNode-guid). |
137
+
138
+
**Example**
139
+
```js
140
+
let node =scenegraph.selection.items[0];
141
+
let guid =node.guid;
142
+
143
+
// ...later on:
144
+
let sameNode =scenegraph.getNodeByGUID(guid);
145
+
if (sameNode) {
146
+
// ^ Always check if node still exists - user may have deleted it
147
+
console.log("Found node again!", sameNode);
148
+
}
149
+
```
150
+
120
151
121
152
* * *
122
153
@@ -166,10 +197,14 @@ Base class of all scenegraph nodes. Nodes will always be an instance of some _su
166
197
<aname="SceneNode-guid"></a>
167
198
168
199
### *sceneNode.guid : <code>string</code>*
169
-
Returns a unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. Cut-Paste will result in a new guid, however.
200
+
Returns a unique identifier for this node that stays the same when the file is closed & reopened, or if the node is moved to a different part of the document. Cut-Paste will result in a new GUID, however.
201
+
202
+
The GUID is guaranteed unique _within_ the current document, but _other_ documents may contain the same GUID value. For example, if the user makes a copy of an XD file, both files will use the same GUIDs.
170
203
171
204
The GUID of the [root node](#module_scenegraph-root) changes if the document is duplicated via Save As. See [`application.activeDocument.guid`](./application.md#module_application-activeDocument) for details.
172
205
206
+
Node objects can be destroyed and recreated during operations such as Undo/Redo, so if you need to store a reference to a node even between operations in the _same_ session, it's best to store the GUID and then retrieve the node later via [`getNodeByGuid()`](#module_scenegraph-getNodeByGUID).
207
+
173
208
**Kind**: instance property of [<code>SceneNode</code>](#SceneNode)
174
209
**Read only**: true
175
210
@@ -267,9 +302,17 @@ Node's opacity setting. The overall visual opacity seen in the document is deter
267
302
268
303
Blend mode determines how a node is composited onto the content below it.
_Note:_ for leaf nodes (GraphicNode), the XD UI may show leaf nodes as blend mode "Normal" even when the underlying value is `BLEND_MODE_PASSTHROUGH`. This is because "Pass Through" and "Normal" are essentially equivalent for leaf nodes -- they only differ
**Kind**: instance property of [<code>SceneNode</code>](#SceneNode)
274
317
275
318
* * *
@@ -504,7 +547,7 @@ is an [Interaction object](./interactions.md#Interaction) which describes a gest
504
547
505
548
Note: If this node (or one of its ancestors) has `visible` = false, tap and drag interactions on it will not be triggered.
506
549
507
-
Currently, this API excludes any keyboard/gamepad, hover, and component state-transition interactions on this node.
550
+
Currently, this API excludes some types of interactions: keypress/gamepad, scrolling, hover, component state transitions, or non-speech audio playback.
The preferred parent to insert newly added content into. Takes into account the current edit context as well as the "focused artboard" if in the root context.
124
+
Typically this is the same parent where, for example, XD's shape drawing tools would add items.
125
+
126
+
_Selected items are not necessarily all immediate children of the `insertionParent`._ They can be anywhere within the [edit context's](/reference/core/edit-context.md) scope.
127
+
128
+
**Kind**: instance property of [<code>selection</code>](#selection)
The artboard the user is currently most focused on (via recent selection or edit operations). May be null, for example if no artboards exist or if the user just deleted an artboard.
137
+
138
+
**Kind**: instance property of [<code>selection</code>](#selection)
The preferred parent to insert newly added content into. Takes into account the current edit context as well as the "focused artboard" if in the root context.
144
-
Typically this is the same parent where, for example, XD's shape drawing tools would add items.
145
-
146
-
_Selected items are not necessarily all immediate children of the `insertionParent`._ They can be anywhere within the [edit context's](/reference/core/edit-context.md) scope.
147
-
148
-
**Kind**: instance property of [<code>selection</code>](#selection)
The artboard the user is currently most focused on (via recent selection or edit operations). May be null, for example if no artboards exist or if the user just deleted an artboard.
166
+
### *selection.isInEditContext(node)*
167
+
**Since**: XD 28
157
168
158
-
**Kind**: instance property of [<code>selection</code>](#selection)
159
-
**Read only**: true
169
+
Returns true if the node is accessible for editing in the scope of the current edit context.
170
+
If false, the node cannot be edited given the user's current selection.
171
+
Nodes that are currently selected are always in the current edit context.
160
172
161
-
* * *
173
+
**Kind**: instance method of [<code>selection</code>](#selection)
0 commit comments