1. #1
    New Member Follow User Gallery
    Join Date
    Jan 2017
    Posts
    2

    Default Question, Problems with a Loop

    Hello everyone,

    I'm new to this from Zbrush and Zscript ... I have a question,

    How do I to within a macro with loop me ignore Subtools with a specific button activated for example Dynamesh or Dynamic Geometry?

    The loop works fine but it applies to all subtools ^^ "

    Thank you

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    Hi :)

    You can use the [IGet] command to query the state of many interface items. What info you get will depend on the item but for a switch like DynaMesh it will return 1 when it's on and 0 when it's off. So you then can use that in an [If.. statement like this (as an example, I am masking the whole of a subtool when DynaMesh is off):



    [IButton,DoAllSubTools,"Popup info about this button",
    [Loop,[SubToolGetCount],
    [SubToolSelect,[Var,n]]
    [If,[IExists,Tool:Geometry: Dynamesh],//check there is DynaMesh for this subtool
    [If,[IGet,Tool:Geometry:Dynamesh]==1,//if DynaMesh is ON
    //do nothing
    ,//else DynaMesh is OFF
    //do something
    [IPress,Tool:Masking:Mask All]
    ]//end if DynaMesh ON
    ]//end if DynaMesh exists
    ,n]//end loop
    ]//end button



    HTH,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •