ScriptSpot

Forum topic · General Scripting

INTERPOLATE CHAMFER (chamfer like work of the smooth)

By Nik · 2013-01-22

Downloads
Description

Namely, chamfer, which would work like this, as I have shown in this GIF

interpolate_chamfer

MacroScript int_Chamfer
ButtonText:"int_Chamfer"
Category:"temp" 
Tooltip:"int_Chamfer" 
(
	On IsEnabled Return Filters.Is_EPoly()
	On IsVisible Return Filters.Is_EPoly()
	On IsChecked Do (
		try (
			local A = Filters.GetModOrObj()
			(Filters.Is_This_EditPolyMod A) and (A.GetCommandMode()==#ChamferEdge)
		)
		catch ( false )
	)
	On Execute Do (
		Try (
			If SubObjectLevel == undefined then Max Modify Mode
			if subobjectLevel < 2 then subobjectLevel = 2
			if subobjectLevel > 3 then subobjectLevel = 2
			local A = Filters.GetModOrObj()
			)
		
	)
	
	On AltExecute type do (
		Try (
			If SubObjectLevel == undefined then Max Modify Mode
			if subobjectLevel < 2 then subobjectLevel = 2
			if subobjectLevel > 3 then subobjectLevel = 2
			local A = Filters.GetModOrObj()
		)
		
	)
)
Comments (15)

airbrush · 2014-01-20

>> MAXScript MacroScript Error Exception:
-- Compile error: Nested macroScript definitions are not permitted
-- In line: MacroScript i <<

barigazy · 2014-01-20

That's why I hate macros :)

airbrush · 2013-10-03

script gives and error for me

--Syntax error: at),expected catch
-- In Line: )

.

miauu · 2013-10-03

The script do nothing, but...


MacroScript int_Chamfer
ButtonText:"int_Chamfer"
Category:"temp" 
Tooltip:"int_Chamfer" 
(
	On IsEnabled Return Filters.Is_EPoly()
	On IsVisible Return Filters.Is_EPoly()
	On IsChecked Do (
		try (
			local A = Filters.GetModOrObj()
			(Filters.Is_This_EditPolyMod A) and (A.GetCommandMode()==#ChamferEdge)
		)
		catch ( false )
	)
	On Execute Do (
		Try (
			If SubObjectLevel == undefined then Max Modify Mode
			if subobjectLevel < 2 then subobjectLevel = 2
			if subobjectLevel > 3 then subobjectLevel = 2
			local A = Filters.GetModOrObj()
			)catch()
 
	)
 
	On AltExecute type do (
		Try (
			If SubObjectLevel == undefined then Max Modify Mode
			if subobjectLevel < 2 then subobjectLevel = 2
			if subobjectLevel > 3 then subobjectLevel = 2
			local A = Filters.GetModOrObj()
		)catch()
 
	)
)

airbrush · 2013-10-04

doesn't do anything for me...??

Nik · 2013-01-24

Well, thank you very much for your response. Respect and thanks!

Nik · 2013-01-24

I have such a modifier, but he is not working as it should

Nik · 2013-01-24

It looks like higher mathematics needed to describe the logic of it? :)

barigazy · 2013-01-24

Exactly :)

gif I accidentally deleted, so load up again

Nik · 2013-01-24

how to do it? As to gif

barigazy · 2013-01-24

You can make it shorter

if getCommandPanelTaskMode() == #modyfy then subobjectLevel = 2 else
(
setCommandPanelTaskMode mode:#modify
subobjectLevel = 2
)

Nik · 2013-02-13

base chamfer of 3dsmax works like this clumsy

It looks like a difficult

Nik · 2013-01-24

Please help :)