Editor Utility Widgets

0 views
Skip to first unread message

Berk Boyraz

unread,
Aug 4, 2024, 6:18:55 PM8/4/24
to vahordetexp
Ihave a editor utility widget blueprint that I need to open via python. I have managed to get the blueprint generated class of the widget and then the class default object from that, but when I use the EditorUtilityWidget.run() command nothing happens.

Is this still working in 4.24? Im not able to reproduce those results. I have an editor widget, the Event Run and also turned on Auto run default action. I added the path to my widget in the DefaultEditorPerProjectUserSettings.ini but nothing happens on startup.


I managed to get it working after a time. You have to add the UtilityEditorObject to the ini file like shown in the documentation, you have to also remeber to override the script startup function of the blueprint, I tried ever which way until I changed that and it started working for me with editor widgets on 4.27.


Editor Utility Widgets are one of the new feature of the Unreal Engine since 4.22. It allows users to define editor widgets using the UMG designer. We already covered this topic previously, so if you want to start with Editor Utility Widgets, you may want to check this article, this one and this one.


Then, in this plugin, we will create a UBlueprintFunctionLibrary. Actually, it can be any class, but we will only need to create a static function allowing us to start the Editor Utility Widget, so a UBlueprintFunctionLibrary is enough.


Once this code copied in the plugin, we have everything required to start an Editor Widget Utility from C++. We just need to call StartWidget with a reference on the UWidgetBlueprint we want to start.


The function previously defined is exposed to blueprints (marked as BlueprintCallable), this means the plugin we created allow us to programmatically start Editor Utility Widgets using blueprints. Indeed, the StartWidget function is callable from other Editor Utility Widgets, so now an Editor Utility Widget can start another widget.


Here we just created a simple Editor Utility Widget with only one button, and on the click on this button we want to spawn another widget. And, the previous figure shows all we need to do to implement this.


Hey! This is my 1st comment here so I just wanted to give a quick

shout out and say I really enjoy reading your blog posts.

Can you suggest any other blogs/websites/forums that go over the same

subjects? Thanks for your time!


In the last article, we introduced the UMG Editor Widgets which allows you to define editor widgets using the UMG designer since Unreal Engine 4.22.In this article, we cover the usage of UMG Editor Widgets, but using C++. Of course, it was already...


This widget provides an out-of-the-box editing experience to help streamline editing within a web application. It automatically recognizes if there are editable feature layers within the map. The layers that are editable will automatically be used by the widget. It is possible to configure how the Editor behaves by setting itslayerInfos property.This property takes an array of objects which allows configuring the the editing experience for these layers.


Note that the update operations (such as rotate, move, and transform) happen in the map space.This means that, for example in 3D, if a graphic is rotated in a global WGS84 view, its shape and segment lengths change.


The following model formats are currently supported. For additional information, please refer to the ArcGIS Pro documentation.Please note that only one model can be uploaded at a time and zip files should be used for a model with additional texture files.


Snapping can be configured using the controls in the Editor widget's "Settings" menu. By default,snapping is disabled. Toggle "Enable snapping" to enable it. By default, both geometry guidesand feature-to-feature snapping are enabled.


Geometry guides allow the editor to specify howthey want their geometries to be drawn. For example, when the segment being drawn is nearlyperpendicular to another segment, the cursor may snap to form a precise right angle.


Feature-to-feature snapping allows new or existing geometries to be snapped to other geometries,including those in other layers, as shown within the "Snapping layer" list. By default, all layersthat can be configured for snapping are shown in this list. The available layers can be restrictedby updating the Editor's snappingOptions bysetting the FeatureSnappingLayerSource directly.


The tooltips provide useful information about a feature or its components (vertices and segments) thatare being drawn or edited. For example, they show the position of vertices, the direction and distanceof segments, as well as orientation and scale of meshes.


Coordinate inputs and editing constraints are helpful to achieve greater control while drawing features.Press Tab to activate the input mode while drawing a new feature, or when editing a point, mesh, or a selected vertex.


