|
Blender V5.0
|
Inherits blender::NonCopyable, and blender::NonMovable.
Public Member Functions | |
| FileDescriptorRAII (const char *file_path) | |
| ~FileDescriptorRAII () | |
| bool | good () |
| int | get () |
This section intends to list the important steps for creating a thumbnail extension. qlgenerator has been deprecated and removed in platforms we support. App extensions are the way forward. But there's little guidance on how to do it outside Xcode.
The process of thumbnail generation goes something like this:
The Info.plist file should be properly configured with supported content type.
The plugin should be codesigned with entitlements at least for sandbox and read-only/ read-write (for access to the given file). It's needed to even run the plugin locally. com.apple.security.get-task-allow entitlement is required for debugging.
The plugin should be registered with lsregister. Either by calling lsregister or by launching the parent app. /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister \ -dump | grep blender-thumbnailer
Since read-only entitlement is there, creating files to log is not possible. So NSLog and viewing it in Console.app (after triggering a thumbnail) is the way to go. Interesting processes are: qlmanage, quicklookd, kernel, blender-thumbnailer, secinitd, com.apple.quicklook.ThumbnailsAgent
LLDB/ Xcode etc., debuggers can be used to get extra logs than CLI invocation but breakpoints still are a pain point. /usr/bin/qlmanage is the target executable. Other args to qlmanage follow. lldb qlmanage – -t -x a.blend
Definition at line 71 of file thumbnail_provider.mm.
|
inlineexplicit |
Definition at line 76 of file thumbnail_provider.mm.
References BLI_open(), and O_BINARY.
|
inline |
Definition at line 81 of file thumbnail_provider.mm.
References good().
|
inline |
Definition at line 96 of file thumbnail_provider.mm.
Referenced by generate_nsimage_for_file().
|
inline |
Definition at line 91 of file thumbnail_provider.mm.
Referenced by generate_nsimage_for_file(), and ~FileDescriptorRAII().