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:
authorMatheus Santos <MatheusSantos>2022-04-07 07:32:21 +0300
committerCampbell Barton <campbell@blender.org>2022-04-07 08:17:04 +0300
commitf49a736ff4023231483c7e535ca2a7f2869d641d (patch)
tree506407e67e86034329fed5c71c49435a29ec2b31 /source/blender/python/intern/bpy_rna_text.h
parent7cd6bda206800218da47ee35c53066a71d25ef22 (diff)
Text Editor: Get/Set region text API
Add the ability to get/set the selected text. **Calling the new methods:** - `bpy.data.texts["Text"].region_as_string()` - `bpy.data.texts["Text"].region_from_string("Replacement")`
Diffstat (limited to 'source/blender/python/intern/bpy_rna_text.h')
-rw-r--r--source/blender/python/intern/bpy_rna_text.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna_text.h b/source/blender/python/intern/bpy_rna_text.h
new file mode 100644
index 00000000000..b3854b96886
--- /dev/null
+++ b/source/blender/python/intern/bpy_rna_text.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/** \file
+ * \ingroup pythonintern
+ */
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern PyMethodDef BPY_rna_region_as_string_method_def;
+extern PyMethodDef BPY_rna_region_from_string_method_def;
+
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file