PythonProject
ActivePublic

Members

  • This project does not have any members.

Details

Description

Python API for scripting and console editor.

Module Owner: @Campbell Barton (campbellbarton)

Recent Activity

Yesterday

Sam Brubaker (rocketman) added a comment to T55991: When switching scenes using "-S" argument in command line, scripts called by "--python-text" do not get correct scene context.

Thank you @Bastien Montagne (mont29) . I did discover a workaround which was to wrap the script in a function that is appended to the app handlers. Consider the following script:

Mon, Jul 16, 7:09 PM · Python, BF Blender
Bastien Montagne (mont29) assigned T55991: When switching scenes using "-S" argument in command line, scripts called by "--python-text" do not get correct scene context to Campbell Barton (campbellbarton).

Took me some time to understand what is happening here… thing is, we do some backup/sanitizing of context before executing py scripts, and among other things, arg_py_context_backup calls CTX_wm_window_set, which sets again context's Scene from active windows' screen scene…

Mon, Jul 16, 5:52 PM · Python, BF Blender
Philipp Oeser (lichtwerk) closed T55527: Quaternion() returning "Quaternion((0.0, 0.0, 0.0, 0.0))" Instead of Quaternion((1.0, 0.0, 0.0, 0.0)) as Resolved by committing rB96b4e43e8dcd: Fix T55527: creating a Quaternion without args should result in identity….
Mon, Jul 16, 3:15 PM · Python, BF Blender
Sam Brubaker (rocketman) created T55991: When switching scenes using "-S" argument in command line, scripts called by "--python-text" do not get correct scene context.
Mon, Jul 16, 7:40 AM · Python, BF Blender

Fri, Jul 13

codemanx created T55964: Direction not normalized in isect_ray_aabb_v3_simple()?.
Fri, Jul 13, 3:08 PM · Python, BF Blender

Thu, Jul 12

Campbell Barton (campbellbarton) updated the task description for T47811: Blender 2.8x / Python, Proposed Changes.
Thu, Jul 12, 8:37 AM · BF Blender: 2.8, Python
Campbell Barton (campbellbarton) updated the task description for T47811: Blender 2.8x / Python, Proposed Changes.
Thu, Jul 12, 8:37 AM · BF Blender: 2.8, Python

Wed, Jul 11

Amir (Warrior) added a comment to T54461: Unable to export/import EXR files after doing `import bpy` and when using the multiprocessing in Python (Blender freezes).

I hope this will have some higher priority soon :)

Wed, Jul 11, 3:48 PM · Python, Nodes, Cycles, BF Blender
Amir (Warrior) added a comment to T54561: Import order matters: segmentation fault if PyTorch is imported before bpy.

This issue still persists ...

Wed, Jul 11, 3:47 PM · Python, BF Blender
Jasper van Nieuwenhuizen (jasperge) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

+1 for Python 3.7. Because type hinting will also be introduced for add-ons PEP 563: Postponed Evaluation of Annotations will be a nice improvement.
And it's kind of funny (okay, to be honest, mainly rather annoying) that the whole vfx and animation industry is still stuck on Python 2.7 and Blender will lead the way with Python 3.7...

Wed, Jul 11, 11:12 AM · BF Blender: 2.8, Python
Jared Webber (lvxejay) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

+1 for Python 3.7. Now would definitely be a good time.

Wed, Jul 11, 6:44 AM · BF Blender: 2.8, Python

Tue, Jul 10

Brecht Van Lommel (brecht) closed T55883: Python : Cannot Access "bone.roll" property as Archived.

You need .edit_bones instead of .bones to get an EditBone.

Tue, Jul 10, 11:30 AM · Python, BF Blender
Félix (Miadim) created T55883: Python : Cannot Access "bone.roll" property.
Tue, Jul 10, 11:28 AM · Python, BF Blender
Jacques Lucke (JacquesLucke) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Python 3.7 is released: https://docs.python.org/3/whatsnew/3.7.html

Tue, Jul 10, 10:37 AM · BF Blender: 2.8, Python

Sun, Jul 8

hudson barkley (snuq) added a comment to T55807: Python - in an operator, setting scene frame after undo causes playback cursor to get 'stuck'.

As a side note, I have seen this happen before from some other cause, but it was one of those unreproducable 'what the heck just happened??' moments...
So, it is entirely possible that other combinations of commands may cause this, but Blender was most definitely set to av-sync mode in that situation.

