Download

Movable subobjects?

Hey guys!

Today I’ve come across a small stump.

I want to be able to have one of my actor components be clickable and movable relative to the parent actor.
Although I’m not entirely sure how to accomplish this.

The only examples I’ve seen is in the ‘NavLinkProxy’ class, which has a ‘NavRelevantComponent’ subclass called ‘SmartNavLinkComponent’,
which doesn’t really tell me how the sub-objects are clickable and/or movable within a certain extent of the parent object.

It would also be something similar to how the extent handles work on splines.

I looked through all the variables, default properties, etc, of each component of the nav link proxy, and I just can’t seem to find what I’m looking for.

The reason I’m asking is because:

I have a custom volume class, which has a point in space that needs to be moved/rotated for spawn point stuff, or camera control, etc, etc.
I could have it all manipulated with a public Transform struct, but the grab and drag method always feels more natural.

I know you can move the position of any sub-objects that aren’t the root in a blueprint component view,
but I’m looking this to be used similarly to any normal volume.

If anyone has any ideas, or knows the solution, or wants to tell me I’m an idiot, then feel free. xD
**Thanks!
**
-Peace

As far as clicking on the component and moving it,

have you tried using YourComponent->SetWorldLocation() where location is derived from the world mouse position?

I can say for a fact that Comp->SetWorldLocation() will work, you just have to feed it the right location :slight_smile:

Rama

There is metadata you can put on a vector or transform property, and it will show up as a little blue diamond that can be selected and manipulated. I don’t remember the exact metadata key I’m afraid, and I don’t have the engine in front of me!

In blueprints you can set the “Show 3d widget” checkbox, but I have yet to find a way to do it via code. If that is indeed possible, I’d love to know how :slight_smile:


UPROPERTY(EditAnywhere, Category = YourCategory, meta = (MakeEditWidget))

“MakeEditWidget” seems to be the tag you’re looking for.

(Also, sidenote: Is there a list of metatags somwhere? Up until now I have only stumbled across useful ones by accident and Intellisense won’t find their definitions)

greetings,
FTC

**Hey Guys!
**
Rama: I was already using a vector and rotator in the defaults panel to update the transform,
I was looking more for a 3D widget :3

JamesG and FTC, you pointed me in the right direction.
I had seen this before in the NavLink handlers, but never associated it…

This worked like a charm!

Although the only limitation is that I can’t get it to work in my component classes.

I had to set it on a transform in the base actor, and then update the component via TickActor.
Or I could have used post edit, but I like the instant feedback with this method.

Thanks again guys!

-Peace

You Sir are a gentleman and a scholar, and I thank you! :slight_smile:


// Metadata specifiers
namespace UM
{
	// Metadata usable in UCLASS
	enum
	{
		/// [ClassMetadata] Used for Actor Component classes. If present indicates that it can be spawned by a Blueprint.
		BlueprintSpawnableComponent,

		/// [ClassMetadata] Used for Actor classes. If the native class cannot tick, Blueprint generated classes based this Actor can have bCanEverTick flag overridden.
		ChildCanTick,

		/// [ClassMetadata] For BehaviorTree nodes indicates that the class is deprecated and will display a warning when compiled.
		DeprecatedNode,

		/// [ClassMetadata] [FunctionMetadata] Used in conjunction with DeprecatedNode or DeprecatedFunction to customize the warning message displayed to the user.
		DeprecationMessage,

		/// [ClassMetadata] [PropertyMetadata] The name to display for this class or property instead of auto-generating it from the name.
		DisplayName,

		/// [ClassMetadata]
		IsBlueprintBase,

		/// [ClassMetadata] Comma delimited list of blueprint events that are not be allowed to be overriden in classes of this type
		KismetHideOverrides,

		/// [ClassMetadata] Specifies interfaces that are not compatible with the class.
		ProhibitedInterfaces,

		/// [ClassMetadata] Used by BlueprintFunctionLibrary classes to restrict the graphs the functions in the library can be used in to the classes specified.
		RestrictedToClasses,

		/// [ClassMetadata] Indicates that when placing blueprint nodes in graphs owned by this class that any hidden self pins (generally used to determine the world) should be visible because the self context of the class cannot
		///                 provide the world context and it must be wired in manually
		ShowHiddenSelfPins,

	};

	// Metadata usable in USTRUCT
	enum
	{
		/// [StructMetadata] Indicates that the struct has a custom break node (and what the path to the BlueprintCallable UFunction is) that should be used instead of the default BreakStruct node.  
		HasNativeBreak,

