Follow up on mode engine code separation
The settings initialization belong within the engines
This commit is contained in:
parent
50fb3ea3de
commit
1ed20a692f
|
@ -30,6 +30,7 @@ set(INC
|
|||
../blenloader
|
||||
../blentranslation
|
||||
../depsgraph
|
||||
../draw
|
||||
../gpu
|
||||
../ikplugin
|
||||
../imbuf
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
#include "DNA_node_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "DRW_engine.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
/* prototype */
|
||||
|
@ -820,8 +822,7 @@ static void layer_collection_create_mode_settings_object(ListBase *lb)
|
|||
ces->type = COLLECTION_MODE_OBJECT;
|
||||
|
||||
/* properties */
|
||||
BKE_collection_engine_property_add_int(ces, "show_wire", false);
|
||||
BKE_collection_engine_property_add_int(ces, "show_backface_culling", false);
|
||||
OBJECT_collection_settings_create(ces);
|
||||
|
||||
BLI_addtail(lb, ces);
|
||||
}
|
||||
|
@ -835,7 +836,7 @@ static void layer_collection_create_mode_settings_edit(ListBase *lb)
|
|||
ces->type = COLLECTION_MODE_EDIT;
|
||||
|
||||
/* properties */
|
||||
BKE_collection_engine_property_add_int(ces, "show_occlude_wire", false);
|
||||
EDIT_collection_settings_create(ces);
|
||||
|
||||
BLI_addtail(lb, ces);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
//#define WITH_VIEWPORT_CACHE_TEST
|
||||
|
||||
struct CollectionEngineSettings;
|
||||
struct DRWPass;
|
||||
struct Material;
|
||||
struct Scene;
|
||||
|
@ -42,4 +43,8 @@ void DRW_pass_free(struct DRWPass *pass);
|
|||
void *DRW_material_settings_get(struct Material *ma, const char *engine_name);
|
||||
void *DRW_render_settings_get(struct Scene *scene, const char *engine_name);
|
||||
|
||||
#endif /* __DRW_ENGINE_H__ */
|
||||
/* Mode engines initialization */
|
||||
void OBJECT_collection_settings_create(struct CollectionEngineSettings *ces);
|
||||
void EDIT_collection_settings_create(struct CollectionEngineSettings *ces);
|
||||
|
||||
#endif /* __DRW_ENGINE_H__ */
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* \ingroup draw
|
||||
*/
|
||||
|
||||
#include "DRW_engine.h"
|
||||
#include "DRW_render.h"
|
||||
|
||||
#include "draw_mode_pass.h"
|
||||
|
@ -104,4 +105,10 @@ void EDIT_draw(void)
|
|||
DRW_draw_pass(psl->wire_outline_pass);
|
||||
DRW_draw_pass(psl->non_meshes_pass);
|
||||
DRW_draw_pass(psl->ob_center_pass);
|
||||
}
|
||||
}
|
||||
|
||||
void EDIT_collection_settings_create(CollectionEngineSettings *ces)
|
||||
{
|
||||
BLI_assert(ces);
|
||||
BKE_collection_engine_property_add_int(ces, "show_occlude_wire", false);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
#ifndef __EDIT_MODE_H__
|
||||
#define __EDIT_MODE_H__
|
||||
|
||||
struct Object;
|
||||
|
||||
void EDIT_cache_init(void);
|
||||
void EDIT_cache_populate(Object *ob);
|
||||
void EDIT_cache_populate(struct Object *ob);
|
||||
void EDIT_cache_finish(void);
|
||||
|
||||
void EDIT_draw(void);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* \ingroup draw
|
||||
*/
|
||||
|
||||
#include "DRW_engine.h"
|
||||
#include "DRW_render.h"
|
||||
|
||||
#include "draw_mode_pass.h"
|
||||
|
@ -88,4 +89,11 @@ void OBJECT_draw(void)
|
|||
DRW_draw_pass(psl->wire_outline_pass);
|
||||
DRW_draw_pass(psl->non_meshes_pass);
|
||||
DRW_draw_pass(psl->ob_center_pass);
|
||||
}
|
||||
}
|
||||
|
||||
void OBJECT_collection_settings_create(CollectionEngineSettings *ces)
|
||||
{
|
||||
BLI_assert(ces);
|
||||
BKE_collection_engine_property_add_int(ces, "show_wire", false);
|
||||
BKE_collection_engine_property_add_int(ces, "show_backface_culling", false);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,10 @@
|
|||
#ifndef __OBJECT_MODE_H__
|
||||
#define __OBJECT_MODE_H__
|
||||
|
||||
struct Object;
|
||||
|
||||
void OBJECT_cache_init(void);
|
||||
void OBJECT_cache_populate(Object *ob);
|
||||
void OBJECT_cache_populate(struct Object *ob);
|
||||
void OBJECT_cache_finish(void);
|
||||
|
||||
void OBJECT_draw(void);
|
||||
|
|
Loading…
Reference in New Issue