Adapt to changes in master, fixes all compile errors
This commit is contained in:
parent
58d32e8185
commit
01f9ac24ed
|
@ -12,8 +12,8 @@
|
|||
#include "AS_asset_library.hh"
|
||||
#include "AS_asset_representation.hh"
|
||||
|
||||
#include "BKE_asset_library_custom.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_preferences.h"
|
||||
|
||||
#include "BLI_fileops.h"
|
||||
#include "BLI_path_util.h"
|
||||
|
@ -68,8 +68,8 @@ bool AS_asset_library_has_any_unsaved_catalogs()
|
|||
std::string AS_asset_library_find_suitable_root_path_from_path(
|
||||
const blender::StringRefNull input_path)
|
||||
{
|
||||
if (bUserAssetLibrary *preferences_lib = BKE_preferences_asset_library_containing_path(
|
||||
&U, input_path.c_str())) {
|
||||
if (CustomAssetLibraryDefinition *preferences_lib = BKE_asset_library_custom_containing_path(
|
||||
&U.asset_libraries, input_path.c_str())) {
|
||||
return preferences_lib->path;
|
||||
}
|
||||
|
||||
|
@ -243,15 +243,17 @@ Vector<AssetLibraryReference> all_valid_asset_library_refs()
|
|||
{
|
||||
Vector<AssetLibraryReference> result;
|
||||
int i;
|
||||
LISTBASE_FOREACH_INDEX (const bUserAssetLibrary *, asset_library, &U.asset_libraries, i) {
|
||||
LISTBASE_FOREACH_INDEX (
|
||||
const CustomAssetLibraryDefinition *, asset_library, &U.asset_libraries, i) {
|
||||
if (!BLI_is_dir(asset_library->path)) {
|
||||
continue;
|
||||
}
|
||||
AssetLibraryReference library_ref{};
|
||||
library_ref.custom_library_index = i;
|
||||
library_ref.type = ASSET_LIBRARY_CUSTOM;
|
||||
library_ref.type = ASSET_LIBRARY_CUSTOM_FROM_PREFERENCES;
|
||||
result.append(library_ref);
|
||||
}
|
||||
/* TODO project libraries */
|
||||
|
||||
AssetLibraryReference library_ref{};
|
||||
library_ref.custom_library_index = -1;
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
* \ingroup asset_system
|
||||
*/
|
||||
|
||||
#include "BKE_asset_library_custom.h"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_preferences.h"
|
||||
|
||||
#include "BLI_string_ref.hh"
|
||||
|
||||
|
@ -67,14 +67,15 @@ AssetLibrary *AssetLibraryService::get_asset_library(
|
|||
|
||||
return get_asset_library_on_disk(root_path);
|
||||
}
|
||||
if (library_reference.type == ASSET_LIBRARY_CUSTOM) {
|
||||
bUserAssetLibrary *user_library = BKE_preferences_asset_library_find_from_index(
|
||||
&U, library_reference.custom_library_index);
|
||||
if (library_reference.type == ASSET_LIBRARY_CUSTOM_FROM_PREFERENCES) {
|
||||
CustomAssetLibraryDefinition *user_library = BKE_asset_library_custom_find_from_index(
|
||||
&U.asset_libraries, library_reference.custom_library_index);
|
||||
|
||||
if (user_library) {
|
||||
return get_asset_library_on_disk(user_library->path);
|
||||
}
|
||||
}
|
||||
/* TODO project libraries */
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -939,9 +939,9 @@ SpaceProjectSettings *CTX_wm_space_project_settings(const bContext *C)
|
|||
{
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
if (area && area->spacetype == SPACE_PROJECT_SETTINGS) {
|
||||
return area->spacedata.first;
|
||||
return static_cast<SpaceProjectSettings *>(area->spacedata.first);
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "BKE_asset_library_custom.h"
|
||||
#include "BKE_blender_project.h"
|
||||
#include "BKE_context.h"
|
||||
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_utility_mixins.hh"
|
||||
|
||||
#include "DNA_space_types.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "AS_asset_library.h"
|
||||
#include "AS_asset_library.hh"
|
||||
|
||||
#include "BKE_blender_project.hh"
|
||||
#include "BKE_asset_library_custom.h"
|
||||
#include "BKE_bpath.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_lib_id.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "BKE_report.h"
|
||||
|
||||
#include "BLI_path_util.h"
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "DNA_space_types.h"
|
||||
|
@ -76,7 +77,7 @@ static int new_project_exec(bContext *C, wmOperator *op)
|
|||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
static int new_project_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
|
||||
static int new_project_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
|
||||
{
|
||||
const Main *bmain = CTX_data_main(C);
|
||||
const char *blendfile_path = BKE_main_blendfile_path(bmain);
|
||||
|
@ -123,7 +124,7 @@ static void PROJECT_OT_new(wmOperatorType *ot)
|
|||
/** \name Write Project Settings Operator
|
||||
* \{ */
|
||||
|
||||
static int save_settings_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
|
||||
static int save_settings_exec(bContext * /*C*/, wmOperator * /*op*/)
|
||||
{
|
||||
BlenderProject *active_project = CTX_wm_project();
|
||||
|
||||
|
@ -187,7 +188,7 @@ static void PROJECT_OT_delete_setup(wmOperatorType *ot)
|
|||
/** \name Add Custom Asset Library
|
||||
* \{ */
|
||||
|
||||
static int custom_asset_library_add_exec(bContext *UNUSED(C), wmOperator *op)
|
||||
static int custom_asset_library_add_exec(bContext * /*C*/, wmOperator *op)
|
||||
{
|
||||
BlenderProject *project = CTX_wm_project();
|
||||
|
||||
|
@ -213,9 +214,7 @@ static int custom_asset_library_add_exec(bContext *UNUSED(C), wmOperator *op)
|
|||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
static int custom_asset_library_add_invoke(bContext *C,
|
||||
wmOperator *op,
|
||||
const wmEvent *UNUSED(event))
|
||||
static int custom_asset_library_add_invoke(bContext *C, wmOperator *op, const wmEvent * /*event*/)
|
||||
{
|
||||
if (!RNA_struct_property_is_set(op->ptr, "directory")) {
|
||||
WM_event_add_fileselect(C, op);
|
||||
|
@ -253,7 +252,7 @@ static void PROJECT_OT_custom_asset_library_add(wmOperatorType *ot)
|
|||
/** \name Remove Custom Asset Library
|
||||
* \{ */
|
||||
|
||||
static int custom_asset_library_remove_exec(bContext *UNUSED(C), wmOperator *op)
|
||||
static int custom_asset_library_remove_exec(bContext * /*C*/, wmOperator *op)
|
||||
{
|
||||
const int index = RNA_int_get(op->ptr, "index");
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
using namespace blender;
|
||||
|
||||
static SpaceLink *project_settings_create(const ScrArea *area, const Scene *UNUSED(scene))
|
||||
static SpaceLink *project_settings_create(const ScrArea *area, const Scene * /*scene*/)
|
||||
{
|
||||
SpaceProjectSettings *project_settings_space = MEM_cnew<SpaceProjectSettings>(
|
||||
"project settings space");
|
||||
|
@ -68,11 +68,11 @@ static SpaceLink *project_settings_create(const ScrArea *area, const Scene *UNUS
|
|||
return reinterpret_cast<SpaceLink *>(project_settings_space);
|
||||
}
|
||||
|
||||
static void project_settings_free(SpaceLink *UNUSED(sl))
|
||||
static void project_settings_free(SpaceLink * /*sl*/)
|
||||
{
|
||||
}
|
||||
|
||||
static void project_settings_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(area))
|
||||
static void project_settings_init(wmWindowManager * /*wm*/, ScrArea * /*area*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ static void project_settings_operatortypes(void)
|
|||
{
|
||||
}
|
||||
|
||||
static void project_settings_keymap(struct wmKeyConfig *UNUSED(keyconf))
|
||||
static void project_settings_keymap(struct wmKeyConfig * /*keyconf*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -150,16 +150,16 @@ static void project_settings_main_region_layout(const bContext *C, ARegion *regi
|
|||
ED_region_panels_layout_ex(C, region, ®ion->type->paneltypes, contexts, NULL);
|
||||
}
|
||||
|
||||
static void project_settings_main_region_listener(const wmRegionListenerParams *UNUSED(params))
|
||||
static void project_settings_main_region_listener(const wmRegionListenerParams * /*params*/)
|
||||
{
|
||||
}
|
||||
|
||||
static void project_settings_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
|
||||
static void project_settings_header_region_init(wmWindowManager * /*wm*/, ARegion *region)
|
||||
{
|
||||
ED_region_header_init(region);
|
||||
}
|
||||
|
||||
static void project_settings_header_region_listener(const wmRegionListenerParams *UNUSED(params))
|
||||
static void project_settings_header_region_listener(const wmRegionListenerParams * /*params*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -176,8 +176,7 @@ static void project_settings_navigation_region_draw(const bContext *C, ARegion *
|
|||
ED_region_panels(C, region);
|
||||
}
|
||||
|
||||
static void project_settings_navigation_region_listener(
|
||||
const wmRegionListenerParams *UNUSED(params))
|
||||
static void project_settings_navigation_region_listener(const wmRegionListenerParams * /*params*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -188,7 +187,7 @@ static void project_settings_execute_region_init(wmWindowManager *wm, ARegion *r
|
|||
region->v2d.keepzoom |= V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y;
|
||||
}
|
||||
|
||||
static void project_settings_execute_region_listener(const wmRegionListenerParams *UNUSED(params))
|
||||
static void project_settings_execute_region_listener(const wmRegionListenerParams * /*params*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue