View Issue Details

IDProjectCategoryView StatusLast Update
0005822DarkRadiantGUIpublic28.10.2022 05:52
ReporterGeep Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityN/A
Status closedResolutionfixed 
Product Version2.13.0 
Target Version3.0.0Fixed in Version3.0.0 
Summary0005822: Feature Request: Improve UI for worldspawn-to-entity conversion
DescriptionProblems:
Converting a worldspawn to another class cannot be done inside the Entity Viewer, for no obvious reason. If the ultimate target is a class other than func_static, this requires a 2-step process:
1) Convert from worldspawn to func_static, in the Ortho view, with the right mouse menu's misleadingly-named "Create Entity"
2) Convert from func_static to some other class [e.g., atdm:mover_door] inside the Entity Viewer

"Create Entity" is misleading in this case. It took me over a year as a newbie to realize that this is really "Convert to Entity" when a worldspawn object is selected.

Solutions:
1) When a worldspawn item is selected, and the Ortho view right menu invocated, have it read "Convert to Entity" instead of "Create Entity"
2) Make it possible to do the conversion in 1 step inside the Entity Viewer. The user selects the "classname" spawnarg, then uses either with the "Choose Class" button or types in func_static or another class name. (If you try this currently, it fails to deliver.)
TagsNo tags attached.

Relationships

related to 0005910 closedgreebo Entity Inspector: classname field should always be read-only, to force use of the "Choose entity class" button 

Activities

greebo

greebo

24.11.2021 15:15

administrator   ~0014563

I can relate to 1) since the wording Create might indeed be misleading.
Though I cannot really address 2) through the Entity Inspector, since changing the classname after selecting a worldspawn brush would change the class of the *entire* worldspawn. It's not restricted to the selected brushes/primitives only, it's the worldspawn itself which is shown in the Entity Inspector view.
Geep

Geep

24.11.2021 16:29

reporter   ~0014564

Improving (1) would be great.

Regarding (2), I think it all depends on how you look at it. Let me make the case further. If I select a func_static entity and change its class through the Entity Inspector, I know I'm changing just the selected item(s), not all items of class func_static.

Now, I know in idtech4 world, all worldspawn items are represented as primitives within unnamed Entity 0. But consider this:

When I Shift-LMB a worldspawn object in DR, only the single item gets selected, not all worldspawn objects making up Entity 0. The latter would be unhelpful, so what happens is a special case.

I'm arguing for the same type of special-case treatment in the case of changing the classname from "worldspawn" to something else in the Entity Inspector. Clearly the person making the change just wants to convert the selected entity/entities, not do the illegal operation of changing Entity 0 to a different class.

You could pop up a dialog (after the classname edit) saying "Converted selected items from worldspawn" with an OK button. Not necessary IMHO but if you thought it desirable.
greebo

greebo

24.11.2021 18:50

administrator   ~0014565

Last edited: 24.11.2021 18:56

Yes. It's not that I don't understand the point you're making. I know what you want it to do, but the Entity Inspector in the end is designed to work with entities only, it doesn't have any business with brushes or patches. It doesn't even "know" or care which primitives are selected, coding-wise. The mapper part of myself can see that it could be nice to have that option, but my programmer part doesn't feel very good about it.

Are you confident that trying to change a set of selected worldspawn brushes to a different class through the Entity Inspector is a common use case among mappers? With the discussed 1) option of right-clicking the items and changing them, is there still the need for supporting it in the Entity Inspector? The proposedly named "Convert Entity" item in the RMB menu could do the same, i.e. changing the classname of the selected items.
Geep

Geep

26.11.2021 04:02

reporter   ~0014566

RE (2), I can understand that some things are just too hard or ugly to want to implement. If that's the case here, so be it.

"Are you confident that trying to change a set of selected worldspawn brushes to a different class through the Entity Inspector is a common use case among mappers?"

Well, no. And are you confident that method wouldn't be used by mappers if it was made available? All I know is, I personally would find it more natural and faster to do it through the Entity Inspector.

As it is, it seems like it's "half implemented but broken". So maybe it should be pushed in the other direction; if you open the Entity Inspector on a worldspawn:
- make the "classname worldspawn" row read-only
- indicate this visually. Since grey type face is already being used to indicate inherited attributes, perhaps instead make the cell background of the classname title and entry field grey rather than white.
- remove the leftside row glyph indicating there's a button, and prevent appearance of that button "Choose entity class..." when that row is selected
Dragofer

Dragofer

26.11.2021 10:47

