Wrong object naming when using context.copy #106105
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#106105
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.29
Blender Version
Broken: version: 2.93, 3.6, 4.0
Worked: none
Short description of error
When duplicating an object with a parent and using context.copy() with the object.duplicate or any other operator that uses object.duplicate the child object to get a wrong name.
Exact steps for others to reproduce the error
Thanks, but Blender 2.93 is supported until June 2023 and does not support
temp_override()
, so I made a reportNote: The Problem does not occur with
temp_override()
Can confirm. Though not sure whether this will be fixed in 2.93
2.93 will not see another release, not sure though if we should close this now, since deprecated does not necessarily mean we dont accept bug reports for this (or maybe it does, will ask around)?
If I do the
Context.temp_override
equivalent of overriding everything in thedict
created bybpy.context.copy()
then I get the same odd renaming behaviour (using 4.0.0a 2023-06-03ab6860f3de0f
):Edit: It looks like all that's needed is to override
selected_editable_objects
with whatever its current value is:In newer version (4.0), context argument for operator call is removed:
ac263a9bce
Use of
temp_override
is recommended and 3.3LTS supports it. So I think we can close this report.Maybe we can open a separate report for it?
I'm not really sure this needs to be closed, the report was that using an override with
context.copy()
causes unexpected behaviour, which is the case with both the deprecated context override argument andtemp_override
. The reporter's claim that the problem did not occur withtemp_override
was incorrect.If I were to open a new report it would be identical aside from the sample code would use
temp_override
withcontext.copy()
instead of the override argument (or just overridingselected_editable_objects
since I tracked that down as the cause).discussion and original report was quite misleading than the actual problem (which you've found), hence closed :)
Anyways, we can reopen the report with few edits.
operator object.duplicate wrong object naming when object has parent and using context.copyto Wrong object naming when using context.copy