Notifications
Clear all

[Closed] change vray effect ID channel script

there is another tip…
you are using appendIfUnique. But if you collect nodes to only select/hide/unhide/…there is no reason to make the array unique. There is no difference how many dups in node list to select. But the making the list unique takes a time. So if you expect to have a big list of nodes to select don’t check the uniqueness.

I don’t know exactly how the OP is using this. My reasoning was if a node has a multisub material applied it could get added to objARR more than once if more than one sub-materials fitted the criteria.

Maybe using makeUniqueArray once at the end would be quicker…

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

there is no big difference. the same algorithm. but if your list is short it’s faster to check uniqueness before appending the element than make the whole list unique later.

by the way… what is a reason to not select hidden nodes? but if there is any, you have to check the isHiddenInVpt property which better reflects the node’s visibility state in the viewport.

by the way… what is a reason to not select hidden nodes? but if there is any, you have to check the isHiddenInVpt property which better reflects the node’s visibility state in the viewport.
You’re right I should really have used isHiddenInVpt.

As for whether to select hidden objects I suppose it’s personal preference really. Generally, when I’m working I prefer not to have hidden objects selected. A better way would really have been to warn the user with a queryBox and ask if they want hidden objects selected.

Hey guys,

Sorry I published the script a while back, but forgot to post it here.

Anyway it can be downloaded from here http://arddigital.co.uk/effect-id-changer/

Feel free to checkout my other scripts here http://arddigital.co.uk/category/script/

If you see a way to make them better, feel free to let me know!!

Thanks for all your help,

Dean

Page 3 / 3