developer   ~0014568

"Are you confident that trying to change a set of selected worldspawn brushes to a different class through the Entity Inspector is a common use case among mappers?"

For common classnames with simple names, such as when reverting a lot of doors into func_static entities, I sometimes do this. As soon as the name gets a little more complicated (like atdm:mover_door) or easy to confuse (is it func_rotate or func_rotating?) I prefer to use the Choose Entity button on one entity, then spread the spawnarg to all other entities with the checkmark button.

A further risk of using the entity inspector to change the classname is that certain spawnargs aren't applied properly then. For instance, compare what happens when you change the classname of a "func_static" stagecoach to "light" using either
1) the Choose entity class button
2) the classname spawnarg field

I think now that the entity inspector shows all spawnargs of entities in the selection it should be easier to use the "Choose entity class" button to change the classname of a lot of entities at once. That was imo the main advantage of the entity inspector method.
Geep

Geep

26.11.2021 16:09

reporter   ~0014569

I think, Dragofer, you are raising a different issue, namely, that the classname field should ALWAYS be read-only, to force use of the "Choose entity class" button.

This is different than the original 0000002 issue, which concerned a proposed new capability to let worldspawn be converted into non-worldspawn inside the Entity Inspector.
Geep

Geep

26.11.2021 16:14

reporter   ~0014570

EDIT: That's not "original 0000002 issue", but "original issue number 2"

Mantis gives me "Access Denied" if I try to edit my own report. Ha!
greebo

greebo

26.02.2022 05:16

administrator   ~0014737

Coming back to this entry after some time. The original description says

> "If the ultimate target is a class other than func_static, this requires a 2-step process:
> 1) Convert from worldspawn to func_static... with "Create Entity"
> 2) Convert from func_static to some other class [e.g., atdm:mover_door] inside the Entity Viewer"

When you select a brush in the scene, then you can use the RMB menu and select "Create Entity", which allows you to select any entity you want. You don't have to create a func_static first, and then change it in the Entity Inspector. Does this change anything?

As first step, I can try to adjust the context menu, renaming "Create Entity" as previously discussed. Would you prefer "Convert to Entity..." or "Create Entity from Selection..." or something else?
Geep

Geep

26.02.2022 17:39

reporter   ~0014739

I recognize that there is some behavior change in the latest DR from what I originally described.

In any case, the following would be consistent and what I'd prefer...

RMB menu: "Create Entity" becomes "Convert to Entity..."
  (this is in addition to "Convert to func_static")
Resulting dialog title: "Create Entity" becomes "Convert to Entity"
Dialog lower right button: instead of "+ Add", either "Convert" or simply "OK"
In the Entity Inspector, the "Choose entity class..." button becomes "Convert to Entity..."

This alternative treatment would also be fine, if you prefer...

RMB menu: "Create Entity" becomes "Choose entity class..."
  (this is in addition to "Convert to func_static")
Resulting dialog title: "Create Entity" becomes "Choose Entity Class"
Dialog lower right button: instead of "+ Add", either "Convert" or simply "OK"
In the Entity Inspector, the "Choose entity class..." button is left the same

Since the treatment of capitalization is not currently very consistent, I'll leave it up to you as to whether to use, for example,
- "Convert to entity..." or "Convert to Entity..."
- "Choose entity class..." or "Choose Entity Class..."

Also, the case for making the Entity Inspector classname field read-only (i.e., only changeable by the convert/choose button) is still strong, I think.
greebo

greebo

01.03.2022 14:40

administrator   ~0014751

Opened a new request for making the classname field read-only: 0005910
greebo

greebo

01.03.2022 16:24

administrator   ~0014752

RMB menu item is now adjusted based on the selection. The title and confirmation button labels of the EntityClassChooser dialog are adjusting themselves depending on the context.
Geep

Geep

03.04.2022 21:16

reporter   ~0014796

Testing note under 3.0.0 pre 1: 2 out of 3 cases look good.

1) Good: With a worldspawn selected (but not otherwise), when you RMB, the top choice is now labeled "Convert to Entity..." (There is still a "Convert to func_static" further down). Choosing the top choice, you get the selection window labeled "Convert to Entity".

2) Good: Select an entity and open it in the Entity Inspector. The usual "Choose Entity Class..." button appears. You don't have to select the "classname" spawnarg to see it. (But can. If you do select "classname", then the copy field is grayed out, as discussed elsewhere. Selecting other spawnargs hides that particular button.)

