mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add per-scene UndoRedo
This commit is contained in:
parent
99548e521d
commit
ece3df3938
122 changed files with 1498 additions and 642 deletions
|
@ -33,6 +33,7 @@
|
|||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/editor_undo_redo_manager.h"
|
||||
#include "scene/gui/subviewport_container.h"
|
||||
#include "scene/resources/fog_material.h"
|
||||
#include "scene/resources/particles_material.h"
|
||||
|
@ -261,10 +262,8 @@ void EditorInspectorPluginMaterial::parse_begin(Object *p_object) {
|
|||
}
|
||||
|
||||
void EditorInspectorPluginMaterial::_undo_redo_inspector_callback(Object *p_undo_redo, Object *p_edited, String p_property, Variant p_new_value) {
|
||||
UndoRedo *undo_redo = Object::cast_to<UndoRedo>(p_undo_redo);
|
||||
if (!undo_redo) {
|
||||
return;
|
||||
}
|
||||
Ref<EditorUndoRedoManager> undo_redo = Object::cast_to<EditorUndoRedoManager>(p_undo_redo);
|
||||
ERR_FAIL_COND(!undo_redo.is_valid());
|
||||
|
||||
// For BaseMaterial3D, if a roughness or metallic textures is being assigned to an empty slot,
|
||||
// set the respective metallic or roughness factor to 1.0 as a convenience feature
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue