improve animation panel
This commit is contained in:
@@ -214,10 +214,10 @@ void NodeCanvas::draw()
|
||||
auto layer_index = i;
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
{
|
||||
int onion_size = 1;
|
||||
int onion_size = App::I->animation->get_onion_size();
|
||||
int frame_current = m_canvas->m_layers[layer_index]->m_frame_index;
|
||||
int frame_start = glm::max<int>(frame_current - 1, 0);
|
||||
int frame_end = glm::min<int>(frame_current + 1, m_canvas->m_layers[layer_index]->m_frames.size() - 1);
|
||||
int frame_start = glm::max<int>(frame_current - onion_size, 0);
|
||||
int frame_end = glm::min<int>(frame_current + onion_size, m_canvas->m_layers[layer_index]->m_frames.size() - 1);
|
||||
bool faces = false;
|
||||
for (int frame = frame_start; frame <= frame_end; frame++)
|
||||
faces |= m_canvas->m_layers[layer_index]->face(plane_index, frame);
|
||||
|
||||
Reference in New Issue
Block a user