Brushstroke Tools: Initial Version #328
@ -34,7 +34,11 @@ def find_context_brushstrokes(dummy):
|
|||||||
idx = len(settings.context_brushstrokes)-1
|
idx = len(settings.context_brushstrokes)-1
|
||||||
if not settings.context_brushstrokes:
|
if not settings.context_brushstrokes:
|
||||||
return
|
return
|
||||||
if len_prev == len(settings.context_brushstrokes):
|
if context.object:
|
||||||
|
for i, bs in enumerate(settings.context_brushstrokes):
|
||||||
|
if bs.name == context.object.name:
|
||||||
|
settings.active_context_brushstrokes_index = i
|
||||||
|
elif len_prev == len(settings.context_brushstrokes):
|
||||||
settings.active_context_brushstrokes_index = idx
|
settings.active_context_brushstrokes_index = idx
|
||||||
|
|
||||||
settings.active_context_brushstrokes_index = max(min(settings.active_context_brushstrokes_index, len(settings.context_brushstrokes)-1), 0)
|
settings.active_context_brushstrokes_index = max(min(settings.active_context_brushstrokes_index, len(settings.context_brushstrokes)-1), 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user