Suport relative path option per-asset library #107345

Closed
Dalai Felinto wants to merge 3 commits from dfelinto/blender:relpath into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

This option is true by default, but it can be changed for
any asset library (that may be using Link as import method).

This option is true by default, but it can be changed for any asset library (that may be using Link as import method).
Dalai Felinto added the
Interest
Asset Browser
label 2023-04-25 19:46:27 +02:00
Julian Eisel was assigned by Dalai Felinto 2023-04-25 19:46:27 +02:00
Dalai Felinto added 1 commit 2023-04-25 19:46:34 +02:00
737a136a95 Suport relative path option per-asset library
This option is true by default, but it can be changed for
any asset library (that may be using Link as import method).
Dalai Felinto added this to the Pipeline, Assets & IO project 2023-04-25 19:46:55 +02:00
Author
Owner
cc @eyecandy
Julian Eisel requested changes 2023-04-25 19:55:09 +02:00
Julian Eisel left a comment
Member

The default needs to be set in userdef_default.c. Otherwise pretty much fine.

The default needs to be set in `userdef_default.c`. Otherwise pretty much fine.
@ -1491,6 +1491,8 @@ class USERPREF_PT_file_paths_asset_libraries(FilePathsPanel, Panel):
active_library = paths.asset_libraries[active_library_index]
layout.prop(active_library, "path")
layout.prop(active_library, "import_method", text="Import Method")
if active_library.import_method == 'LINK':
Member

Would just always show it, in case Append (Reuse Data) is used.

Would just always show it, in case _Append (Reuse Data)_ is used.
@ -25,6 +25,7 @@
#include "BKE_blendfile.h"
#include "BKE_context.h"
#include "BKE_main.h"
Member

To be removed.

To be removed.
@ -129,0 +129,4 @@
typedef enum eAssetLibrary_Flag {
ASSET_LIBRARY_RELATIVE_PATH = (1 << 0),
} eUserPref_bUserAssetLibrary_Flag;
Member

eAssetLibrary_Flag

`eAssetLibrary_Flag`
@ -594,3 +594,3 @@
short import_method; /* eAssetImportMethod */
char _pad0[6];
char flag; /* eAssetLibrary_Flag */
Member

short because we might run out of bits quickly (people add flags without checking the type, esp. for small enums).

`short` because we might run out of bits quickly (people add flags without checking the type, esp. for small enums).
Dalai Felinto added 1 commit 2023-04-25 20:14:33 +02:00
Dalai Felinto added 1 commit 2023-04-25 20:52:19 +02:00
Author
Owner

The default needs to be set in userdef_default.c. Otherwise pretty much fine.

As it turned out, asset libraries were not using defaults properly. So for example you could not reset their values to default.

It is all good now, so this patch also fixes that.

> The default needs to be set in userdef_default.c. Otherwise pretty much fine. As it turned out, asset libraries were not using defaults properly. So for example you could not reset their values to default. It is all good now, so this patch also fixes that.
Member

Committed with 5d0595fded.

Committed with 5d0595fded.
Julian Eisel closed this pull request 2023-04-26 21:07:40 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:44 +02:00
Bastien Montagne removed this from the Pipeline, Assets & IO project 2023-07-03 13:01:10 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107345
No description provided.