Page MenuHome

PythonProject
ActivePublic

Members

  • This project does not have any members.

Watchers (10)

Details

Description

Python API for scripting and console editor.

Module Owner: @Campbell Barton (campbellbarton)

Recent Activity

Yesterday

Peter Fog (tintwotin) added a comment to D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .

@Campbell Barton (campbellbarton) For some TE API suggestions Kaio/Iceythe writes:

Tue, Jun 25, 9:52 PM · BF Blender, Python, Text Editor

Mon, Jun 24

nBurn (nBurn) added a comment to D5119: Possible fix for T65824.

This would re-introduce the issue from T60777.
For this to work we'll need to add a new flag to detect 'Repeat Last', since this is a special case, unlike adjusting-the-last-operator repeat, the context may be different each time and we can't rely on property SKIP_SAVE not to store values for re-use.

Mon, Jun 24, 11:14 PM · Python, Mesh Modeling
Peter Fog (tintwotin) updated subscribers of D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .
Mon, Jun 24, 8:30 PM · BF Blender, Python, Text Editor
Peter Fog (tintwotin) added a comment to D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .

So the first step is to locate bugs and shortcomings of the TE API?

Mon, Jun 24, 5:28 PM · BF Blender, Python, Text Editor
Campbell Barton (campbellbarton) added a comment to D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .

If my memory serves me correct, working directly on the selection was not reliable, which made me use the clipboard instead.

Mon, Jun 24, 3:06 PM · BF Blender, Python, Text Editor
Peter Fog (tintwotin) added a comment to D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .

If my memory serves me correct, working directly on the selection was not reliable, which made me use the clipboard instead.

Mon, Jun 24, 2:58 PM · BF Blender, Python, Text Editor
D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor now requires changes to proceed.

Using the clipboard for text tools is a hack which could interfear with the users workflow (they could have some rich text in the clipboard - unrelated to using Blender, which gets overwritten by using this tool).

Mon, Jun 24, 2:28 PM · BF Blender, Python, Text Editor
Campbell Barton (campbellbarton) added a comment to D5119: Possible fix for T65824.

Committed alternate fix rB1c94030238bb37918c4cd3256e0acb0b7099579d

Mon, Jun 24, 1:45 PM · Python, Mesh Modeling
Campbell Barton (campbellbarton) closed T65824: The span keyword in mesh.fill_grid is not working in 2.80 as Resolved by committing rB1c94030238bb: Fix T65824: Span property ignored in mesh.fill_grid.
Mon, Jun 24, 1:44 PM · Python, BF Blender
Campbell Barton (campbellbarton) added a comment to D5119: Possible fix for T65824.

This would re-introduce the issue from T60777.

Mon, Jun 24, 1:37 PM · Python, Mesh Modeling
Peter Fog (tintwotin) updated subscribers of D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .
Mon, Jun 24, 7:29 AM · BF Blender, Python, Text Editor

Sun, Jun 23

William Reynish (billreynish) added a comment to D5125: New context menus added to the sidebar and menu updates in the Text Editor.

Closing this, since it's just an update to D5028. Best to keep these changes together in the same differential revision.

Sun, Jun 23, 12:52 AM · Python, Text Editor

Sat, Jun 22

D5125: New context menus added to the sidebar and menu updates in the Text Editor is now accepted and ready to land.
Sat, Jun 22, 11:52 PM · Python, Text Editor
Peter Fog (tintwotin) updated the summary of D5125: New context menus added to the sidebar and menu updates in the Text Editor.
Sat, Jun 22, 11:32 PM · Python, Text Editor
Peter Fog (tintwotin) created D5125: New context menus added to the sidebar and menu updates in the Text Editor.
Sat, Jun 22, 11:28 PM · Python, Text Editor
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:31 AM · Python, Mesh Modeling
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:22 AM · Python, Mesh Modeling
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:17 AM · Python, Mesh Modeling
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:16 AM · Python, Mesh Modeling
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:16 AM · Python, Mesh Modeling
nBurn (nBurn) updated the summary of D5119: Possible fix for T65824.
Sat, Jun 22, 9:15 AM · Python, Mesh Modeling
nBurn (nBurn) added a revision to T65824: The span keyword in mesh.fill_grid is not working in 2.80: D5119: Possible fix for T65824.
Sat, Jun 22, 9:12 AM · Python, BF Blender
nBurn (nBurn) created D5119: Possible fix for T65824.
Sat, Jun 22, 9:12 AM · Python, Mesh Modeling
nBurn (nBurn) updated the task description for T65824: The span keyword in mesh.fill_grid is not working in 2.80.
Sat, Jun 22, 8:32 AM · Python, BF Blender

