Tagged 'General Scripting'

script only plays once

Hi i am trying to make this script repeat until all the grouped objects are gone
but it only plays once. so out of 5 groups only 1 gets deleted.

For example if I have 5 groups in the scene I would like this to repeat the script 5 times.

rollout image_button_test "Image Button"
(
------------------------------------------
button theButton "Delete All" width:90 height:20
------------------------------------------

on theButton pressed do
(
for OBJ in helpers do
(
select OBJ
(
print "Start"
for i in selection do i.name = i.name + ("R")
$.renderable = on
delete$

Duplicate post

Duplicate post Please delete.
I have no option to delete. thank you

Script stops in 2021 3dsmax

in Max 2018 the script would loop till all objects with the name "360" were none existent.
now in Max 2021 it stop once it reaches the end of the script.

did something change in 2021 maxscript that changed this function or is it disabled?

thanks

Script stops in 2021 3dsmax

in Max 2018 the script would loop till all objects with the name "360" were none existent.
now in Max 2021 it stop once it reaches the end of the script.

did something change in 2021 maxscript that changed this function or is it disabled?

thanks

Script stops in 2021 3dsmax

in Max 2018 the script would loop till all objects with the name "360" were none existent.
now in Max 2021 it stop once it reaches the end of the script.

did something change in 2021 maxscript that changed this function or is it disabled?

thanks

Script stops in 2021 3dsmax

in Max 2018 the script would loop till all objects with the name "360" were none existent.
now in Max 2021 it stop once it reaches the end of the script.

did something change in 2021 maxscript that changed this function or is it disabled?

thanks

Select Material by name in SME

Hello everyone,
I try to select a material in Slate Mode Editor to delete it from the view.
My material to delete exist in the view and have an explicit name.
I don't find any solution to select material of the slate editor view by his name and delete it from the view.
I have you got some tips to realise this?

Many thanks
Bruno

select multiple objects by material ID

i was not able to find a script that select all objects in the scene based on material ID

anyone?

Optimizing code

Hello
I am trying to optimize my code. Need to select a object class in a specific layer.
I am working with code that consists of two stages:
1: Selecting all objects in the layer.
2: Selecting splines from selected objects.

(
local allNodes = #(), theNodes = #()
for n in selection do (n.layer.nodes &theNodes ; join allNodes theNodes)
select allNodes
select(for obj in selection where classof obj.baseObject==line collect obj)
)

I am looking for a way to exclude the first part while keeping the result.
Any ideas on how to do this? Any help appreciated.

Is it possible to select all poly(s) in editable Mesh/Poly that belongs to certains IDs?

So the title maybe too short to actually make sense. So what I mean is:

- Problem: there's a high polygon object (attached from different small ones with different materials). I want to enter poly sub-mode (hotkey 4) select some poly(s) and having a script that select the rest of poly(s) that share the same ID(s) with selected ones I just picked. Multiple at once.

Example:

Syndicate content