Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. akramFex
    A

    akramFex

    @akramFex

    1
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    akramFex Follow

    Best posts made by akramFex

    RE: Toggle Only select Visible element.

    I figured it out, it was a simple take but for a newbie like me, it was difficult.

    Code :

    c4d.CallCommand(200000084)
    
    tool = doc.GetActiveToolData()
    tool[c4d.MDATA_SELECTION_VISIBLE] = not tool[c4d.MDATA_SELECTION_VISIBLE]
    
    
    c4d.CallCommand(200000083)
    
    tool = doc.GetActiveToolData()
    tool[c4d.MDATA_SELECTLIVE_VISIBLE] = not tool[c4d.MDATA_SELECTLIVE_VISIBLE]
    

    Thank you, everyone.

    posted in Cinema 4D SDK •

    Latest posts made by akramFex

    RE: Toggle Only select Visible element.

    I figured it out, it was a simple take but for a newbie like me, it was difficult.

    Code :

    c4d.CallCommand(200000084)
    
    tool = doc.GetActiveToolData()
    tool[c4d.MDATA_SELECTION_VISIBLE] = not tool[c4d.MDATA_SELECTION_VISIBLE]
    
    
    c4d.CallCommand(200000083)
    
    tool = doc.GetActiveToolData()
    tool[c4d.MDATA_SELECTLIVE_VISIBLE] = not tool[c4d.MDATA_SELECTLIVE_VISIBLE]
    

    Thank you, everyone.

    posted in Cinema 4D SDK •
    Toggle Only select Visible element.

    Hello i wanted to toggle off and on the ‘Select only Visible elements’ and i know that there is an already build in shortcut for that on cinema, but it only toggles the tool you have active, i want it to toggle the lasso tool (Toggle Only select Visible element on it and the live selection tool in the same time ).while still being on the live selection tool so i came up with this script, this one does toggle only the active tool but i couldn’t make the jump to lasso tool and activate/deactivate there and then come back to live tool, really appreciate some guidance!

    def main():
    
        
        tool = doc.GetActiveToolData()
        c4d.CallCommand(200000083) #Liveselection
        tool[c4d.MDATA_SELECTLIVE_VISIBLE] = not tool[c4d.MDATA_SELECTLIVE_VISIBLE] #Toggle Visible Selection
        
        c4d.CallCommand(200000084) #Lassoselection
        tool[c4d.MDATA_SELECTION_VISIBLE] = not tool[c4d.MDATA_SELECTION_VISIBLE] #Toggle Visible Selection
        
        c4d.CallCommand(200000083) #LiveselectionAgain
        doc.EndUndo()
    
        c4d.EventAdd()
    # Execute main()
    if __name__=='__main__':
        main()
    

    I'm using S24.

    posted in Cinema 4D SDK •