How to create a transparent entity like this

there is a cupboard ,in which it seems exist some transparent entity.
it is the cupboard below
image

and these are the transparent instance ,which will show like a blue box when selected
image
because these two picture are from a vedio ,I don’t have the skp file .so I don’t know how to create transparent entity like this by API.

Why do you believe what you (cannot) see is an entity?
Why not post a link to the video?


here is the video :grinning:

It certainly has lots of transparency. All I can see is the white background in the browser window. I’ve just watched 2 minutes 5 seconds of nothing.

:sweat_smile:i don’t know why…

The video does not use the SketchUp Select Tool. The SketchUp Select Tool has a black cursor. When this transparent something becomes visible, the cursor is the operating system’s default cursor.

The default cursor is used when a SketchUp extension developer creates a custom tool (and does not define any custom cursor). What happens here is that this extension sets up selection observers. When the user selects a component, the observer is triggered. The observer checks whether the component has certain attributes that have been created by this extension which means the component is editable with extension. Then the extension makes itself the active tool (this can be noticed by the change of cursor). Then the extension paints a highlighted rectangle on top of the viewport. This is not an entity.

To recreate this effect, you need to learn to develop a custom tool and to use the OpenGL drawing methods. It is best to start by thoroughly working through the LineTool tutorial (although it paints only a preview line on the viewport, not a transparent blue rectangle).

if the transparent blue rectangle is draw on the virtual view, it can be select?

No, with the select tool you can only select entities. Entities are persistent objects that have properties, attributes, are selectable and are stored in the .skp file. Something drawn on the viewport just has the appearance of an entity, but does not exist longer than a frame (then it needs to be redrawn for the next frame).

You can create almost anything with the SketchUp API. You can of course create an extension that, when it is active, simulates the native select tool but highlights things that are no real entities. But these can only be selected with your extension.

But why not create a real face and assign a transparent blue material to it?

1 Like

Have you given us a clue as to what the extension you are using is ?
Clearly it’s somewhat like a DC and shows the selected options for a specific tool within its set.

As explained it need a Tool set up, and the temporary ‘blue’ graphics are not selectable…

I think it is PowerSuTool by @powermedia
https://sketchucation.com/forums/viewtopic.php?f=323&t=16404

I can’t download the plugin in this link, but the plugin in vedio is a plugin of chinese version

I don’t have the plugin ,this is a vedio i saw on a chinese video website

well,it seems a way to create a real face that assigned a transparent blue [material]

If you want to create a temporary transparent blue face, group it to keep its geometry separate from the rest.
Create a new material that is blue and transparent.
Erase the group when you are finished.
That face/group will be available for snaps while it exists.

Alternatively, if you are making a new ‘Tool’ then there are ‘draw’ methods for that - e.g. to add temporary graphics like text/lines/faces with materials.
These are not ‘real’, so you can’t snap to them, and only exist during the Tool’s execution…

You need to create a free account at SketchUcation before you can download any plugins.