Notifications
Clear all

[Closed] Found geometry with keyable modyfiers

everything works as expected in your scene …
the only one node there with an animated modifier. it’s Tube001 – animable modyfier

run this and the code deselect this node for you

(
	select objects
	deselect (getNodesWithAnimatedModifiers nodes:(getCurrentSelection()))
) 

don’t work. This is code I make using yours:

fn doesSubHaveAKey sub has:false =
(
if iskindof sub subanim do has = (sub.keys != undefined and sub.keys.count > 0)
for k=1 to sub.numsubs while not has do has = doesSubHaveAKey sub[k]
has
)

fn getNodesWithAnimatedModifiers nodes: =
(
if nodes == unsupplied do nodes = objects as array
for node in nodes collect
(
local has = off
for modi in node.modifiers while not has do has = doesSubHaveAKey modi
if not has then dontcollect else node
)
)

(
select objects
deselect (getNodesWithAnimatedModifiers nodes:(getCurrentSelection()))
)

So if works for You that mean I asembly it in wrong way.
what is rong whit this?, maybe it’s wrong order of parenthesis, can You sent me code as one. I was trying with parenthesis in different places and nothing.

i don’t know what do you do but this code works. how to you run the code? put into new script, evaluate all, and you will see everything selected except “Tube001 – animable modyfier”

it seems like i’ve got your problem. you probably assume to get “Cylinder001-animable” as well…
but this node animated by other transforms which are not in a modifier. skin modifier itself doesn’t have animated properties.
it will be easier to search specifically for all skinned meshes which have skin with animated skin bones (which means might be deformed)

I restarted max, opened new window in max script editor, pasted your code and all it did was selecting all objects on scene. I checked it with different scene and it always select all objects.
I need it, just take a quick look on my script above, try to use it, are we talking about this same script? I’m loosing hope to solve it but it’s core element in my tool.Maybe the reason is trial like i assembly those parts in rong way, it’s impossible then this same code haw different results on different computers:)

screenshot as attachment

:banghead:

1 Reply
(@archangel35757)
Joined: 11 months ago

Posts: 0

I don’t see any attached screeshot– and are you trying to test on objects that have skin modifier? If so, then carefully re-read what Denis wrote earlier.

and listner showed me this:

– Error occurred in anonymous codeblock; filename: ; position: 196; line: 4
– Frame:
– has: undefined
– Unknown property: “numsubs” in undefined
getNodesWithAnimatedModifiers()
OK

I tested with animated rigid and version2 with objects with bend and ffd modyfier. Here is picture. Can samebody can test it?

Denis, You are my hero!
I restarted my computer because windows was in sleep mode over week. Then I
removed some different scripts from max which indicate errors when max was started and it works now. This is milestone. I check your code to remove unused modyfiers however this one not work at all, can you test it?
Thank You anyway best part is done already.

Page 3 / 3