SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
39 stars 10 forks source link

UI.show_inspector - Missing Entity Info panel #576

Open Fredosixx opened 3 years ago

Fredosixx commented 3 years ago

Something strange...! The EntityInfo panel does not seem to be in the list of instructors.

Currently UI.instructor_names gives the following list (on SU2020):

["Materials", "Components", "Styles", "Scenes", "Shadows", "Layers", "SoftenEdges", "Outliner", "Instructor", "Fog", "MatchPhoto"]

So there is no way to show the Entity Info panel from Ruby with the method UI.show_instructor.

Do I miss something?

Note: there are other ways to invoke the Entity Info panel, but my question is related to UI.show_instructor.

thomthom commented 3 years ago

I checked UI.inspector_names back to SU6 and it seems that it was never in that list. (Strange).

I just checked the source and the list is hard-coded. Not a dynamic list. (Fortunately "Layers" still work.)

I wasn't able to find any other means to open Entity Info I'm afraid. We'll have to add it.

Fredosixx commented 3 years ago

on Windows, with SU versions based on the tray GUI, you can use Sketchup.send_action 24300. However, the main drawback is that it acts as a toggle since it shows / hides the Entity Info panel in the tray. In contrast, UI.show_inspector always ensures that the panel is visible in the tray. So, it's not perfect.

On Mac, the command Sketchup.send_action 'entityProperties:' does the job as it would with UI.show_inspector, that is: show the panel when it is not visible, and then toggle between Shrink and Expand.

DanRathbun commented 3 years ago

I know this was logged previously, likely before the public tracker here at GitHub.

I also know the users have been asking for a toolbar button for it forever.

Fredosixx commented 3 years ago

That's what I am looking for...

sketchupbot commented 3 years ago

Logged as: SKEXT-2830

DanRathbun commented 3 years ago

NOTE: The doc is incorrect. This method always returns true regardless of the shown state of an inspector.