Fri, Jun 21

Jacques Lucke (JacquesLucke) added a comment to T65909: API: bpy.ops.text.cut +bpy.ops.text.paste will fail when undo..
__GI_raise(int sig) (/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c:51)
__GI_abort() (/build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:79)
BKE_undosys_step_push_init_with_type(UndoStack * ustack, bContext * C, const char * name, const UndoType * ut) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/undo_system.c:458)
ED_text_undo_push_init(bContext * C) (/home/jacques/blender-git/blender/source/blender/editors/space_text/text_undo.c:234)
text_paste_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/space_text/text_ops.c:843)
wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const _Bool poll_only, _Bool use_last_properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1452)
wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const _Bool poll_only, wmEvent * event) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1687)
WM_operator_call_py(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties, ReportList * reports, const _Bool is_undo) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1787)
pyop_call(PyObject * UNUSED_self, PyObject * args) (/home/jacques/blender-git/blender/source/blender/python/intern/bpy_operator.c:267)
_PyMethodDef_RawFastCallKeywords (Unknown Source:0)
_PyCFunction_FastCallKeywords (Unknown Source:0)
_PyEval_EvalFrameDefault (Unknown Source:0)
__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval(PyFrameObject * __pyx_v_frame_obj, int __pyx_v_exc) (/io/ptvsd/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c:7206)
_PyEval_EvalCodeWithName (Unknown Source:0)
_PyFunction_FastCallDict (Unknown Source:0)
_PyObject_Call_Prepend (Unknown Source:0)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
_PyObject_FastCallKeywords (Unknown Source:0)
_PyEval_EvalFrameDefault (Unknown Source:0)
__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval(PyFrameObject * __pyx_v_frame_obj, int __pyx_v_exc) (/io/ptvsd/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c:7206)
_PyEval_EvalCodeWithName (Unknown Source:0)
PyEval_EvalCodeEx (Unknown Source:0)
PyEval_EvalCode (Unknown Source:0)
python_script_exec(bContext * C, const char * fn, struct Text * text, struct ReportList * reports, const _Bool do_jump) (/home/jacques/blender-git/blender/source/blender/python/intern/bpy_interface.c:476)
BPY_execute_text(bContext * C, struct Text * text, struct ReportList * reports, const _Bool do_jump) (/home/jacques/blender-git/blender/source/blender/python/intern/bpy_interface.c:569)
text_run_script(bContext * C, ReportList * reports) (/home/jacques/blender-git/blender/source/blender/editors/space_text/text_ops.c:708)
text_run_script_exec(bContext * C, wmOperator * op) (/home/jacques/blender-git/blender/source/blender/editors/space_text/text_ops.c:747)
wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const _Bool poll_only, _Bool use_last_properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1452)
wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const short context, const _Bool poll_only, wmEvent * event) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1653)
WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, short context, PointerRNA * properties) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1701)
ui_apply_but_funcs_after(bContext * C) (/home/jacques/blender-git/blender/source/blender/editors/interface/interface_handlers.c:806)
ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) (/home/jacques/blender-git/blender/source/blender/editors/interface/interface_handlers.c:10144)
wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:623)
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2701)
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2947)
wm_event_do_handlers(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:3309)
WM_main(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:417)
main(int argc, const char ** argv) (/home/jacques/blender-git/blender/source/creator/creator.c:500)
Fri, Jun 21, 5:48 PM · Python, BF Blender
Sebastian Parborg (zeddb) triaged T65909: API: bpy.ops.text.cut +bpy.ops.text.paste will fail when undo. as Confirmed, Medium priority.
Fri, Jun 21, 11:34 AM · Python, BF Blender
Peter Fog (tintwotin) assigned T65909: API: bpy.ops.text.cut +bpy.ops.text.paste will fail when undo. to Campbell Barton (campbellbarton).
Fri, Jun 21, 11:11 AM · Python, BF Blender
Peter Fog (tintwotin) added a reviewer for D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor : Campbell Barton (campbellbarton).
Fri, Jun 21, 10:36 AM · BF Blender, Python, Text Editor

Thu, Jun 20

nBurn (nBurn) updated the task description for T65824: The span keyword in mesh.fill_grid is not working in 2.80.
Thu, Jun 20, 8:51 PM · Python, BF Blender
Sebastian Parborg (zeddb) triaged T65824: The span keyword in mesh.fill_grid is not working in 2.80 as Confirmed, Medium priority.
Thu, Jun 20, 2:42 PM · Python, BF Blender
Peter Fog (tintwotin) added a project to D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor : BF Blender.
Thu, Jun 20, 7:43 AM · BF Blender, Python, Text Editor
Peter Fog (tintwotin) created D5097: Adding 'Trim Whitespaces', 'Split & Join Line' and 'Change Case' to Text Editor .
Thu, Jun 20, 6:55 AM · BF Blender, Python, Text Editor