Sun, Jul 8, 2:23 AM · Python, BF Blender

Sat, Jul 7

hudson barkley (snuq) created T55807: Python - in an operator, setting scene frame after undo causes playback cursor to get 'stuck'.
Sat, Jul 7, 4:57 AM · Python, BF Blender

Thu, Jul 5

Andrey B (befzz) created T55778: Cannot link object via bpy.context.collection.objects.link() after manual Delete operator invocation (*).
Thu, Jul 5, 6:31 PM · Python, BF Blender: 2.8
nBurn (nBurn) renamed T55495: BMesh vert indexes are incorrect after using view selected from MeasureIt vert indexes change in debug mode when using view selected to BMesh vert indexes are incorrect after using view selected.
Thu, Jul 5, 2:57 PM · Addons, Python
Campbell Barton (campbellbarton) added a comment to T55495: BMesh vert indexes are incorrect after using view selected.

Re-opened, since it is a bug in the add-on.

Thu, Jul 5, 2:30 PM · Addons, Python
Campbell Barton (campbellbarton) reopened T55495: BMesh vert indexes are incorrect after using view selected as "Open".
Thu, Jul 5, 2:30 PM · Addons, Python
Campbell Barton (campbellbarton) closed T55495: BMesh vert indexes are incorrect after using view selected as Invalid.

If you want indices to be correct, use bm.verts.index_update(), closing.

Thu, Jul 5, 2:25 PM · Addons, Python
Campbell Barton (campbellbarton) edited projects for T55495: BMesh vert indexes are incorrect after using view selected, added: BF Blender; removed Addons.
Thu, Jul 5, 2:21 PM · Addons, Python

Sat, Jun 23

Stanislas Paillereau (stanp) added a watcher for Python: Stanislas Paillereau (stanp).
Sat, Jun 23, 3:27 AM

Wed, Jun 20

nBurn (nBurn) triaged T55495: BMesh vert indexes are incorrect after using view selected as Normal priority.
Wed, Jun 20, 8:46 AM · Addons, Python
nBurn (nBurn) raised the priority of T55495: BMesh vert indexes are incorrect after using view selected from Normal to Needs Triage.

Which Blender release did you use? I just tried 0a8af46 from builder.blender.org (blender-2.79-0a8af46-win64) and am still able to reproduce this bug. I updated the "steps to reproduce" and added an "Additional details" section to the description with some more info.

Wed, Jun 20, 8:43 AM · Addons, Python
nBurn (nBurn) updated the task description for T55495: BMesh vert indexes are incorrect after using view selected.
Wed, Jun 20, 8:39 AM · Addons, Python
nBurn (nBurn) updated the task description for T55495: BMesh vert indexes are incorrect after using view selected.
Wed, Jun 20, 8:33 AM · Addons, Python
nBurn (nBurn) updated the task description for T55495: BMesh vert indexes are incorrect after using view selected.
Wed, Jun 20, 8:27 AM · Addons, Python

Tue, Jun 19

Philipp Oeser (lichtwerk) triaged T55495: BMesh vert indexes are incorrect after using view selected as Normal priority.
Tue, Jun 19, 4:16 PM · Addons, Python
Vuk Gardašević (lijenstina) closed T55532: Python : Add Baking Callback as Archived.

Hi, while we love to hear these ideas, this is not the right place for them. This website is mainly used to track bug reports and not feature requests. But luckily, there are some other nice solutions you can take, so please use one of the other forms of communication listed below:

Tue, Jun 19, 1:37 PM · Addons, Python, BF Blender
Félix (Miadim) added projects to T55532: Python : Add Baking Callback: Python, Addons.
Tue, Jun 19, 1:33 PM · Addons, Python, BF Blender
Philipp Oeser (lichtwerk) assigned T55527: Quaternion() returning "Quaternion((0.0, 0.0, 0.0, 0.0))" Instead of Quaternion((1.0, 0.0, 0.0, 0.0)) to Campbell Barton (campbellbarton).

Thanx for spotting this.
Made a differential in D3487

Tue, Jun 19, 10:02 AM · Python, BF Blender

Mon, Jun 18

