Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#1213 closed enhancement (fixed)

[PATCH] [ATLAS] Multi-Selection object rotation

Reported by: michael Owned by: trompetin17
Priority: Nice to Have Milestone: Alpha 18
Component: Atlas editor Keywords:
Cc: Patch:

Description

Multi-Selection object rotation. Right-click rotation (as with single objects). Just rough calculate a center point of the selection and use that as a center for rotation.

Attachments (8)

1213.diff (9.3 KB ) - added by trompetin17 9 years ago.
1213.2.diff (11.0 KB ) - added by trompetin17 9 years ago.
1213.3.diff (9.5 KB ) - added by trompetin17 9 years ago.
1213.4.diff (9.5 KB ) - added by trompetin17 9 years ago.
1213.5.diff (9.7 KB ) - added by trompetin17 9 years ago.
Some code style fix
1213.6.diff (9.4 KB ) - added by trompetin17 9 years ago.
1213.7.diff (8.9 KB ) - added by trompetin17 9 years ago.
Change Ctrl behavior
1213.8.diff (8.9 KB ) - added by trompetin17 9 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 by Kieran P, 12 years ago

Keywords: atlas added
Priority: Nice to HaveIf Time Permits

comment:2 by Kieran P, 12 years ago

Milestone: Alpha 10Backlog
Summary: Atlas: Multi-Selection object rotation[ATLAS] Multi-Selection object rotation

by trompetin17, 9 years ago

Attachment: 1213.diff added

comment:3 by trompetin17, 9 years ago

Keywords: review patch added
Milestone: BacklogAlpha 18
Owner: set to trompetin17
Summary: [ATLAS] Multi-Selection object rotation[PATCH] [ATLAS] Multi-Selection object rotation

this ticket depend on #1163 (Buildind Constraint)

Here is my video about implementation

http://youtu.be/2MQoelad0Is

by trompetin17, 9 years ago

Attachment: 1213.2.diff added

comment:4 by Niek, 9 years ago

As said through IRC, it would be nice when (as a third option maybe) the selected entities would keep their relative rotation to each other (as an extension to the rotation where the entities would move around)

comment:5 by Stan, 9 years ago

CTRL + Rotation or something ?

by trompetin17, 9 years ago

Attachment: 1213.3.diff added

by trompetin17, 9 years ago

Attachment: 1213.4.diff added

by trompetin17, 9 years ago

Attachment: 1213.5.diff added

Some code style fix

in reply to:  4 comment:6 by trompetin17, 9 years ago

this is the video about how I implemented http://youtu.be/Z3ynovnPwhs

  • shift for translate without rotation itself
  • ctrl(command in osx) for translate with rotation itself

Replying to niektb:

As said through IRC, it would be nice when (as a third option maybe) the selected entities would keep their relative rotation to each other (as an extension to the rotation where the entities would move around)

comment:7 by Niek, 9 years ago

Very good! That's indeed how I had it in mind!

comment:8 by historic_bruno, 9 years ago

Priority: If Time PermitsNice to Have

comment:9 by historic_bruno, 9 years ago

In RotateObjectsFromCenterPoint, m_centerPoint should be camel case m_CenterPoint and you don't need to initialize it (the default constructor is 0,0,0 but this line actually causes a build error in MSVC). Similarly m_angleInitialRotation should be capitalized.

I get these other build errors in VS2010:

1>  TransformObject.cpp
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(555): error C2864: 'TransformObject::sRotating::rotateFromCenterPoint' : only static const integral data members can be initialized within a class
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2065: 'mUpdateVisualSelectedObjects' : undeclared identifier
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2059: syntax error : ')'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'

by trompetin17, 9 years ago

Attachment: 1213.6.diff added

in reply to:  9 comment:10 by trompetin17, 9 years ago

Status: newassigned

Done. This tickets was depending #1163, but I didnt update this one with last changes over these ticket.

Replying to historic_bruno:

In RotateObjectsFromCenterPoint, m_centerPoint should be camel case m_CenterPoint and you don't need to initialize it (the default constructor is 0,0,0 but this line actually causes a build error in MSVC). Similarly m_angleInitialRotation should be capitalized.

I get these other build errors in VS2010:

1>  TransformObject.cpp
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(555): error C2864: 'TransformObject::sRotating::rotateFromCenterPoint' : only static const integral data members can be initialized within a class
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2065: 'mUpdateVisualSelectedObjects' : undeclared identifier
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2059: syntax error : ')'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'
1>..\..\..\source\tools\atlas\AtlasUI\ScenarioEditor\Tools\TransformObject.cpp(560): error C2039: 'mUpdateVisualSelectedObjects' : is not a member of 'AtlasMessage'

comment:11 by historic_bruno, 9 years ago

Seems to work well, but I would make the current Ctrl behavior the default, that should be the most common and useful type of rotation. Then make the other two functions use the modifier keys.

by trompetin17, 9 years ago

Attachment: 1213.7.diff added

Change Ctrl behavior

in reply to:  11 comment:12 by trompetin17, 9 years ago

Done. Replying to historic_bruno:

Seems to work well, but I would make the current Ctrl behavior the default, that should be the most common and useful type of rotation. Then make the other two functions use the modifier keys.

by trompetin17, 9 years ago

Attachment: 1213.8.diff added

comment:13 by Itms, 9 years ago

Resolution: fixed
Status: assignedclosed

In 16275:

Add various rotation modes for multiple object selections (individual rotation, global rotation with or without individual rotation).

Patch by trompetin17, fixes #1213

comment:14 by Itms, 9 years ago

Keywords: atlas review patch removed

Thanks a lot for your work! :D

Note: See TracTickets for help on using tickets.