World Standart of Parenting #79225

Closed
opened 2020-07-24 11:51:50 +02:00 by Roman · 9 comments

This is a design task for changing parenting method.

Description of the problem of the existing method
https://blender.community/c/rightclickselect/fJdbbc/

Solution: calculate coordinates using the following formulas

[world position object-Parent] - [world position object-Child] = Child_position
[world rotaion object-Parent] - [world rotaion object-Child] = Child_rotaion
[world scale object-Child] / [world scale object-Parent] = Child_scale

This is a design task for changing parenting method. Description of the problem of the existing method https://blender.community/c/rightclickselect/fJdbbc/ Solution: calculate coordinates using the following formulas [world position object-Parent] - [world position object-Child] = Child_position [world rotaion object-Parent] - [world rotaion object-Child] = Child_rotaion [world scale object-Child] / [world scale object-Parent] = Child_scale
Author

Added subscriber: @roman-13

Added subscriber: @roman-13
Member

Added subscriber: @Mets

Added subscriber: @Mets
Member

This took a bit of effort to understand, but I think juliensoler's comment in that thread is hitting the nail on the head:

IMHO, Blender lacks of two operations:

  • in Ctrl-P menu : a "Object (without inverse, keep transform)" which parent, clear parent inverse and leave the object in place
  • in Alt-P menu: "Clear parent inverse (keep transform)" which clear parent inverse and leave the object in place I guess those operations does not exist because it will not work if child have rotation and parent non uniform scale (I think, not really sure). But it worth it anyway. If the operation does not do what you expected, you still have Ctrl-Z...

This can be done with a few lines of Python, just slap this in a text editor and try it:

import bpy
from mathutils import Matrix

act = bpy.context.active_object
# Parent selected objects to active, empty the inverse matrix and preserve the world matrix.
for o in bpy.context.selected_objects:
	if o==act: continue
	mat_world = o.matrix_world.copy()
	o.parent_type = 'OBJECT'
	o.parent = act
	o.matrix_parent_inverse = Matrix.Identity(4)
	o.matrix_world = mat_world

I'm not sure if this topic belongs here yet, so be warned a developer very well might close this (design tasks are usually created on developer's approval, or by the developer who will implement the design themselves)
As for the question of whether this should be a part of Blender, I have no strong opinion, It does seem useful!

This took a bit of effort to understand, but I think juliensoler's comment in that thread is hitting the nail on the head: >IMHO, Blender lacks of two operations: >- in Ctrl-P menu : a "Object (without inverse, keep transform)" which parent, clear parent inverse and leave the object in place >- in Alt-P menu: "Clear parent inverse (keep transform)" which clear parent inverse and leave the object in place I guess those operations does not exist because it will not work if child have rotation and parent non uniform scale (I think, not really sure). But it worth it anyway. If the operation does not do what you expected, you still have Ctrl-Z... This can be done with a few lines of Python, just slap this in a text editor and try it: ``` import bpy from mathutils import Matrix act = bpy.context.active_object # Parent selected objects to active, empty the inverse matrix and preserve the world matrix. for o in bpy.context.selected_objects: if o==act: continue mat_world = o.matrix_world.copy() o.parent_type = 'OBJECT' o.parent = act o.matrix_parent_inverse = Matrix.Identity(4) o.matrix_world = mat_world ``` I'm not sure if this topic belongs here yet, so be warned a developer very well might close this (design tasks are usually created on developer's approval, or by the developer who will implement the design themselves) As for the question of whether this should be a part of Blender, I have no strong opinion, It does seem useful!
Author

@Mets Thank you! This is exactly what need!
Мany artists suffer without this feature!
It remains to embed this in the blender.

@Mets Thank you! This is exactly what need! Мany artists suffer without this feature! It remains to embed this in the blender.

Added subscriber: @Foaly

Added subscriber: @Foaly

@Mets @roman-13
Keep in mind that this will not work with Curve objects, since they have another hidden matrix that the python api does not take care of.
(E.g. doing o.matrix_world = o.matrix_world will also move an object, rather than doing nothing.)

Perhaps a redesign for these things is due anyway?

@Mets @roman-13 Keep in mind that this will not work with Curve objects, since they have another hidden matrix that the python api does not take care of. (E.g. doing `o.matrix_world = o.matrix_world` will also move an object, rather than doing nothing.) Perhaps a redesign for these things is due anyway?

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Brecht Van Lommel self-assigned this 2020-07-27 14:41:38 +02:00

Design tasks should only be created by developers that will implement the feature or maintain the module. Please see here for where to post such requests or design ideas:
https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

Design tasks should only be created by developers that will implement the feature or maintain the module. Please see here for where to post such requests or design ideas: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79225
No description provided.