Page MenuHome

Cycles cull option ui problem
Closed, ResolvedPublic

Description

System Information
ubuntu 16.04, 630gt

Blender Version
Broken: master 0a446d7

Short description of error

if the option "use camera cull" is active in the simplify panel the per object (use camera cull) setting is grayed out and if the "use distance cull" is active both per object options are active

that would work https://hastebin.com/odoyelozej.vbs

Event Timeline

Joey Ferwerda (TheOnlyJoey) triaged this task as Confirmed, Medium priority.Jan 19 2017, 5:55 PM

The behavior of .active with rows that share the same parent can be an issue that can show up elsewhere in the UI, so adding user interface tag too.

If it is an expected behavior, it probably needs documenting the proper usage in this case.
Possibly .disabled acts similarly too.

I don't see how this is an underlying issue with the layout engine. Using a .active or .disabled tag, assigned to a certain layout block will affect all of its assigned properties. So using two different UI blocks is a proper fix.

Will commit a fix based on Ronnys suggestion.

I don't see how this is an underlying issue with the layout engine. Using a .active or .disabled tag, assigned to a certain layout block will affect all of its assigned properties. So using two different UI blocks is a proper fix.
Will commit a fix based on Ronnys suggestion.

I do understand but:

  1. It's not documented in the Python Docs
  2. .alert behaves differently (it's capable of marking individual entries of children)
  3. complicates generated code - especially for operators aligned in a row (for instance, something similar to thing in development_icons_get.py add-on)

To show the point this is the modified code from D2464.

Using alert:

for i in range(1, strip_channel):
    if (i % BT_ROW) == 1:
        row = col.row(align=True)

    row.alert = True if i == strip.multicam_source else False
    row.operator("sequencer.cut_multicam", text="%d" % i).camera = i

Workarond for .active:

for i in range(1, strip_channel):
    if (i % BT_ROW) == 1:
        row = col.row(align=True)

    # Workaround - .active has to have a separate UI block to work
    if i == strip.multicam_source:
        sub = row.row(align=True)
        sub.active = True
        sub.operator("sequencer.cut_multicam", text="%d" % i).camera = i
    else:
        sub_1 = row.row(align=True)
        sub_1.active = False
        sub_1.operator("sequencer.cut_multicam", text="%d" % i).camera = i

Anyway, this could be a Topic for 2.8 and it is probably outside of the scope of this task.