		/// [StructMetadata] Indicates that the struct has a custom make node (and what the path to the BlueprintCallable UFunction is) that should be used instead of the default MakeStruct node.  
		HasNativeMake,
	};

	// Metadata usable in UPROPERTY for customizing the behavior when displaying the property in a property panel
	enum
	{
		/// [PropertyMetadata] Used for FStringClassReference properties.  Indicates whether abstract class types should be shown in the class picker.
		AllowAbstract,

		/// [PropertyMetadata] Used for FStringAssetReference properties.  Comma delimited list that indicates the class type(s) of assets to be displayed in the asset picker.
		AllowedClasses,

		/// [PropertyMetadata] Used for FVector properties.  It causes a ratio lock to be added when displaying this property in details panels.
		AllowPreserveRatio,

		/// [PropertyMetadata] Used for integer properties.  Clamps the valid values that can be entered in the UI to be between 0 and the length of the array specified.
		ArrayClamp,

		/// [PropertyMetadata] Used for float and integer properties.  Specifies the minimum value that may be entered for the property.
		ClampMin,

		/// [PropertyMetadata] Used for float and integer properties.  Specifies the maximum value that may be entered for the property.
		ClampMax,

		/// [ClassMetadata] [PropertyMetadata] The name to display for this class or property instead of auto-generating it from the name.
		// DisplayName, (Commented out so as to avoid duplicate name with version in the Class section, but still show in the property section)

		/// [PropertyMetadata] Indicates that the property is an asset type and it should display the thumbnail of the selected asset.
		DisplayThumbnail,	
	
		/// [PropertyMetadata] Species a boolean property that is used to indicate whether editing of this property is disabled.
		EditCondition,
		
		/// [PropertyMetadata] Used for FStringAssetReference properties in conjunction with AllowedClasses. Indicates whether only the exact classes specified in AllowedClasses can be used or whether subclasses are valid.
		ExactClass,

		/// [PropertyMetadata]
		ExposeFunctionCategories,

		/// [PropertyMetadata] Specifies whether the property should be exposed on a Spawn Actor for the class type.
		ExposeOnSpawn,

		/// [PropertyMetadata]
		FixedIncrement,

		/// [PropertyMetadata] Used for FColor and FLinearColor properties. Indicates that the Alpha property should be hidden when displaying the property widget in the details.
		HideAlphaChannel,

		/// [PropertyMetadata] Used for FStringClassReference properties.  Indicates whether only blueprint classes should be shown in the class picker.
		IsBlueprintBaseOnly,

		/// [PropertyMetadata]
		MakeEditWidget,

		/// [PropertyMetadata] For properties in a structure indicates the default value of the property in a blueprint make structure node.
		MakeStructureDefaultValue,

		/// [PropertyMetadata] Used FStringClassReference properties. Indicates the parent class that the class picker will use when filtering which classes to display.
		MetaClass,

		/// [PropertyMetadata]
		Multiple,

		/// [PropertyMetadata] Used for array properties. Indicates that the duplicate icon should not be shown for entries of this array in the property panel.
		NoElementDuplicate,

		/// [PropertyMetadata] Used for integer and float properties. Indicates that the spin box element of the number editing widget should not be displayed.
		NoSpinbox,

		/// [PropertyMetadata] Used by FFilePath properties. Indicates the path filter to display in the file picker.
		FilePathFilter,

		/// [PropertyMetadta] Used by FDirectoryPath properties. 
		RelativePath,

		/// [PropertyMetadta] Used by FDirectoryPath properties. 
		RelativeToGameContentDir,

		// [PropertyMetadata]
		ShowOnlyInnerProperties,

		// [PropertyMetadata]
		SliderExponent,

		// [PropertyMetadata] Overrides the automatically generated tooltip from the property comment
		ToolTip,

		/// [PropertyMetadata] Used for float and integer properties.  Specifies the lowest that the value slider should represent.
		UIMin,

		/// [PropertyMetadata] Used for float and integer properties.  Specifies the highest that the value slider should represent.
		UIMax,
	};

	// Metadata usable in UPROPERTY for customizing the behavior of Persona and UMG
	// TODO: Move this to be contained in those modules specifically?
	enum 
	{
		/// [PropertyMetadata] The property is not exposed as a data pin and is only be editable in the details panel. Applicable only to properties that will be displayed in Persona and UMG.
		NeverAsPin, 

		/// [PropertyMetadata] The property can be exposed as a data pin, but is hidden by default. Applicable only to properties that will be displayed in Persona and UMG.
		PinHiddenByDefault, 

		/// [PropertyMetadata] The property can be exposed as a data pin and is visible by default. Applicable only to properties that will be displayed in Persona and UMG.
		PinShownByDefault, 

