Home Technical Talk

[Max Script] Edinting modifier in all objects in the scene.

Hello,
I try to edit a modifier's property present on a lot of geometry in my scene. Presently I can do that on 1 object selected, but not in all at once, sundently, my modifier become an "unknow property", why that ?

$.Skin.draw_vertices = false

? in all the .skin modifier you can find in the scene turn the draw vertice false. ?
I use that sort of cod for editing object properties in all the scene and have no problems. Someone could give me some light ?
Thanks ! : )

Replies

  • monster
    Options
    Offline / Send Message
    monster polycounter
    You need to create a script loop.
    for obj in selection do
    (
       obj.Skin.draw_vertices = false
    )
    
  • Blob
    Options
    Offline / Send Message
    So max need to see everyone one by one (even so if he do that himself). we don't need it for editing object properties but we need it to edit modifiers ? hum
  • monster
    Options
    Offline / Send Message
    monster polycounter
    Many object properties are mapped properties, so they can be run on a selection or array.

    However most modifiers are not mapped, so you need to loop through them.

    Look up "Mapped Functions" in the Maxscript Help document for a more thorough explanation.
  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    You can instance modifiers though, and operating on the instance might be what you are looking for?
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    as a hacky maxscript newb i'd probably try dissecting existing scripts that walk through your scene and toggle modifiers and adapt them to my needs. the soulburn scripts package has one that toggles all TS modifiers, for instance. Probably pretty much what monster said.
  • Blob
    Options
    Offline / Send Message
    hum nop I don't want instance them, I still want to be able to go back on each indivudally and do some change without to have to cut the instance.
    But what say Monster is what I was looking for, I was just surprised beacuse of the diferent"logic" to make a very similary thing (change on object properties VS change on Modifier). I still havn't read about the "Mapped Functions", there is certainly a very logical reason about this diference.
    (thanks all)
Sign In or Register to comment.