Adobe XD 28 for Plugin Developers

Rob Kleiman
Mar 20 · 2 min read

In this post, we highlight key additions in XD 28 relevant for developers building plugins for Adobe XD.

With the release of Adobe XD 28, there are some exciting updates for plugin developers, including:

  • Introduction of new constants to be used with theSceneNode.blend Modeproperty
  • The ability to look up a scenenode by its GUID
  • The ability to check if a scenenode is currently in scope for editing

Note that when using any of these APIs, you’ll need set your manifest minVersion to 28.0.

Blend mode constants

In Adobe XD 28, you can now leverage symbolic constants for blend mode. These new constants augment the blend mode API that shipped with the release of XD 27, which determines how a node is composited onto the content below it.

For example, if you wanted to change the blend mode of a scenenode to “overlay”, you can use this code:

aSceneNode.blendMode = scenegraph.SceneNode.BLEND_MODE_OVERLAY;

To see all the constants available as static members of the SceneNode class, review the documentation here.

getNodeByGUID()

It’s a common need for a plugin to quickly look up a node in the scenegraph. Previously this was only possible by traversing the entire tree, which can be problematic from a performance perspective in large documents.

The new getNodeByGUID()method can return the scenenode from a document that has the given node GUID, serving as its unique identifier. This functionality provides a fast way of persistently remembering a node across plugin operations and even across document open/closes.

For example:

const { homepageGUID } = documentRoot.pluginData;const homepageNode = scenegraph.getNodeByGUID(homepageGUID);

You can find the documentation here.

isInEditContext()

This function will return true if the node is within the current edit context. If false, the node cannot be edited given the user’s current selection.

This is useful if you want your plugin to traverse a whole subtree and edit as much of it as possible without risk of throwing an error.

const editableElements = nodes.filter(node => node.isInEditContext());

You can find the documentation here.

Things to keep in mind

Again, please note that when using any of these new APIs, you’ll need set your manifest minVersion to 28.0.

Also note that the new interaction types introduced in XD 28 (audio-file playback, “scroll to” actions) are not exposed to plugins yet. But you’ll definitely want to take advantage of these exciting features in your own XD designs.

Several other interaction types already have the same caveat — for a complete list we recommend you review the interactions API documentation.

Additional Resources

If you have any questions or comments, feel free to let us know in the Adobe XD Platform Forums.

For more stories like this, subscribe to our Creative Cloud Developer Newsletter.

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers…

Thanks to Ash Ryan Arnwine

Rob Kleiman

Written by

Strategist, writer & community builder based in NYC. Informing and engaging a global community of creative technologists. Developer Experience Team @ Adobe

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers, and technology.

More From Medium

More from Adobe Tech Blog

More from Adobe Tech Blog

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade