Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-05-24 17:47:48 +0300
committerJulian Eisel <julian@blender.org>2022-05-24 18:08:02 +0300
commit7b778166db4048b5109146bc073ab85fa49261f4 (patch)
tree8d95e63e4c3fd655ccc322c1fd8cda49b79465ce /source/blender/windowmanager/WM_api.h
parent25d216724bc195d25aaaf336ab1cd3e7c55d78bf (diff)
Cleanup: Use new helpers for passing IDs from drag & drop to operators
There are now some generalized helpers for passing IDs from drag & drop to operators via operator properties, mostly introduced in 917c096be6b9 and 8f79fa9c6780. These can be used in a bunch of places to reduce duplicated code and explicitly share a common solution. Side-effect: The "Name" property won't show up in the Adjust Last Operation anymore, and its value won't be remembered over multiple executions of the operator. Both were not at all useful from what I can tell, and I doubt this was done intentionally.
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 12cafbd7c64..1ed3174ee6f 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -789,6 +789,11 @@ struct ID *WM_operator_properties_id_lookup_from_name_or_session_uuid(struct Mai
PointerRNA *ptr,
enum ID_Type type);
/**
+ * Check if either the "session_uuid" or "name" property is set inside \a ptr. If this is the case
+ * the ID can be looked up by #WM_operator_properties_id_lookup_from_name_or_session_uuid().
+ */
+bool WM_operator_properties_id_lookup_is_set(PointerRNA *ptr);
+/**
* Adds "name" and "session_uuid" properties so the caller can tell the operator which ID to act
* on. See #WM_operator_properties_id_lookup_from_name_or_session_uuid(). Both properties will be
* hidden in the UI and not be saved over consecutive operator calls.