@ -470,6 +470,7 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam
if ( ! has_revert & & ! p_object - > get_script ( ) . is_null ( ) ) {
if ( ! has_revert & & ! p_object - > get_script ( ) . is_null ( ) ) {
Ref < Script > scr = p_object - > get_script ( ) ;
Ref < Script > scr = p_object - > get_script ( ) ;
if ( scr . is_valid ( ) ) {
Variant orig_value ;
Variant orig_value ;
if ( scr - > get_property_default_value ( p_property , orig_value ) ) {
if ( scr - > get_property_default_value ( p_property , orig_value ) ) {
if ( orig_value ! = p_object - > get ( p_property ) ) {
if ( orig_value ! = p_object - > get ( p_property ) ) {
@ -477,6 +478,7 @@ bool EditorPropertyRevert::can_property_revert(Object *p_object, const StringNam
}
}
}
}
}
}
}
return has_revert ;
return has_revert ;
}
}
@ -668,6 +670,7 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
if ( ! object - > get_script ( ) . is_null ( ) ) {
if ( ! object - > get_script ( ) . is_null ( ) ) {
Ref < Script > scr = object - > get_script ( ) ;
Ref < Script > scr = object - > get_script ( ) ;
if ( scr . is_valid ( ) ) {
Variant orig_value ;
Variant orig_value ;
if ( scr - > get_property_default_value ( property , orig_value ) ) {
if ( scr - > get_property_default_value ( property , orig_value ) ) {
emit_changed ( property , orig_value ) ;
emit_changed ( property , orig_value ) ;
@ -675,6 +678,7 @@ void EditorProperty::_gui_input(const Ref<InputEvent> &p_event) {
return ;
return ;
}
}
}
}
}
Variant default_value = ClassDB : : class_get_default_property_value ( object - > get_class_name ( ) , property ) ;
Variant default_value = ClassDB : : class_get_default_property_value ( object - > get_class_name ( ) , property ) ;
if ( default_value ! = Variant ( ) ) {
if ( default_value ! = Variant ( ) ) {