Notifications
Clear all

[Closed] Syntax error:

but this is also not 100% correct. do you know why?

You are a maxscript master. My knowledge is, about 5-10% of yours.

The second code do not loose selection. The OP can fix the first code to have the same selection after the script finish its job.

true… but you have to fight with UI flickering

3 Replies
(@miauu)
Joined: 11 months ago

Posts: 0

Yes, and thanks to you, everyone can learn how to do it.

This is valid for Max 2017 also:

By the way, in 3dsmax 2014, when I select the edges in edge sub-object level, and then selet edges in border sub-object level and then go back to edge sub-object level the selected edges are lost and only the boreder edges are selected. The same with Polygon and Element sub-object levels – select polys in polygon sol, then go th element sol, select a element, then go back to polygon sol – and only the selected elements is selected.

No.

for sub = 1 to 4 do...

also can be used.

(@denist)
Joined: 11 months ago

Posts: 0

because the modifier can be pinned in stack. and current selection can be about anything absolutely different

so we have to find the Modifier nodes… sounds simple? yes:


refs.dependentnodes <modifier>

it’s absolutely safe to go through this list, but the questions is – are all dependent nodes have the modifier applied to?

(@miauu)
Joined: 11 months ago

Posts: 0

I’ve tested your code


(
	if iskindof (m = modpanel.getcurrentobject()) Edit_Poly do 
	(
		for node in selection do for sub = 1 to 3 do m.setselection sub #{} node:node
	)
)

with edit poly modifier, at the top of the stack, applied to several objects, pinned to the stack, and it works.

If the


refs.dependentnodes <modifier>

contains a list of all nodes to which the m is applied, then why some of them will not have the modifier applied?

try to deselect scene or select anything else… pinned modifier is in the panel, but another unrelated objects can be selected

If the


refs.dependentnodes <modifier>

contains a list of all nodes to which the m is applied, then why some of them will not have the modifier applied?

the list includes all nodes that modifier applied but also all nodes those depend on the modifier any other way than modifier stack. believe me it’s possible

1 Reply
(@miauu)
Joined: 11 months ago

Posts: 0

I believe you. Now you know whay I am not a master.

i think the dependency test has to have additional options to narrow the area of searching… (it’s how my extended function works :))

with my mxs extension it’s much easier:

getmodifiermodes <modifier>

setsubselection <modifier>  #none level:#all   

etc.

clear selection is pretty common method for all modifiers those support selection (edit, select, skin, uvw, etc.)

1 Reply
(@miauu)
Joined: 11 months ago

Posts: 0

I think that I have to pay to someone to make a dlx file with all useful examples found in the forum and in the net. Recompiling for newer 3dsa max versions is what is stops me for now.

Page 2 / 2