diff options
author | Matheus Santos <MatheusSantos> | 2022-04-07 07:32:21 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-07 08:17:04 +0300 |
commit | f49a736ff4023231483c7e535ca2a7f2869d641d (patch) | |
tree | 506407e67e86034329fed5c71c49435a29ec2b31 /source/blender/python/intern/bpy_rna_text.h | |
parent | 7cd6bda206800218da47ee35c53066a71d25ef22 (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.h | 18 |
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 |