Hitting the "Choose Entity Class..." button brings up the selection window, this time labeled "Select Entity Class". So, there is a minor discrepancy between "Choose" and "Select" nomenclature here, but perhaps in service to wider consistency or history.

3) Needs work: I understand your argument (tho not agreeing) for not being able to convert from worldspawn in the Entity Inspector. But given that, with a worldspawn object, you really must suppress the appearance in the Entity Inspector (initially on open and later if the "classname" spawnarg is selected) of the "Choose Entity Class..." button. Otherwise, I click on the button, waste time finding the replacement class, and then it doesn't update.
greebo

greebo

04.04.2022 02:48

administrator   ~0014797

Thanks for testing and giving thorough feedback, this is appreciated.

I agree, I'm going to disable the "Choose Entity Class..." button since it's not going to accept the result. Note that it's also possible to have a worldspawn object *and* e.g. a light selected, then the "classname" has "[differing values]" and the chosen classname would only refuse to apply to the worldspawn entity - not sure what's best in this case, but I guess I'll disable the button if the current selection includes any worldspawn members.

Related Changesets

DarkRadiant: master ff155331

01.03.2022 16:06

greebo


Details Diff
0005822: OrthoContextMenu item "Create Entity" is switching to "Convert to Entity" if there's a non-empty selection Affected Issues
0005822
mod - libs/wxutil/menu/IconTextMenuItem.h Diff File
mod - radiant/ui/ortho/OrthoContextMenu.cpp Diff File
mod - radiant/ui/ortho/OrthoContextMenu.h Diff File

DarkRadiant: master 475bbef5

01.03.2022 16:23

greebo


Details Diff
0005822: EntityClassChooser supports three scenarios it's used for, providing distinct titles and button labels for each. Affected Issues
0005822
mod - libs/wxutil/EntityClassChooser.cpp Diff File
mod - libs/wxutil/EntityClassChooser.h Diff File
mod - plugins/dm.difficulty/DifficultyEditor.cpp Diff File
mod - radiant/ui/einspector/ClassnamePropertyEditor.cpp Diff File
mod - radiant/ui/materials/editor/MaterialEditor.cpp Diff File
mod - radiant/ui/ortho/OrthoContextMenu.cpp Diff File

DarkRadiant: master 31c96f61

03.03.2022 13:39

greebo


Details Diff
0005822: Fix crash at shutdown Affected Issues
0005822
mod - radiant/ui/ortho/OrthoContextMenu.cpp Diff File

Issue History

Date Modified Username Field Change
23.11.2021 17:09 Geep New Issue
24.11.2021 15:15 greebo Status new => feedback
24.11.2021 15:15 greebo Note Added: 0014563
24.11.2021 16:29 Geep Note Added: 0014564
24.11.2021 16:29 Geep Status feedback => new
24.11.2021 18:50 greebo Note Added: 0014565
24.11.2021 18:54 greebo Note Edited: 0014565
24.11.2021 18:56 greebo Note Edited: 0014565
26.11.2021 04:02 Geep Note Added: 0014566
26.11.2021 05:09 greebo Status new => acknowledged
26.11.2021 10:47 Dragofer Note Added: 0014568
26.11.2021 16:09 Geep Note Added: 0014569
26.11.2021 16:14 Geep Note Added: 0014570
26.02.2022 05:16 greebo Note Added: 0014737
26.02.2022 05:16 greebo Status acknowledged => feedback
26.02.2022 17:39 Geep Note Added: 0014739
26.02.2022 17:39 Geep Status feedback => new
01.03.2022 14:39 greebo Relationship added related to 0005910
01.03.2022 14:40 greebo Note Added: 0014751
01.03.2022 16:23 greebo Assigned To => greebo
01.03.2022 16:23 greebo Status new => assigned
01.03.2022 16:23 greebo Target Version => 3.0.0
01.03.2022 16:23 greebo Changeset attached => DarkRadiant master ff155331
01.03.2022 16:23 greebo Changeset attached => DarkRadiant master 475bbef5
01.03.2022 16:24 greebo Status assigned => resolved
01.03.2022 16:24 greebo Resolution open => fixed
01.03.2022 16:24 greebo Fixed in Version => 3.0.0
01.03.2022 16:24 greebo Note Added: 0014752
03.03.2022 15:09 greebo Changeset attached => DarkRadiant master 31c96f61
03.04.2022 21:16 Geep Note Added: 0014796
04.04.2022 02:48 greebo Note Added: 0014797
28.10.2022 05:52 greebo Status resolved => closed