Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Change falloff shape in a plain effector

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 364 Views
    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 Offline
      Helper
      last edited by

      On 28/04/2013 at 11:26, xxxxxxxx wrote:

      Hi everyone

      I am new in Phyton and I'm trying to change Falloff shape from infinity to linear in a plain effector but get the following error.

      AttributeError: parameter set failed

      When I change the weight slider it works fine

      What am I missing?
      Here is the code.

        
      def main() :  
         
        plain = c4d.BaseObject(1018643)  
        doc.InsertObject(plain)  
        plain[c4d.FALLOFF_STRENGTH] = 0 #<<<< this works fine  
        plain[c4d.FALLOFF_MODE] = 2   
          
      if __name__=='__main__':  
        main()  
      

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

        On 28/04/2013 at 11:50, xxxxxxxx wrote:

        each falloff type is a separate plugin/class. you have to pass the proper id.

        from ofalloff_panel.h

        #ifndef _Ofalloff_panel_H_
        #define _Ofalloff_panel_H_
          
        enum
        {
        	//Falloff mode ID's
        	FALLOFF_MODE_INFINITE		= 1019543,
        	FALLOFF_MODE_BOX				= 1019544,
        	FALLOFF_MODE_SPHERE			= 1019545,
        	FALLOFF_MODE_CYLINDER		= 1019546,
        	FALLOFF_MODE_LINEAR			= 1019547,
        	FALLOFF_MODE_SPLINE			= 1019548,
        	FALLOFF_MODE_CONE			= 1019549,
        	FALLOFF_MODE_TORUS			= 1019550,
          
        	//Falloff controls
        	FALLOFF_GROUPFALLOFF		= 5100,
        	FALLOFF_MODE						=	5105,
        	FALLOFF_INVERT					=	5113,
        	FALLOFF_VISIBLE					=	5115
        };
        #endif
        

        so it would be plain[c4d.FALLOFF_MODE] = c4d.FALLOFF_MODE_SPHERE or something like
        that.

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

          On 28/04/2013 at 12:39, xxxxxxxx wrote:

          Thank you very much!

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