SOLVED Hide "Camera Dependent" from PriorityData

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

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.

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