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
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Hide "Camera Dependent" from PriorityData

    Cinema 4D SDK
    python
    2
    3
    483
    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.
    • orestiskonO
      orestiskon
      last edited by orestiskon

      Hello,

      I'm making a plugin object with Priority options and have a couple of questions about PriorityData.

      1. How can we hide the "Camera Dependent" option? I tried guessing the flag unsuccessfully. 😕
        Example objects without "Camera Dependent" option are the Hair object and the Skin deformer.

      2. How can we set the default value for such a parameter? I tried using the following code in the Init function but didn't work:

      basePriority = c4d.PriorityData()
      priority.SetPriorityValue(c4d.PRIORITYVALUE_MODE, c4d.CYCLE_EXPRESSION)
      priority.SetPriorityValue(c4d.PRIORITYVALUE_PRIORITY, 400)
      
      node[res.BASE_PRIORITY] = priority
      

      Thanks for any assistance

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @orestiskon this can be done with the NOCAMERA option, see PRIORITY.
        PRIORITY TEST_PRIORITY_VALUE {NOCAMERA;};

        And in my case I did set within the Init the next code and it's working as expected.

                priority = c4d.PriorityData()
                priority.SetPriorityValue(c4d.PRIORITYVALUE_MODE, c4d.CYCLE_EXPRESSION)
                priority.SetPriorityValue(c4d.PRIORITYVALUE_PRIORITY, 200)
                node[TEST_PRIORITY_VALUE] = priority
        

        The only difference with your code is that you are using priority but you created basePriority, I guess it's a copy error but if not, then I would need your entire code since I can't reproduce your issue.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • orestiskonO
          orestiskon
          last edited by

          Thanks Maxime,
          "NOCAMERA;" worked, and the priority was a typo, now it does work!

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