implement grid and heightmap with lambert shading
This commit is contained in:
@@ -123,11 +123,20 @@ void App::init_sidebar()
|
||||
stroke->create();
|
||||
stroke->loaded();
|
||||
|
||||
grid = std::make_shared<NodePanelGrid>();
|
||||
grid->m_manager = &layout;
|
||||
grid->init();
|
||||
grid->create();
|
||||
grid->loaded();
|
||||
auto grid_find = std::find_if(panels->m_children.begin(), panels->m_children.end(),
|
||||
[](const std::shared_ptr<Node>&p) { return (bool)std::dynamic_pointer_cast<NodePanelGrid>(p); });
|
||||
if (grid_find != panels->m_children.end())
|
||||
{
|
||||
grid = std::static_pointer_cast<NodePanelGrid>(*grid_find);
|
||||
}
|
||||
else
|
||||
{
|
||||
grid = std::make_shared<NodePanelGrid>();
|
||||
grid->m_manager = &layout;
|
||||
grid->init();
|
||||
grid->create();
|
||||
grid->loaded();
|
||||
}
|
||||
|
||||
presets = std::make_shared<NodePanelBrushPreset>();
|
||||
presets->m_manager = &layout;
|
||||
|
||||
Reference in New Issue
Block a user