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/intern
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/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index 96f711bb237..71c948dfbb9 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -262,6 +262,12 @@ ID *WM_operator_properties_id_lookup_from_name_or_session_uuid(Main *bmain,
return NULL;
}
+bool WM_operator_properties_id_lookup_is_set(PointerRNA *ptr)
+{
+ return RNA_struct_property_is_set(ptr, "session_uuid") ||
+ RNA_struct_property_is_set(ptr, "name");
+}
+
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
{
PropertyRNA *prop;