Notifications
Clear all

[Closed] Possible to improve this SoftSelect Falloff Script?

Hi, I was digging through old threads on this forum searching for a way to bind Soft Select Falloff to a hotkey, and found this thread

http://forums.cgsociety.org/showthread.php?f=6&t=48625&highlight=soft+falloff

which contained a cool little script that lets you bind incremental increases or decreases for soft select falloff to a hotkey.


 
first macroscript

--------- [begin snip] ---------------

macroScript ShrinkSoftSel
category:"MyScripts"
toolTip:"Shrink Soft Select"
(
on isEnabled return 
(
if (((getcurrentselection()).count == 1) and ($ != undefined)) then 
if (classof $.baseobject == Editable_Poly) then true else false
else false
)

on Execute do
(
undo off
(
local tempvalue = $.Falloff
tempvalue = tempvalue - 0.5
if (tempvalue < 0) then tempvalue = 0
$.Falloff = tempvalue
)
)
)

--------------- [end snip] -----------


second macroscript

-------------[begin snip] -------------

macroScript GrowSoftSel
category:"MyScripts"
toolTip:"Grow Soft Select"
(
on isEnabled return 
(
if (((getcurrentselection()).count == 1) and ($ != undefined)) then 
if (classof $.baseobject == Editable_Poly) then true else false
else false
)

on Execute do
(
undo off
(
local tempvalue = $.Falloff
tempvalue = tempvalue + 0.5
$.Falloff = tempvalue
)
)
)
------------ [end snip] ---------------
 

My question is, is it possible to modify this script such that you could hold down a key, and then increment up & down using the mouseCursorY or mouseCursorX position? This would provide a functionality similar to a sculpting program like Mudbox. Is this even possible?

Thanks

9 Replies

I wrote a tool to do this exact thing. One of our modelers suggested it, and it works great. It works off the mouse input y axis. Let me check and see if I can release it to the public, as it’s probably under NDA.

I’ll get back in a bit about it. If I can’t release it, then I can certainly point you to how it can be done.

-Dave

Thanks Dave! I look forward to your next post

I wrote such a script that’d increase or decrease by a static amount by hotkeys which I then bound to my griffin technology usb wheel :3
however the script wasn’t helpfull as max lagged terribly when turning the wheel and turning the wheel sensitivity down and script effect up would make it too coarse.

so I’m also interested in this script if it works great

This is still on my wish list, I’m not sure if Dave is going to be posting again to this thread so I’ll start researching more – It would definitely be handy

oww, today i had exactly the same idea of a softselection script. wanted to use the same way to manipulate it like you describe.

grml, and i thought i could do something completely new

would be nice if you let us know, if you can release the script or not, dave. because if not, i would try to do it by myself.

Just bumpin’ this thread to see if anyone knows the answer!

Here is one that I wrote for fun after seeing this post, it adjusts the FallOff Size by percentage, wich I though would be more useful no matter what scale you work at.

I bound the FallOff Up to my up arrow and FallOff Down to the down arrow…

Script Attached.

macroScript falloff_2
category:“MyScripts”
toolTip:””
(
rollout falloff_mouseRollout “Untitled” width:344 height:25
(
slider sld1 “” pos:[51,1] width:300 height:25 range:[0,selection[1].Falloff*2,selection[1].Falloff] orient:#horizontal ticks:0
label edt1 “” pos:[2,3] width:44 height:16

	on sld1  buttonup  do
	(
		if (selection[1] != undefined) and ((classof selection[1].baseobject) == Editable_Poly) do
		(
		selection[1].Falloff = sld1.Value
		selection[1].useSoftSel  = true
		DestroyDialog falloff_mouseRollout
		)
		
	)
	
	on falloff_mouseRollout open do
	(
	if (selection[1] != undefined) and ((classof selection[1].baseobject) == Editable_Poly) do
	(
	edt1.Text = selection[1].Falloff as string
	sld1.Value = selection[1].Falloff
	)
	)
)

on execute do
(
try(DestroyDialog falloff_mouseRollout) catch()
if (((classof selection[1].baseobject) == Editable_Poly)) do
	(
		createdialog falloff_mouseRollout style:#(#style_sysmenu) pos:(mouse.screenpos-[194,10])
	)
)

)

thanks for sharing!
half way there! will try to modify it for myself