Tue, Jun 18

Peter Fog (tintwotin) added a project to T65909: API: bpy.ops.text.cut +bpy.ops.text.paste will fail when undo.: Python.
Tue, Jun 18, 4:03 PM · Python, BF Blender

Mon, Jun 17

Kai Jægersen (kaio) added a comment to T65843: Text.current_character wrong value for certain characters.

Can confirm.
current_character and select_end_character are directly pointing to text DNA curc, selc (and these can indeed inherit the "error" of unicode characters having a differrent length that one...)
Guess this could be resolved by making a rna property func that takes these into account using txt_utf8_offset_to_index or BLI_str_utf8_size...
Can check [might take a bit though...]

Mon, Jun 17, 5:27 PM · Python, BF Blender
Philipp Oeser (lichtwerk) closed T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into account as Resolved by committing rB3b8a14a3c072: Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into….
Mon, Jun 17, 4:09 PM · Python, BF Blender
Philipp Oeser (lichtwerk) added a revision to T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into account: D5085: Fix T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into account.
Mon, Jun 17, 3:26 PM · Python, BF Blender
Philipp Oeser (lichtwerk) added a project to T65843: Text.current_character wrong value for certain characters: Python.
Mon, Jun 17, 1:59 PM · Python, BF Blender
Philipp Oeser (lichtwerk) added a project to T65863: Scripting: 'IndentationError' has no attribute 'msg': Python.
Mon, Jun 17, 1:58 PM · Python, BF Blender
Philipp Oeser (lichtwerk) claimed T65878: "Bpy.ops.object.camera_add" doesn't take the rotation argument into account.

Confirmed, checking...

Mon, Jun 17, 1:58 PM · Python, BF Blender
Philipp Oeser (lichtwerk) assigned T65681: Crash undoing a removal of a lattice via python to Campbell Barton (campbellbarton).
Mon, Jun 17, 9:29 AM · Python, BF Blender
kursad k (kursadk) added a comment to T65681: Crash undoing a removal of a lattice via python.

As far as I can tell the solution recommended by @Joseph Eagar (joeedh) works in this case. I will test it further but I was able to overcome the hard crashes I have been facing when ediitng the lattice in an operator.

Mon, Jun 17, 4:49 AM · Python, BF Blender

Sun, Jun 16

Joseph Eagar (joeedh) updated subscribers of T65681: Crash undoing a removal of a lattice via python.
Sun, Jun 16, 8:39 PM · Python, BF Blender
Joseph Eagar (joeedh) added a comment to T65681: Crash undoing a removal of a lattice via python.

Okay, looks like the problem is with the undo system; if you manually exit editmode then push the understack, e.g.:

Sun, Jun 16, 8:39 PM · Python, BF Blender
nBurn (nBurn) updated the task description for T65824: The span keyword in mesh.fill_grid is not working in 2.80.
Sun, Jun 16, 9:21 AM · Python, BF Blender
nBurn (nBurn) assigned T65824: The span keyword in mesh.fill_grid is not working in 2.80 to Campbell Barton (campbellbarton).
Sun, Jun 16, 9:17 AM · Python, BF Blender

Sat, Jun 15

nBurn (nBurn) updated the task description for T65824: The span keyword in mesh.fill_grid is not working in 2.80.
Sat, Jun 15, 4:42 AM · Python, BF Blender
nBurn (nBurn) updated the task description for T65824: The span keyword in mesh.fill_grid is not working in 2.80.
Sat, Jun 15, 2:54 AM · Python, BF Blender
nBurn (nBurn) added a project to T65824: The span keyword in mesh.fill_grid is not working in 2.80: Python.
Sat, Jun 15, 2:51 AM · Python, BF Blender

Fri, Jun 14

kursad k (kursadk) added a comment to T65681: Crash undoing a removal of a lattice via python.

It seems like this bug not just affecting undo delete but also it crashes Blender after undoing lattice naming and other Lattice objct related operations

Fri, Jun 14, 8:10 PM · Python, BF Blender

Tue, Jun 11

kursad k (kursadk) added a comment to T65681: Crash undoing a removal of a lattice via python.

Thanks for conforming the bug. Do you know a work around with the API so I can avoid the crash until this is fixed?

Tue, Jun 11, 4:20 PM · Python, BF Blender