need help

Hi guys
how can I remove the segment from the shape through the maxscript
please help..

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

(
	--	"the index of the segment that you want to delete"
	segIdxTodel = #(3)
	subSplineIdx = 1
	splineObj = $Line001
	select splineObj
	max modify mode
	subobjectlevel = 2
	setSegSelection splineObj subSplineIdx segIdxTodel
	updateShape splineObj
	max delete
)
AxAurum's picture

Thank you miauu you just

Thank you miauu
you just saved me!!!

if you can tell me why my method does not work

(
setSegSelection $ 1 #(3)
subobjectLevel = 2
splineOps.delete $
subobjectLevel = 0
updateShape $
)

miauu's picture

.

I don't know.
But this works:

        setSegSelection $ 1 #(4)
	subobjectLevel = 2
	splineOps.delete $
	subobjectLevel = 0
	updateShape $

As you can see if the code is executed without brackets(everytnig is in global scope) the segment will be deleted. If the splineOps.delete is inside brackets(local scope) it not works.

AxAurum's picture

Yes, I know that without the

Yes, I know that without the brackets everything works fine
but I need to create a function

In any case, your method works really well
I just replaced the "splineOps.delete" in "max delete" and got what I need
Thank you so much you helped me a lot
Happy new year!
cheers!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.