From 9b099c86123fc828a194c59ce5b8bbf5a56f9cdb Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 5 Jun 2020 10:41:03 -0400 Subject: UI: Drag and Drop Modifiers, Layout Updates This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498 --- source/blender/modifiers/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/modifiers/CMakeLists.txt') diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index 8ab7d35070b..78db7de2ac2 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -23,12 +23,15 @@ set(INC intern ../blenfont ../blenkernel + ../blentranslation ../blenlib ../bmesh ../depsgraph + ../editors/include ../makesdna ../makesrna ../render/extern/include + ../windowmanager ../../../intern/eigen ../../../intern/guardedalloc ) @@ -89,6 +92,7 @@ set(SRC intern/MOD_surface.c intern/MOD_surfacedeform.c intern/MOD_triangulate.c + intern/MOD_ui_common.c intern/MOD_util.c intern/MOD_uvproject.c intern/MOD_uvwarp.c @@ -105,6 +109,7 @@ set(SRC MOD_modifiertypes.h intern/MOD_meshcache_util.h intern/MOD_solidify_util.h + intern/MOD_ui_common.h intern/MOD_util.h intern/MOD_weightvg_util.h ) @@ -157,6 +162,11 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +# To disable adaptive subdivision test in subsurf UI without cycles +if(WITH_CYCLES) + add_definitions(-DWITH_CYCLES) +endif() + # So we can have special tricks in modifier system. add_definitions(${GL_DEFINITIONS}) -- cgit v1.2.3