Eneroth Attribute Editor
Advanced attribute editor supporting classes like arrays, vectors and points, and entities like definitions, layers, materials and models. Includes tool to pick points and vectors.
Eneroth Attribute Editor

About

This is an advanced attribute editor that works on multiple types of entities. In addition to what can be selected in the model, materials, layers, component definitions and models are supported entities.

In contrast to other attribute editors (at least those I've seen) other classes than strings can be saved to an attribute, such as array, point3d and vector3d.

How to use

To edit attributes for an entity that can be selected in the model, select it (without having anything else selected), right click it and chose 'Attribute Editor'.

For other entities select something in the model using that entity (eg. component definition, material or layer) and go to 'Plugins > Attribute Editor'. Please not that on faces only the front material can be reached. This menu is also used to reach the active model's attributes.

You can have as many attribute windows open as you wish to compare or copy values between different entities. Click a value to edit it, a key to rename it and the attribute dictionary header to rename the whole dictionary.

When editing a value what you write will be executed similar to writing it in the console. This means you can create object of a range of classes but also that normal strings needs "quotes around them". Examples of supported classes are arrays ([]), lengths, points and vectors. You can also use references to other entities, such as Sketchup.active_model.election[0].length for the exact length of a selected edge.

In the edit value dialog there's a button activating a tool to get points and vectors from the model by clicking in it.

When saving attributes (clicking OK or Apply) the plugin will warn you if a class isn't supported by SU attributes and value cannot be saved.

Example Uses

Model id for 3d warehouse

The model id for 3dwarehouse is saved as an attribute to the model entity when a model is shared. If you want to re-upload a model without replacing an existing version in 3dwarehouse, or want to replace and older version of a model that you forgot to save after uploading you need to manually set the model id.

With this extension, go to 'Plugins > Attribute Editor > Current model' and change the key "ModelID" in the dictionary "3DWarehouse".

To get the id of a model in 3dwarehouse, select what's between "?id=" and either "&" or the end of the URL.

Developing own plugins

If you developed a plugin that relies on attributes this plugin is very useful to test and debug. That's why I created it in the first place.

Change log

1.0.1

  • Supports for group and image definitions in addition to component definitions
  • Support for nested attributes dictionaries
  • Tool for selecting vertices to edit their attributes
  • Support for special characters in values (this previolsly preventing the plugin to be used on some dynamic component's definitions)
  • Now warns user that the dictionary containing model/component credits cannot be altered.

 

Reviews

Steve N's picture

Eneroth plugins are awesome!

Devin K's picture

Nice meeting you at BaseCamp. Thanks for telling me about your plugin, it's quite useful :)

Thomas T.'s picture

This is a great tool for developers! Thank you very much!

2177 users
Size:
10.67 KB
Version:
Eneroth Attribute Editor (1.0.1); March 16, 2014
Number of Views: 
16958
Category: 
OS Compatibility: 
Languages: