Select object by his properties
Hello,
Tell me how to select an object by its property?
I need to select objects with a specific property :
- display as box
- backface cull
- trajectory
- vertex tricks
It is required to select one property at a time.
I need several buttons, each of which will be bound to one property of the object.
Is it possible?
Thanks :-)
Comments
.
All those properties are common for all objects(geometry, shapes). So, if you have a script that will select all objects that have property display as box the script will select all objects. If you want to select only objects which property is ON then try this script:
Tools and Scripts for Autodesk 3dsMax
Hello Miauu
Please tell me how to fix the script - selecting an object by its property?
I need to ignore hidden objects when highlighting.
Thanks for your help!
.
Tools and Scripts for Autodesk 3dsMax
Thank you
I did differently:
----------
function SelectByProperty property: =
(
objsToSelArr = #()
for o in objects where (isProperty o property) and not o.isHiddenInVpt do
(
if (getProperty o property) == true do
append objsToSelArr o
)
select objsToSelArr
)
----------
Both options work.
Figured out
I solved the problem.
Excellent Thank you very
Excellent
Thank you very much!
Tell me, is animation an object property?
I assumed that with the help of the trajectory properties I could select all animated objects - I made a mistake.
Is it possible to select animated objects in a scene without adding trajectory properties?
.
fn isNodeAnimated node =
(
animated = off
object = node
if iskindof node SubAnim do
(
animated = (node.keys != undefined) and (node.keys.count > 0)
object = node.object
)
if iskindof object maxwrapper do for ca in object.custattributes while not animated do animated = isNodeAnimated ca
for k=1 to node.numsubs while not animated do animated = isNodeAnimated node[k]
animated
)
fn findAnimatedNodes nodes: =
(
if nodes == unsupplied do nodes = objects as array
for node in nodes where (isNodeAnimated node) collect node
)
fn findAnimatedTransformNodes nodes: =
(
if nodes == unsupplied do nodes = objects as array
for node in nodes where (isNodeAnimated node.controller) collect node
)
Tools and Scripts for Autodesk 3dsMax
Interesting
I do not understand how this script works.
Please explain how to highlight the animation in the scene.
.
Use the code below.
The findAnimatedTransformNodes checks if objects's controllers are animated.
The findAnimatedNodes check if the objcet itself is animated.
As the functions is called in the code all objects in the scene will be checked. If you want to check only certain object call the functions this way:
resArr = findAnimatedTransformNodes nodes:(selection as array)
Tools and Scripts for Autodesk 3dsMax
Thank you
Thank you very much!
I did not know how to add selection of objects to your solution.
Now everything works.