Apply transforms on parents and children #55494
Labels
No Label
Priority
High
Priority
Low
Priority
Normal
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Content
Type
Design
Type
Report
Type
To Do
Type
Web Development
No Milestone
No project
No Assignees
12 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: studio/blender-studio#55494
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Blender Version
Broken: 2.8 5073ee0bb27
Short description of error
When a parent and it's children are selected and you apply the transforms, the parenting relation is ignored.
If the parent is scaled to 0.5 in all axes and the child is still at a scale of 1, and all get their scale applied, the parent gets set back to 1 and the child will grow to twice the size with a scale of 1.
Added subscriber: @JulienKaspar
blender/blender#64294 was marked as duplicate of this issue
blender/blender#64293 was marked as duplicate of this issue
blender/blender#63833 was marked as duplicate of this issue
blender/blender#63387 was marked as duplicate of this issue
blender/blender#58073 was marked as duplicate of this issue
Looked into this, the issue is apply-transform modifies the original data, then immediately evaluates parent/child relationships - which now use CoW evaluated meshes which don't have the changes from the source objects.
Looking into this further, the evaluated objects are used inconsistently, see:
BKE_object_workob_calc_parent
.Note: issue is in
apply_objects_internal
- problem funcs are aroundignore_parent_tx
.Added subscribers: @Sergey, @ideasman42
As far as I can see the solution is not to mix evaluated & original object matrices - Or, rewrite this operator to work in a completely different way,
This relates to policy for handling copy on write, assigning to @sergey.
Added subscriber: @Mets
Added subscriber: @lichtwerk
@Sergey: Would it make sense to have a version of
BKE_object_workob_calc_parent
that works strictly with the originals [parent] (since that would fix this bug afaict)?(Or is this even more inconsistent?)
Added subscribers: @GaiaClary, @mont29, @Sabbababba
Or we could prepare the evaluated object as best as we can like so?
P946: #55494 snippet
Added subscriber: @brecht
@Sergey, can you check this?
@brecht, i've been looking into the change. Not really sure yet why it is required to do some calculations in original object, and some of them are on both. To me it seems that
where_is
will return same matrix for bothob
andob_eval
?Also, there is
BKE_object_transform_copy()
, which is probably easier to use right beforewhere_is
, and ignore the rest of the change?Hm, without having looked at this again (will do on monday), just want to note that the following are all very tightly related:
blender/blender@bc54823376
(This commit is where it "started", in
BKE_object_workob_calc_parent
calculation of matrix for workobject is now based on the evaluated parent)Above commit left a couple of places "broken" where code prior to
BKE_object_workob_calc_parent
was changing original (flags/matrix, etc), butBKE_object_workob_calc_parent
was using evaluated version [which didnt have these changes available yet]blender/blender@2894e75121 / blender/blender#60623 [this compensated by setting
BONE_RELATIVE_PARENTING
flag on evaluated version as well, as well as usingpartype
,par1
,par2
,par3
from the original again]blender/blender@9ad9d38786 / blender/blender#62601 [this compensated by setting
CU_FOLLOW
flag on evaluated version as well]So right now this is really a bit mixed up... [as @ideasman42 also mentioned above]
So on Monday will also look at why blender/blender@bc54823376 was necessary to do that way...
If it needs to be like that, then it kind of makes sense to make sure the evaluated version is getting any updates as well [because evaluated will be used later on]
Added subscriber: @KihakuGisui
Added subscriber: @dfelinto
Hrmf, after a bit more digging, I still lack a "proper" solution [at least it feels like that...]
Here is the "cleaned up" ex- P946 solution from above (with the unneeded stuff removed and suggestions from @Sergey):
P949: #55494 snippet again
other stuff I tried to look into:
BKE_object_workob_calc_parent
will actually work fine, but will run into problems elsewhere... [wrong evaluation of curve parents etc...]ID_RECALC_COPY_ON_WRITE
and update depsgraph [but that will update dependencies as well, causing problems with nested parents etc...]Long story short: Some other eyes will probably need to look at this in depth...
Maybe @dfelinto also wants to join?
Added subscriber: @capnm
Added subscriber: @brothermechanic
Added subscriber: @hunterz263
Added subscriber: @HyLian
Added subscriber: @LucasVeber
This issue was referenced by blender/blender@26d4a2a516
Changed status from 'Open' to: 'Resolved'