3DMMForever icon indicating copy to clipboard operation
3DMMForever copied to clipboard

[Feature] Object Grouping 🏘

Open davidrenne opened this issue 3 years ago • 11 comments

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.

davidrenne avatar Dec 01 '22 23:12 davidrenne

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

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/inc/scene.h#L147-L148

willbr avatar Aug 05 '23 18:08 willbr

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

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/inc/scene.h#L141-L142

willbr avatar Aug 06 '23 21:08 willbr

fcustCmd is used to track the state of the Ctrl key

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/kauai/src/framedef.h#L70-L74

Here's an example:

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/src/studio/stdioscb.cpp#L201-L212

willbr avatar Aug 06 '23 21:08 willbr

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

https://github.com/foone/3DMMForever/blob/79b301091175459dd39ec53bbb8a711248e969c6/src/engine/movie.cpp#L7298

willbr avatar Aug 16 '23 19:08 willbr

Here's a quick proof of concept.

https://youtu.be/N_sE9byNVao

https://github.com/willbr/3DMMForever/commit/1c717e0d68c31e8faac36fd562abee48c1228179

willbr avatar Aug 16 '23 21:08 willbr

@willbr you are a god

davidrenne avatar Aug 16 '23 21:08 davidrenne

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

frank-weindel avatar Aug 16 '23 22:08 frank-weindel

@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.

davidrenne avatar Aug 17 '23 11:08 davidrenne

@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.

frank-weindel avatar Aug 23 '23 11:08 frank-weindel

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 avatar Aug 30 '23 18:08 willbr

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.

willbr avatar Sep 02 '23 09:09 willbr