Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Object Grouping 🏘 #38

Open
davidrenne opened this issue Dec 1, 2022 · 11 comments
Open

[Feature] Object Grouping 🏘 #38

davidrenne opened this issue Dec 1, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@davidrenne
Copy link

This is the single most powerful feature. CTRL+CLICK to select multiple objects and group together so you can move them frame by frame.

Either clicking something from the animation window or the sidebar with ctrl+click will select all and we have a group button show up and they animate. Finally will I not have to move things frame by frame with multiple objects.

@frank-weindel frank-weindel added the enhancement New feature or request label Dec 7, 2022
@willbr
Copy link

willbr commented Aug 5, 2023

It looks like it's designed around selecting single items.

3DMMForever/inc/scene.h

Lines 147 to 148 in 79b3010

PACTR _pactrSelected; // Currently selected actor, if any
PTBOX _ptboxSelected; // Currently selected tbox, if any

@willbr
Copy link

willbr commented Aug 6, 2023

We could replace _pactrSelected with a new PGL of selected actors.

3DMMForever/inc/scene.h

Lines 141 to 142 in 79b3010

PGL _pglpactr; // List of actors in the scene.
PGL _pglptbox; // List of text boxes in the scene.

@willbr
Copy link

willbr commented Aug 6, 2023

fcustCmd is used to track the state of the Ctrl key

#define fcustNil 0
#define fcustCmd 1
#define fcustShift 2
#define fcustOption 4
#define kgrfcustKeys 7

Here's an example:

if ((pcmd->rglw[0] == chttFButtonFW) || (pcmd->rglw[0] == chttFButtonRW))
{
_fBtnAddsFrames = ((pcmd->rglw[1] & fcustCmd) &&
(((pscen->NfrmLast() == pscen->Nfrm()) && (pcmd->rglw[0] == chttFButtonFW)) ||
((pscen->NfrmFirst() == pscen->Nfrm()) && (pcmd->rglw[0] == chttFButtonRW))));
StartNoAutoadjust();
}
if (!_fBtnAddsFrames)
{
return fTrue;
}

@willbr
Copy link

willbr commented Aug 16, 2023

Here's where the mouse drag handler queries the selected actor.

pactr = pscen->PactrSelected();

@willbr
Copy link

willbr commented Aug 16, 2023

Here's a quick proof of concept.

https://youtu.be/N_sE9byNVao

willbr@1c717e0

@davidrenne
Copy link
Author

@willbr you are a god

@frank-weindel
Copy link
Collaborator

That is so cool @willbr! Very clear analysis and it's really neat to see.

@davidrenne
Copy link
Author

@frank-weindel is there a new repo that features like this can start to be integrated into builds. I'm just confused how foone wants to keep forever building and stable here in this repo but eventually have new builds with things like this. This is the first feature I've ever seen implemented based on animator feedback on github so I'm just not sure how all the maintainers are going to be compiling features for cool stuff like this.

@frank-weindel
Copy link
Collaborator

@davidrenne So I think a feature like this remains in scope for 3DMMForever as long as it doesn't break any backwards compatibility with movies/etc. It not requiring UI changes also helps.

@willbr
Copy link

willbr commented Aug 30, 2023

We'd have to be careful with the hotkeys.

Ctrl & Shift are both used for dragging, so we don't want to break those.

image

@willbr
Copy link

willbr commented Sep 2, 2023

It's working well so far.

https://youtu.be/j19fIvL7NDc
https://github.com/willbr/3DMMForever/commits/group-test

It now uses a real list.

And, I've added a selection toggle, and Ctrl+A for select all actors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants