Commit Graph

29 Commits

Author SHA1 Message Date
Richard TalbotWatkin
d197407b42 Major optimizations to the BSP building process, and BSP Undo.
#jira UE-16405 - Hitch occurs when undoing BSP manipulations

Summary of changes:
- Added 'fuzzy map' for quick look up of nearly equal FVectors, improving the BSP rebuild algorithm from O(n^4) to O(n*m) where m is much smaller than n.
- Added 'fuzzy map' for quick look up of nearly equal FPlanes, improving plane merging from O(n^2) to O(n).
- Changed TTransArrays in UModel to regular arrays, to remove a lot of transaction modifies during BSP rebuild.
- UModel array allocations are now allocated upfront where possible, instead of constant dynamic resizing.
- Optimized algorithm used by UModelComponent::GenerateElements to reduce allocations and simplify map lookups.
- Removed call to ULevel::CommitModelSurfaces in UModelComponent::PostEditUndo, which was causing an enormous amount of unnecessary work on each undo operation.  It is now done, as ever, by UWorld::Tick.

#reviewedby Matt.Kuhlenschmidt

[CL 2600444 by Richard TalbotWatkin in Main branch]
2015-06-25 09:42:17 -04:00
Dinesh Kumar
921ec83b91 Paper2D: 2D Widget rotation indicator shows initial rotation on selection [UE-14716]
[CL 2535253 by Dinesh Kumar in Main branch]
2015-05-03 13:28:19 -04:00
Mikolaj Sieluzycki
a96989f147 Add includes to files to remove the need of including Engine.h.
[CL 2508000 by Mikolaj Sieluzycki in Main branch]
2015-04-10 03:30:54 -04:00
Dinesh Kumar
f0a9771d33 Paper2D: 2D Mode
- Combined 2D Rotate / Translate widget
- 2D Layer Snap planes
- Some UI stuff to go with it
#codereview michael.noland

[CL 2500349 by Dinesh Kumar in Main branch]
2015-04-02 16:44:37 -04:00
Maciej Mroz
721fd3ff9c UE-10298 Creating an exposed variable does not always update correctly to the bp's Details panel
When a selected actor is reinstanced, a details view (displaying details of the actor) needs to be refreshed.

An alternative solution: don't check SDetailsView::ShouldSetNewObjects (refresh always )
OR store an object's hash in SDetailsView (and compare it in the ShouldSetNewObjects)

#codereview Matt.Kuhlenschmidt, Nick.Whiting

[CL 2455053 by Maciej Mroz in Main branch]
2015-02-21 17:44:56 -05:00
Matthew Griffin
e3450a604a [INTEGRATE] Change 2449713 by Dan.Oconnor@epic_3298 on 2015/02/18 00:07:14
[UE-9990]
	 - nullptr check for ActorComponent that is briefly parented to a non-actor while 'applying instance changes to blueprint'
	 - emergencing stomping of CachedInstanceData (which appears to be stale) while undoing changes to child actor component and then reperforming changes
	 - nullptr check for null entry when undoing changes to ChildActorComponent made in level editor
	#lockdown James.Golding
	#codreview Mark.Audy, Dan.Hertzka

[CL 2450057 by Matthew Griffin in Main branch]
2015-02-18 09:24:11 -05:00
Matthew Griffin
5e547d5ea3 [INTEGRATE] Change 2440411 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/02/10 16:34:10
[UE-9332] - Editing BP components in world no longer causes the selection to be reset

[CL 2448557 by Matthew Griffin in Main branch]
2015-02-17 08:45:37 -05:00
Matthew Griffin
4d8ce7c19d [INTEGRATE] Change 2432514 by Matt.Kuhlenschmidt@matt_kuhlenschmidt_main on 2015/02/04 17:22:50
Editor selection outline now uniquely identifies selected components.  When a component is selected directly the rest of the actor gets a subdued selection color and the selected compoent(s) get the normal selection color.  When the actor is selected directly all components get the normal selection color.

[CL 2438255 by Matthew Griffin in Main branch]
2015-02-09 11:52:11 -05:00
Matthew Griffin
f967e4c395 [INTEGRATE] Change 2428748 by Matt.Kuhlenschmidt@matt_kuhlenschmidt_main on 2015/02/02 17:04:30
Fixed being able to move components created in a blueprint.

	Introduced an FSelectedEditableComponentIterator to iterate over only the movable components

[CL 2435554 by Matthew Griffin in Main branch]
2015-02-06 11:50:34 -05:00
Matthew Griffin
0a12bafeed [INTEGRATE] Change 2426108 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/01/30 13:47:46
[UE-8152] - All previously existing drag-and-drop functionality now works with components in the world as follows:

	1. If multiple actors are selected and the drop is on one of the selected actors, the dropped object will be applied (if possible) to all components in each selected actor.
	2. If multiple components are selected and the drop is on one of the selected components, the dropped object will be applied (if possible) to all selected components.
	3. If the drop is onto a component that is not selected, it will apply only to that component.
	4. If the drop is onto a component within a selected actor, but only one actor is selected, same as #3.

	- Fixed crash when trying to apply material to non-existent slot when applying to multiple actors

[CL 2433465 by Matthew Griffin in Main branch]
2015-02-05 08:54:11 -05:00
Matthew Griffin
aa2f86df3e [INTEGRATE] Change 2426019 by Matt.Kuhlenschmidt@matt_kuhlenschmidt_main on 2015/01/30 12:25:20
Missing file