		/// [PropertyMetadata] The property is always exposed as a data pin. Applicable only to properties that will be displayed in Persona and UMG.
		AlwaysAsPin, 

		/// [PropertyMetadata] Indicates that the property has custom code to display and should not generate a standard property widget int he details panel. Applicable only to properties that will be displayed in Persona.
		CustomizeProperty,
	};

	// Metadata usable in UPROPERTY for customizing the behavior of Material Expressions
	// TODO: Move this to be contained in that module?
	enum
	{
		/// [PropertyMetadata] Used for float properties in MaterialExpression classes. If the specified FMaterialExpression pin is not connected, this value is used instead.
		OverridingInputProperty,

		/// [PropertyMetadata] Used for FMaterialExpression properties in MaterialExpression classes. If specified the pin need not be connected and the value of the property marked as OverridingInputProperty will be used instead.
		RequiredInput,
	};


	// Metadata usable in UFUNCTION
	enum
	{
		/// [FunctionMetadata] Indicates that a BlueprintCallable function should use a Call Array Function node and that the parameters specified in the comma delimited list should be treated as wild card array properties.
		ArrayParm,

		/// [FunctionMetadata] Used when ArrayParm has been specified to indicate other function parameters that should be treated as wild card properties linked to the type of the array parameter.
		ArrayTypeDependentParams,

		/// [FunctionMetadata]
		AutoCreateRefTerm,

		/// [FunctionMetadata] This function is an internal implementation detail, used to implement another function or node.  It is never directly exposed in a graph.
		BlueprintInternalUseOnly,

		/// [FunctionMetadata] This function can only be called on 'this' in a blueprint. It cannot be called on another instance.
		BlueprintProtected,

		/// [FunctionMetadata] Indicates that a BlueprintCallable function should use the Commutative Associative Binary node.
		CommutativeAssociativeBinaryOperator,

		/// [FunctionMetadata] Indicates that a BlueprintCallable function should display in the compact display mode and the name to use in that mode.
		CompactNodeTitle,

		/// [FunctionMetadata]
		CustomStructureParam,

		/// [FunctionMetadata] For BlueprintCallable functions indicates that the object property named's default value should be the self context of the node
		DefaultToSelf,

		/// [FunctionMetadata] This function is deprecated, any blueprint references to it cause a compilation warning.
		DeprecatedFunction,

		/// [ClassMetadata] [FunctionMetadata] Used in conjunction with DeprecatedNode or DeprecatedFunction to customize the warning message displayed to the user.
		// DeprecationMessage, (Commented out so as to avoid duplicate name with version in the Class section, but still show in the function section)

		/// [FunctionMetadata] For BlueprintCallable functions indicates that an input exec pin should be created for each entry in the enum specified.
		ExpandEnumAsExecs,

		/// [FunctionMetadata] The name to display for node's of this function in the blueprints.
		FriendlyName,

		/// [FunctionMetadata] For BlueprintCallable functions indicates that the parameter pin should be hidden from the user's view.
		HidePin,

		/// [FunctionMetadata]
		HideSpawnParms,

		/// [FunctionMetadata] For BlueprintCallable functions provides additional keywords to be associated with the function for search purposes.
		Keywords,

		/// [FunctionMetadata] Indicates that a BlueprintCallable function is Latent
		Latent,

		/// [FunctionMetadata] For Latent BlueprintCallable functions indicates which parameter is the LatentInfo parameter
		LatentInfo,

		/// [FunctionMetadata] For BlueprintCallable functions indicates that the material override node should be used
		MaterialParameterCollectionFunction,

		/// [FunctionMetadata] For BlueprintCallable functions indicates that the function should be displayed the same as the implicit Break Struct nodes
		NativeBreakFunc,

		/// [FunctionMetadata] For BlueprintCallable functions indicates that the function should be displayed the same as the implicit Make Struct nodes
		NativeMakeFunc,

		// [FunctionMetadata] Used by BlueprintCallable functions to indicate that this function is not to be allowed in the Construction Script.
		UnsafeDuringActorConstruction,

	};

	// Metadata usable in UINTERFACE
	enum
	{
		/// [InterfaceMetadata] This interface cannot be implemented by a blueprint (e.g., it has only non-exposed C++ member methods)
		CannotImplementInterfaceInBlueprint,
	};
}

More in the file:
\Engine\Source\Runtime\CoreUObject\Public\UObject\ObjectBase.h

Have you had any luck getting a MakeEditWidget to work on a component?
I need a way to place a NavLink as part of a blueprint and be able to visually place the end points of the link.