"Extensions Used/Required" property

This is something I mentioned briefly in the chat during yesterday’s Developer MeetUp.
I thought it could benefit from a dedicated discussion before I file a proper request in the Github tracker.


The GLTF file format has an interesting feature.
When a .gltf file is generated using extensions, these extensions are listed in a property called extensionsUsed. If the extensions are critical to being able to read the file correctly, they can also be listed in the extensionsRequired property.

Then when an application opens such a .gltf file, it can check if the extensions are available and warn the user that they are missing. Or even refuse to open the file if the missing extensions are required.

GLTF is an open exchange file format. So in this context, ‘extensions’ extend the file format, not the applications.
But I think a similar concept could be used in SketchUp.

I don’t think extensionsRequired would be relevant, but something like extensionsUsed could be very useful.
This should be opt-in, as many extensions are one-off drawing tools or similar. But extensions that rely on saving attributes to the model or other entities, and reacting to the presence of these attributes when reopening the file, could register to that list.

This would facilitate sharing project files between team members using extensions, ensuring everyone use the same extensions, same versions, etc.
This could also be useful for individuals opening older projects.

Thoughts?

@kathy_davies @ChrisFullmer @tt_su @ene_su @Mark

3 Likes

So this would be related to extensions adding attribute data to the model and allowing SU to give guidance to users for what they need for the full experience? (Any other scenarios I’m not thinking of?)

Maybe I should give a real-world example.
This is just one example, I think many other situations could benefit from this, especially in a team environment.


As you know, we make Skatter. It takes Component Definitions and creates a bunch of instances in the model. But it also has a “Render-only” feature. When it’s enabled, the instances are not created in the model, but Skatter sends the instances data (definition used per instance, the transformation, the material applied to that instance, etc) directly to the rendering engine (V-Ray, Enscape, etc).

Obviously, Skatter needs to be active when the render starts for this to work.

Let’s imagine this situation:

  • User A prepares a SketchUp model for rendering in V-Ray. They create several Skatter compositions, for grass, trees, etc. These compositions are set to “Render-only” to avoid cluttering the model and slowing it down.
  • User B joins the team and is tasked to render several images of the model. They open the model and start a V-Ray render.
    If Skatter is not installed or disabled, the grass and trees will not appear in the renders.

Obviously, user B can ask user A for guidance, and they will find out that Skatter needs to be installed. But it’s time lost, especially if several extensions like this are missing and the lack of each one creates a different issue that needs to be diagnosed.
Skatter is sometimes used for smaller things that are less obvious than grass or trees. The fact that these small parts are missing may be noticed late in the rendering process and waste a lot of time.

Another situation:

  • An individual user created a model several months/years ago. Renderings were made.
  • Months/Years later, the client asks for modifications that require re-rendering the same images.
  • The user opens the old model on a new machine and starts rendering, only to find out that parts are missing. They will need to diagnose that Skatter needs to be installed.

I guess the extension version should probably be saved as well. Many extensions are backward-compatible and have an upgrade/migration mechanism, but they are rarely forward-compatible.
One last hypothetical situation:

  • User A creates a SketchUp model with Skatter v2
  • User B opens the model and starts a V-Ray render. The grass and trees are missing. They have Skatter v1 installed, so they might not understand why it’s not rendering and that they need to update Skatter.

The proposed idea is to have a list attached to the model, to which extensions can register. When the model is re-opened and some listed extensions are not installed/enabled, SketchUp warns the user.

In the above examples, when a Skatter composition is generated using the “Render-only” mode, Skatter registers itself to that list.

Maybe something like Model#register_used_extension
Or maybe a flag when using Model/Entity#set_attribute ?

3 Likes

Thank you for the context. This is very interesting and fits well into our recent focus on the overall extension user experience.

When reading this I thought of VSCode, what allow a project to provide a list of recommended extensions that is then suggested upon opening the project if these extensions are missing. Quite a handy feature.

2 Likes

This sounds interesting. And cleaner than the old SketchyPhysics approach of just adding a screen space 2d text stating the extension is needed.

It could open up for abuse as extension developers could list their extension as required, even if it’s a pure drawing extension and not used to later read back/edit anything, but we could document the intent and look at it in our reviews.

2 Likes