[CL 2433456 by Matthew Griffin in Main branch]
2015-02-05 08:45:11 -05:00
Ben Marsh
7561c0df72 [INTEGRATE] Change 2420685 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/01/27 13:15:05
[UE-8251] [UE-8216] - Can no longer have a component selected in addition to an actor that isn't the component owner
	- Fixed a number of undo issues with the new in-tree Actor root node
	- Fixed undo issue where going from select component->select different actor->undo would cause the different actor to incorrectly still be flagged as selected
	- Fixed component selection visualization undo issues (components were not being modified when override delegates were bound/unbound)

[CL 2425757 by Ben Marsh in Main branch]
2015-01-30 10:24:54 -05:00
Ben Marsh
b1f7918492 [INTEGRATE] Change 2413255 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/01/20 20:29:49
In-world component editing
	- Proper name is given to a new component on creation and when pasting nodes for IWCE component tree
	UE-7864 - fixed as by-product of naming changes
	UE-7831 - numbering follows the same pattern as the blueprint SCS editor
	UE-7801 - Selection & selection overrides all work for "invisible" components that have an editor-only component

[CL 2419481 by Ben Marsh in Main branch]
2015-01-26 18:53:46 -05:00
Ben Marsh
fe822aaaa0 [INTEGRATE] Change 2412721 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/01/20 15:18:01
In-World Component Editing
	- Undo/Redo add component works
	- Valid name is automatically assigned to a component when it's added
	- Selection in the component list is a transaction
	- Gave the SCSEditor the same style as the scene outliner (peach for selected+inactive)

[CL 2419456 by Ben Marsh in Main branch]
2015-01-26 18:43:22 -05:00
Ben Marsh
ee496e0308 [INTEGRATE] Change 2411014 by Dan.Hertzka@Dan.Hertzka_T4682_4010 on 2015/01/19 11:59:12
In-World Component Editing - fixed up a variety of cases where selection/details didn't update properly

[CL 2419249 by Ben Marsh in Main branch]
2015-01-26 17:13:33 -05:00
Dan Hertzka
9b9c3d2d3e In-world component selection improvements:
- Right-clicking a selected actor will open the context menu, not select the component
- Clicking the selected actor will not select a component if the click also focused the level viewport
- Right-clicking a selected component opens a 1-option context menu to select the owning actor

[CL 2402541 by Dan Hertzka in Main branch]
2015-01-09 19:49:04 -05:00
Dan Hertzka
a04bbfc28e In-world component selection - outlines show up around only the selected component
[CL 2401486 by Dan Hertzka in Main branch]
2015-01-08 18:30:41 -05:00
Dan Hertzka
dd4fdd7906 First-pass on in-world component selection
- Must enable experimental In-World Component Editing
- To select a component in the world, click on the component when the owning actor is already selected

[CL 2401364 by Dan Hertzka in Main branch]
2015-01-08 16:49:49 -05:00
Matt Kuhlenschmidt
cf7ffd818b Added a method to add a blank actor from the placement browser
Integrated MarcA's changes to display and edit per actor instance components.

Must set bInWorldBPEditing to true in experimental settings to enable.

#codereview dan.hertzka

[CL 2398903 by Matt Kuhlenschmidt in Main branch]
2015-01-06 13:49:19 -05:00
Zak Middleton
e95939ba24 #ue4 - Convert all engine uses of GetComponents() to use TInlineComponentArray.
[CL 2393060 by Zak Middleton in Main branch]
2014-12-18 17:02:31 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Richard TalbotWatkin
25304e1d35 Fixed merge levels operation. Fixed bug in UEditorEngine::CopySelectedActorsToClipboard when performing a slow copy due to the copied actors not being correctly pasted into the buffer level, which was affecting both 'merge levels' and copying of multiple actors from different levels.
#jira UE-4791 - LIVE: Level Merging creates a new empty level and deletes only one of the two levels merged

[CL 2350215 by Richard TalbotWatkin in Main branch]
2014-11-05 13:11:18 -05:00
Andrew Rodham
ba3528c9d4 Made it possible for asset editors to maintain their own FEditorModeTools lists
Breaking changes include:
    * Rename of GEditorModeTools -> GLevelEditorModeTools to signify that it applies only to the level editor modes
    * Addition of FEditorModeRegistry, responsible for managing and creating new editor modes. Modes are no longer registered with an instance of the mode, instead with a mode factory that is able to create a new mode of that type.
    * Editor modes now operate on FEditorViewportClients rather than FLevelEditorViewportClients
    * Added ability to specify an FEditorModeTools when creating an FEditorViewport

Moved component vizualiser manager handling outside of individual editor modes, and into FLevelEditorViewportClient. This should make it easier to transplant in future.

This work addresses TTP#334640 - EDITOR: Investigate making editor modes a per-'editor' concept

Reviewed by Michael Noland, Matt Kuhlenschmidt

[CL 2109245 by Andrew Rodham in Main branch]
2014-06-18 10:16:16 -04:00
bruce nesbit
40e74f4470 Removed assumption from GetBrush that second actor is always a brush and renamed it to GetDefaultBrush. Replaced GetBrush with GetDefaultBrush and made GetBrush deprecated. Revised comments appropriatley.
Fixes TTP 337889 - STRATEGYGAME: VEHICLEGAME: CRASH: Console command 'Show Collision" crashes Standalone window

[CL 2102892 by bruce nesbit in Main branch]
2014-06-12 04:17:47 -04:00
Mikolaj Sieluzycki
bbcea54981 #ttp 303393 UObject improvement: Remove header groups
#proj core
#branch UE4
#summary Removed header groups, removed some redundant includes and replaced with forward declarations. Fixed compilation errors.

[CL 2055361 by Mikolaj Sieluzycki in Main branch]
2014-04-24 08:49:31 -04:00