I think a really simple question. Writing a script that manipulates Max text objects - including changing the text. For error checking i need to be able to tell if the selected object is a text object. If it's a mesh object like Sphere001, or Plane001, the script will die as
$.text
is undefined for those object types.
I'm looking for a conditional test that i can wrap around all my text control commands.
if ($ is a text object) then
(
do all the text stuff
)
else
(
warn user to select text object
)
Thanks!
Comments (4)
Comment policy
to continue
other conditional tests:
You can also use unique text shape properties for checking like
obj = selection[1] -- define variable selection
if isProperty obj "kerning" do...
--or
if isProperty obj "leading" do...
--etc.
to collect all text "stuffs" ;)
Then open the listener to see the result
if classof $ == text then
or you can use
Thanks!
This forum is really a huge help to newbies. The Max Script docs are complete but there's so much detail. It's hard to know what to search for.
Thanks again - to both responders!