Andrey B (befzz) created T55527: Quaternion() returning "Quaternion((0.0, 0.0, 0.0, 0.0))" Instead of Quaternion((1.0, 0.0, 0.0, 0.0)).
Mon, Jun 18, 10:00 PM · Python, BF Blender
Philipp Oeser (lichtwerk) added a comment to T55495: BMesh vert indexes are incorrect after using view selected.

havent hunted down the related commit, but this seems to be resolved in master?

Mon, Jun 18, 2:06 PM · Addons, Python

Sun, Jun 17

Sergey Sharybin (sergey) accepted D1862: Proof of concept restricted Python evaluation (using bytecode evaluation).

Very important code style feedback ;)

Sun, Jun 17, 7:04 PM · Python
Campbell Barton (campbellbarton) updated the diff for D1862: Proof of concept restricted Python evaluation (using bytecode evaluation).

Update for latest master

Sun, Jun 17, 6:58 PM · Python

Jun 15 2018

nBurn (nBurn) updated the task description for T55495: BMesh vert indexes are incorrect after using view selected.
Jun 15 2018, 4:12 PM · Addons, Python
nBurn (nBurn) claimed T55495: BMesh vert indexes are incorrect after using view selected.
Jun 15 2018, 4:11 PM · Addons, Python
nBurn (nBurn) created T55495: BMesh vert indexes are incorrect after using view selected.
Jun 15 2018, 4:11 PM · Addons, Python
Kilon Alios (kilon) added a revision to T54272: Python API for Blender's internal image functions: D3480: [Blender Python Image API] Image Buffer duplicate.
Jun 15 2018, 11:52 AM · BF Blender, Python

Jun 9 2018

Campbell Barton (campbellbarton) reopened T54272: Python API for Blender's internal image functions as "Open".
Jun 9 2018, 11:46 AM · BF Blender, Python
Campbell Barton (campbellbarton) updated the task description for T54272: Python API for Blender's internal image functions.
Jun 9 2018, 11:46 AM · BF Blender, Python
Campbell Barton (campbellbarton) updated the task description for T54272: Python API for Blender's internal image functions.
Jun 9 2018, 11:45 AM · BF Blender, Python
Campbell Barton (campbellbarton) added a comment to T54272: Python API for Blender's internal image functions.

Correction, the API was only committed at a very basic level, so keep this open.

Jun 9 2018, 11:42 AM · BF Blender, Python
Vitor Balbio (vitorbalbio) added a comment to T47811: Blender 2.8x / Python, Proposed Changes.

Recently released Toonkit also relies on this function. Remove it without any replacement just make impossible to start porting it for blender 2.8.
Any news about it?

Jun 9 2018, 2:27 AM · BF Blender: 2.8, Python

Jun 7 2018

Campbell Barton (campbellbarton) closed T54272: Python API for Blender's internal image functions as Resolved.

Committed to master, closing.

Jun 7 2018, 8:06 AM · BF Blender, Python
Kilon Alios (kilon) placed T54272: Python API for Blender's internal image functions up for grabs.
Jun 7 2018, 2:07 AM · BF Blender, Python

Jun 4 2018

Bastien Montagne (mont29) closed T55260: load Text File with Python from GUI Button results in 0 User as Resolved by committing rB7277f8973b08: Fix T55260: load Text File with Python from GUI Button results in 0 User.
Jun 4 2018, 12:47 PM · Python, BF Blender
Bastien Montagne (mont29) added a comment to T55260: load Text File with Python from GUI Button results in 0 User.

Am not totally happy with it, but looks like operators creating new datablocks usually ensure they have one user, even if not actually used… Image opening one e.g., which can probably generate some usercount inconsistency in some cases. So guess we can do that unconditionally for text opening op too.

Jun 4 2018, 12:34 PM · Python, BF Blender

May 31 2018

Philipp Oeser (lichtwerk) assigned T55260: load Text File with Python from GUI Button results in 0 User to Bastien Montagne (mont29).

I think this has to do with commit rBa9163f7d222d, rB646aa40cf707 (which only ensured real user for doing it from the UI?).
Also see rB15eb83c8b375.
Doing this from python [via bpy.ops.text.open] would skip this step because SpaceText as well as PropertyPointerRNA are not set in this case.
Doing this from python [via bpy.data.texts.load] would also skip this.

May 31 2018, 11:21 AM · Python, BF Blender