It is possible to edit related data via the Editor widget. The relationship element provides the functionality needed to configure the relationship within the formTemplate. These elements must be saved within the form for the Editor to support editing related data. This can be accomplished via the Map Viewer's authoring experience or programmatically using the SDK.


Once the form is authored, the Editor automatically checks if there is a formTemplate set on the editable layer, or the widget's corresponding layerInfo. If the form's template is not set or is not configured to contain relationship elements, the Editor will not display the option to edit the relationship data. Additional considerations when using the Editor to edit related data are provided below.


Authenticated users that are layer owners, administrators or users with full editing privileges will have their elevated user privileges applied in regards to editing behavior and data access. This mimics the behavior available in Map Viewer. To opt out, set esriConfig.userPrivilegesApplied to false.


Indicates the heading level to use for title of the widget. By default, the title (i.e. "Editor") is renderedas a level 4 heading (e.g. Editor). Depending on the widget's placementin your app, you may need to adjust this heading for proper semantics. This isimportant for meeting accessibility standards.


The SnappingOptions for editing. Supports self snapping and feature snapping. Starting with version 4.23, the SnappingControls UI is automatically integrated into the Editor widget.Modify the snappingOptions if modifications are needed from what is provided in the default UI.


This property is useful for basic overrides of the default widgets. There may be some limitationsto what the Editor can do with these overridden properties. For example, the Editor will disable the multipleSelectionEnabled property in Sketch.defaultUpdateOptionsno matter what is set within this property.


The view model for this widget. This is a class that contains all the logic(properties and methods) that controls this widget's behavior. See theEditorViewModel class to accessall properties and methods on the widget.


If false, the widget will no longer be rendered in the web document. This may affect the layout of other elements or widgets in the document. For example, if this widget is the first of three widgets associated to the upper right hand corner of the view UI, then the other widgets will reposition when this widget is made invisible.For more information, refer to the css display value of "none".


Key identifying the group to which the handles should be added. All the handles in the groupcan later be removed with Accessor.removeHandles().If no key is provided the handles are added to a default group.


when() may be leveraged once an instance of the class is created. This method takes two input parameters: a callback function and an errback function.The callback executes when the instance of the class loads. Theerrback executes if the instance of the class fails to load.


(Since 4.26) Indicates whether to enable or disable attachments while creating features. Support for this is dependent upon whether this operation is supported on the FeatureLayer.capabilities.operations.


(Since 4.26) Indicates whether to enable or disable attachments while updating existing features. Support for this is dependent upon whether update or delete operations are supported on the FeatureLayer.capabilities.


The Editor will not display attachment file names if it is displaying image types. These images must have resize support within its corresponding FeatureLayer, ie. FeatureLayer.capabilities.attachment.supportsResize is true. Attachment types, other than images, will display an icon and its corresponding file name.


Set this to customize any supporting Editor widget's default behavior. Specific properties can be adjusted in the Attachments, FeatureForm, and FeatureTemplates widgets. In addition, it is possible to update specific properties within the SketchViewModel.


It is recommended to set Editor.snappingOptions.enabled = true if enabledToggle is set to false.This is because selfEnabledToggle and featureEnabledToggle require snapping globally to be enabled in order to be interactive. Otherwise, these toggles will not be responsive.


Indicates if the update operation was aborted. Returns true if the user pressed the esc key, or when the update(), create()or cancel() method is called before the update event's state changes to complete.


Update operation tool info.Returns additional information associated with the update operation that is taking place for selected featureand what stage it is at. Value of this parameter changes to null when the update event's state changes to complete.


Anxious to see a feature editor widget added to Experience Builder to gain parity with WAB. Have done some workarounds with Survey123, but they are clunky, labor intensive on the back end, and work best for existing features. Ideally, a new editor widget similar to the "Smart Editor" but with a more user friendly interface (read: BIG, customizable buttons built from feature templates and/or subtypes) is added to Experience Builder. Something that not only allows for the editing of existing features but for streamlined creation of new features and a form-based/popup-based interface for user attribute input. Perhaps it could receive input from map widgets (e.g. location), and be triggered by other widgets (e.g. buttons).

3a8082e126
Reply all
Reply to author
Forward
0 new messages