Select Model Within Group

Currently, Studio allows users to use Alt-Left Click to select a single part within a group. I we had a shortcut that allowed us to select a model within a group. Even though selecting an individual part leads me to the group I wish I could select, it would be easier if I could select the group right off.

13 Likes

How would it work though? There could be several sub-models. How would studio know which one to select?

1 Like

Make it based on the model you’ve already selected. So you select the first model, then you can select one of the models that are children of that model, then you can select one of the models that are children of that model, et cetera. Because parts can’t be in more than one model at once there shouldn’t be any ambiguation problems with sibling models.

Good point. Perhaps with each click, it would detect the click target and dive into lower subgroups until it hits the lowest model of the target.

[Neighborhood Group]
___House1
___House2
___House3
___House4
______House5 <— Click
______Table1
______Table2
______Couch1 <— Click
_________Brick
_________Brick
_________Brick
______Bed1
______Bed2

Boom. Two clicks and the Couch1 model is selected.

1 Like

Thanks for the visual. Ctrl+Shift+Alt Click, maybe? xD

Btw, this seems easy enough to make as a plugin for now. I’ll try

1 Like

Some way to do this would be really useful, especially for large builds. I don’t like having my explorer scrolling bar very large so I like to organize using models. The problem is that I end up wanting to get to a model in a model and there is shortcut to do this. Total support.

1 Like

[quote] Currently, Studio allows users to use Alt-Left Click to select a single part within a group. [/quote] You can do that! :open_mouth:

Maybe we just need a shortcut that selects the parent of the selected child. That way, you could alt-click, and then use the shortcut until you have the model you want.

I have select children set to Ctrl+Q – I might end up making a plugin that turns Ctrl+E into select parent.

It’d also be cool if when you alt clicked, that part would actually show up in explorer

It used to, but ROBLOX made some update that broke it.

It used to, but ROBLOX made some update that broke it.[/quote]
Sometimes it does, sometimes it doesn’t. It seems to depend on how deep the part is in the hierarchy and how many of those layers have already been expanded.

Ctrl+E is bound by default to raise the studio free-cam up. I considered ctrl+P (and might switch to it) but went with ctrl+B because it’s unused and can actually be hit with just the left hand, unlike ctrl+P

[code]–[[

ctrl+E to select the parent of the selection
(used in combination with alt+click to select a brick within models)

-maelstronomer

–]]

letter = ‘B’
keys = {} --only add leftcontrol and rightcontrol

uis = game:GetService’UserInputService’
uis.InputBegan:connect(function(inputobject)

local key = inputobject.KeyCode.Name
if key == 'LeftControl' then
	keys[key] = true
elseif key == 'RightControl' then
	keys[key] = true
end

if key == letter and (keys.LeftControl or keys.RightControl) then
	local selection = game.Selection:Get()
	--what happens if more than 1 selection?
	--put each parent in the selection:Set({}) table (ignore dupes)
	local newselections = {}
	for _,v in next, selection do
		if not newselections[v.Parent] and v.Parent ~= game and v.Parent.Parent ~= game then
		--if selecting workspace or something directly in workspace then ignore that
		--(applies to other game services such as game.Lighting and game.ServerStorage)
			table.insert(newselections, v.Parent)
		end
	end
	if newselections[1] then --lol, don't just select nothing. select the highest level ok stuff
		game.Selection:Set(newselections)
	end
end

end)
uis.InputEnded:connect(function(inputobject)
local key = inputobject.KeyCode
if key == ‘LeftControl’ then
keys[key] = false
elseif key == ‘RightControl’ then
keys[key] = false
end
end)
[/code]

[strike]I’m currently trying to fix the broken hierarchy-not-expanding bug. I could quickly insert a simple object in all of the parents leading to the selection, I guess.[/strike]

Edit: Just tried fixing that silly bug. Didn’t work at all. Is there NO way for us to expand the tree via script?

2 Likes