Skip to content

"Rename" and "Batch Rename" can sometimes edit yellow foreign nodes #119645

@EdwardChanCH

Description

@EdwardChanCH

Tested versions

Reproducible in 4.7.beta [ef02314], 4.6.1.stable, 4.6.stable, 4.5.1.stable.

System information

Godot v4.6.stable - Windows 11 (build 26200) - Multi-window, 1 monitor - Direct3D 12 (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 32.0.15.9636) - 12th Gen Intel(R) Core(TM) i7-12700H (20 threads) - 15.69 GiB memory

Issue description

Noticed this when working on #119617.

Related: #119593

Yellow foreign nodes (editable children, inherited scene child nodes) are not supposed to be rename-able (#115572 (comment)). However, in some edge cases, both "Rename" and "Batch Rename" are available in the scene tree context menu, and both can rename foreign nodes without triggering the "Alert!" pop-up.

I can open a PR if needed.

Steps to reproduce

  1. Open the MRP, or set it up manually:
    1a. Create a main scene.
    1b. Add a scene instance of a normal scene.
    1c. Add a scene instance of an inherited scene.
    1d. Enable "editable children" on (1b) and (1c).
  2. Hold Shift to select the nodes between the normal scene's instance and the inherited scene's instance.
  3. Press F2, or right-click to open the context menu to select (batch) rename.
  4. See that the yellow nodes are renamed without the "Alert!" pop-up.
mrp_batch_rename_foreign.mp4

Minimal reproduction project (MRP)

MRP_Batch_Rename_Foreign.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions