Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Random Rotate 180º

    Plugin Requests
    0
    4
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 07/11/2016 at 11:13, xxxxxxxx wrote:

      Hi, would you anyone be able to do a plugin that activates Tools>Arrange Objects>Randomize and rotates 180º on the Y axis? I do this all the time, so it would be great to have a one click solution. thanks!
       
      Greg

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 08/11/2016 at 12:31, xxxxxxxx wrote:

        Hi Greg,
        This can be done with a simple script.

        Put this code in the script manager and save it. Then drag the python icon to someplace in your UI.
        Every time you click it. The tool will execute and rotate the active object

        import c4d  
        def main() :      
            
          c4d.CallCommand(c4d.ID_MODELING_RANDOMIZE_TOOL)  
          tool = c4d.plugins.FindPlugin(c4d.ID_MODELING_RANDOMIZE_TOOL, c4d.PLUGINTYPE_TOOL)  
          if tool is not None:  
              rotY = c4d.utils.Rad(180)  
              tool[c4d.MDATA_RANDOMIZE_ROTATE] = c4d.Vector(0, rotY, 0)  
              c4d.CallButton(tool, c4d.MDATA_NEWTRANSFORM)  
                
          c4d.EventAdd()              
          
        if __name__=='__main__':  
          main()
        

        -ScottA

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 08/11/2016 at 20:37, xxxxxxxx wrote:

          You are awesome! Thank you ScottA!

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 09/11/2016 at 08:29, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            Hi Greg,
            This can be done with a simple script.

            wow
            thats awesome
            thank you, incredibly useful

            1 Reply Last reply Reply Quote 0
            • First post
              Last post