[Bf-extensions-cvs] [4fe390b6] blender-v2.83-release: BlenderKit: block clipboard reading on linux
Vilém Duha
noreply at git.blender.org
Thu May 7 14:30:56 CEST 2020
Commit: 4fe390b6bad2807f604656752f122861fd26efc1
Author: Vilém Duha
Date: Thu May 7 14:30:48 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBA4fe390b6bad2807f604656752f122861fd26efc1
BlenderKit: block clipboard reading on linux
This was causing T73507
===================================================================
M blenderkit/search.py
===================================================================
diff --git a/blenderkit/search.py b/blenderkit/search.py
index 641b1548..8406e47d 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -55,7 +55,7 @@ from bpy.types import (
import requests, os, random
import time
import threading
-import tempfile
+import platform
import json
import bpy
@@ -133,19 +133,20 @@ last_clipboard = ''
def check_clipboard():
# clipboard monitoring to search assets from web
- global last_clipboard
- if bpy.context.window_manager.clipboard != last_clipboard:
- last_clipboard = bpy.context.window_manager.clipboard
- instr = 'asset_base_id:'
- # first check if contains asset id, then asset type
- if last_clipboard[:len(instr)] == instr:
- atstr = 'asset_type:'
- ati = last_clipboard.find(atstr)
- # this only checks if the asset_type keyword is there but let's the keywords update function do the parsing.
- if ati > -1:
- search_props = utils.get_search_props()
- search_props.search_keywords = last_clipboard
- # don't run search after this - assigning to keywords runs the search_update function.
+ if platform.system() != 'Linux':
+ global last_clipboard
+ if bpy.context.window_manager.clipboard != last_clipboard:
+ last_clipboard = bpy.context.window_manager.clipboard
+ instr = 'asset_base_id:'
+ # first check if contains asset id, then asset type
+ if last_clipboard[:len(instr)] == instr:
+ atstr = 'asset_type:'
+ ati = last_clipboard.find(atstr)
+ # this only checks if the asset_type keyword is there but let's the keywords update function do the parsing.
+ if ati > -1:
+ search_props = utils.get_search_props()
+ search_props.search_keywords = last_clipboard
+ # don't run search after this - assigning to keywords runs the search_update function.
# @bpy.app.handlers.persistent
More information about the Bf-extensions-cvs
mailing list