PythonProject
ActivePublic

Members

  • This project does not have any members.
Description

Python API for scripting and console editor.

Module Owner: @Campbell Barton (campbellbarton)

Recent Activity

Yesterday

Bastien Montagne (mont29) closed T50754: EnumProperty displays errors with special characters as "Archived".

Arg… spent an hour on this before realizing this is good old known issue, see warning in enum prop doc

Thu, Feb 23, 2:32 PM · Addons, Python, BF Blender
Vincent Girès (VincentG) added a comment to T50756: Wrong layout alignment.

Oh sorry for the bad report!
And thank you for the answer :)

Thu, Feb 23, 10:52 AM · User Interface, Python, BF Blender
Bastien Montagne (mont29) closed T50756: Wrong layout alignment as "Invalid".

There is indeed no bug here, as @Alexandr Zinovev (raa) already explained.

Thu, Feb 23, 9:07 AM · User Interface, Python, BF Blender
Alexandr Zinovev (raa) added a comment to T50756: Wrong layout alignment.

UILayout.row is not enough in this case. You have to use UILayout.split:

Thu, Feb 23, 8:00 AM · User Interface, Python, BF Blender

Wed, Feb 22

Aaron Carlisle (Blendify) assigned T50756: Wrong layout alignment to Alexandr Zinovev (raa).
Wed, Feb 22, 6:50 PM · User Interface, Python, BF Blender
Vincent Girès (VincentG) created T50756: Wrong layout alignment.
Wed, Feb 22, 6:42 PM · User Interface, Python, BF Blender
Vincent Girès (VincentG) created T50754: EnumProperty displays errors with special characters.
Wed, Feb 22, 3:27 PM · Addons, Python, BF Blender
Germano Cavalcante (mano-wii) closed T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends as "Invalid".

I took a quick look at your script and... this is not a bug.
You are changing the quaternion rotation of an object expecting its matrix to be automatically updated within the script.

Wed, Feb 22, 2:24 AM · Python
Valera Barashkov (valera) added a comment to T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.

Your case worked because the objects already exist in the scene, I assume. If the objects already exist overalp() works for me as well as demonstrated in testing_intersect.py

Wed, Feb 22, 1:47 AM · Python
Germano Cavalcante (mano-wii) added a comment to T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.

I've tested your script and it seems to be working...
I also tested this script with rotated objects:

Wed, Feb 22, 12:34 AM · Python

Mon, Feb 20

Valera Barashkov (valera) added a comment to T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.

It is not practical to analyze possible errors in scripts that do not come with blender, you need to be more specific with the problem.

Germano, please see the .blend files, scripts are included and test scene is setup with extra instructions.

Mon, Feb 20, 11:15 PM · Python
Alexandr Zinovev (raa) added a comment to D2453: Add "undo_history" property to bpy.context.

I am not convinced at all we should expose such things. Those are fully internal guts and exposing them must not be done as-is. I'm also not convinced with the reasoning you gave. There are following issues:

  • Global undo might be disabled, which will make your addon depending on the history to work unreliably depending on user settings and current mode.
  • If it happens so certain steps are cleared from undo history your addon will stop behaving correctly.
  • If you're mixing edits in multiple objects behavior of your addon will become unpredictable.
  • The claim about being faster to access undo history than doing scene update hook and checking is_updated flag is quite wrong. With is_updated flag you know what exactly changed, while otherwise you'll need to iterate over objects to see changes.
  • Undo should be fully hidden implementation which just works for users. If we ever change something here it'll break all the scripts which relies on particular behavior of undo.

    There must be solution for your original problem which does not involve dependency of internal stuff and which will behave predictable and reliably in all cases.
Mon, Feb 20, 5:34 PM · Python, BF Blender
dima glib (dairin0d) added a comment to D2453: Add "undo_history" property to bpy.context.

Those are fully internal guts

Er... Can something that is clearly accessible to the user (Ctrl+Alt+Z) be considered "fully internal"? The basic logic behind proposals like these is that if users are able to see and/or manipulate some part of the program's state, it's reasonable to expect that it should be accessible to the scripts too.

Mon, Feb 20, 5:00 PM · Python, BF Blender
Germano Cavalcante (mano-wii) added a comment to T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.

Mathutils.BVHTree does not take into account the matrix when creating a bvhtree. It is as if bvhtree were using the local coordinates of the object.
That's why in raycasts or nearest, the ray or point need to be transformed with the inverse matrix.
For overlap you need to create the BVHTree with the object coordinates already transformed.
It is not practical to analyze possible errors in scripts that do not come with blender, you need to be more specific with the problem.
You can ask questions in the blenderartists.org forum to make sure it is a bug.

Mon, Feb 20, 1:56 PM · Python
Sergey Sharybin (sergey) requested changes to D2453: Add "undo_history" property to bpy.context.

I am not convinced at all we should expose such things. Those are fully internal guts and exposing them must not be done as-is. I'm also not convinced with the reasoning you gave. There are following issues:

Mon, Feb 20, 10:51 AM · Python, BF Blender
Bastien Montagne (mont29) closed T50702: EnumProperty cannot be accessed like data['property_name'] as "Invalid".

There is no bug at all here, you are confusing to completely different things:

  1. Properties define using bpy.props are “real” RNA properties, they behave like built-in native properties of RNA structures. It changes the definition of the class itself, since it’s available in all its instances.
  2. Properties defined/accessed with the 'dict' interface are IDProperties (a.k.a. Custom Properties), only usable with some limited type of data (IDs mostly, plus a few other ones like Bone). It only affects an instance of the RNA class, others won't have it.
Mon, Feb 20, 10:05 AM · Python, BF Blender

Sun, Feb 19

Valera Barashkov (valera) removed a project from T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends: BF Blender.
Sun, Feb 19, 4:10 PM · Python
Valera Barashkov (valera) edited the description of T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.
Sun, Feb 19, 2:53 PM · Python
Valera Barashkov (valera) created T50721: BVH overlap() failing to detect intersection due to bmesh rotation not updating until script ends.
Sun, Feb 19, 3:20 AM · Python

Fri, Feb 17

Alexandr Zinovev (raa) added a comment to D2475: Show 'X' icon to clear value of text button.

A more acceptable approach would be having this as option to UILayout.prop. Something like layout.prop(..., show_value_clear=True).

I don't like this idea. The flag should be defined on property level.
@Julian Eisel (Severin), what if we add X button when string property has not empty default value?

Fri, Feb 17, 6:47 PM · Python
Julien DUROURE (julien) added a project to T50702: EnumProperty cannot be accessed like data['property_name']: Python.
Fri, Feb 17, 3:27 PM · Python, BF Blender
Vuk Gardašević (lijenstina) added a project to T50703: numpy crashes on latest linux buildbot: Python.
Fri, Feb 17, 1:12 PM · Python, BF Blender

Fri, Feb 10

Julian Eisel (Severin) resigned from D2453: Add "undo_history" property to bpy.context.

This is not really my area, so resigning my self from reviewers.

Fri, Feb 10, 4:35 PM · Python, BF Blender

Thu, Feb 9

Antonio Vazquez (antoniov) added a comment to T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06).

Anyone with MacOS to run a test?

Thu, Feb 9, 4:51 PM · Addons
Antonio Vazquez (antoniov) added a comment to T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06).

I have tested in last build (Hash: b16fd22) in Windows 10 64 bits and I was unable to reproduce.

Thu, Feb 9, 4:50 PM · Addons
Antonio Vazquez (antoniov) added a comment to T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06).

I have tested and works fine in last official build: 2.78b Hash: 3c04373

Thu, Feb 9, 3:48 PM · Addons
Joey Ferwerda (TheOnlyJoey) assigned T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06) to Antonio Vazquez (antoniov).
Thu, Feb 9, 3:42 PM · Addons
Aaron Carlisle (Blendify) removed a project from T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06): BF Blender.
Thu, Feb 9, 2:17 PM · Addons
Zhang Bo-Ning (Barbarbarbarian) created T50632: Add-on Archimesh Broke in Recent Built (2.78.4, 2017-02-06).
Thu, Feb 9, 1:11 PM · Addons

Sat, Feb 4

Germano Cavalcante (mano-wii) closed T50592: scene.ray_cast() return nothing as "Resolved" by committing rB47caf343c0ac: fix T50592: Scene.raycast not working.
Sat, Feb 4, 10:23 PM · Python, BF Blender
Bastien Montagne (mont29) added a comment to T50592: scene.ray_cast() return nothing.

Already fixed the crash due to NULL access in rBa2c469edc2d, btw.

Sat, Feb 4, 10:14 PM · Python, BF Blender
Bastien Montagne (mont29) triaged T50592: scene.ray_cast() return nothing as "Normal" priority.

@Germano Cavalcante (mano-wii) looks like something went wrong in snap code?

Sat, Feb 4, 10:13 PM · Python, BF Blender
Germano Cavalcante (mano-wii) claimed T50592: scene.ray_cast() return nothing.

Indeed, there are some code problems in Blender involving NULL variables being freed and arguments not used :\
I only saw now that sergey tried to warn here 62f2c44ffb60
I will fix now

Sat, Feb 4, 9:57 PM · Python, BF Blender
Cédric (Clarkx) created T50592: scene.ray_cast() return nothing.
Sat, Feb 4, 7:20 PM · Python, BF Blender

Thu, Feb 2

Bastien Montagne (mont29) closed T50077: Confusing output of bpy.utils.user_resource as "Invalid".

I don’t understand what is the issue here? This user_resource function just returns canonical paths where to store some kind of data, for the current user. That’s all. Path does not have to exists (function can even create it if required), and Blender is not supposed to use it (or not), this is hint for user (scripts/add-ons typically) to know where to put there own stuff.

Thu, Feb 2, 1:07 PM · Python, BF Blender
Aaron Carlisle (Blendify) assigned T50049: Object remains in phantom mode between edit and object to Bastien Montagne (mont29).
Thu, Feb 2, 7:10 AM · Python, BF Blender
Aaron Carlisle (Blendify) triaged T50077: Confusing output of bpy.utils.user_resource as "Confirmed" priority.

Something is defiantly off here. It is returning paths that do not exist

Thu, Feb 2, 5:54 AM · Python, BF Blender
Aaron Carlisle (Blendify) assigned T50077: Confusing output of bpy.utils.user_resource to Bastien Montagne (mont29).
Thu, Feb 2, 5:52 AM · Python, BF Blender

Wed, Jan 25

Sergey Sharybin (sergey) closed T50308: RenderEngine - use of python threads with sleep(0)/wait(0) crash as "Archived".

Here is some conclusion here:

Wed, Jan 25, 3:11 PM · Python, BF Blender

Jan 24 2017

Julian Eisel (Severin) requested changes to D2475: Show 'X' icon to clear value of text button.

I'm absolutely against adding a PROP_VALUE_CLEAR RNA property flag if there's no 'real' need for it. Thing is we just split the flags apart so we get some free bits again eventually (rB440d104279811). We have to be quite strict to not end up with zero free bits within a short time again.
A more acceptable approach would be having this as option to UILayout.prop. Something like layout.prop(..., show_value_clear=True). It would only affect text buttons for now, but that would be okay-ish.
However, even for that I'd like to see a use-case where it would make sense to have this. Cause I don't see a point in exposing options that aren't really needed. That's also why I didn't do it in the first place. I wanted to see if there's a reasonable need for script authors to have this, before adding.

Jan 24 2017, 10:59 PM · Python
Alexandr Zinovev (raa) created D2475: Show 'X' icon to clear value of text button.
Jan 24 2017, 1:29 AM · Python

Jan 23 2017

Niklas (blenderCMB) added a comment to T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.

Thanks, I checked it with the latest builds and it works.

Jan 23 2017, 1:12 PM · Python, Platform: Linux, Addons

Jan 22 2017

Cédric (Clarkx) created T50497: Python : prop_search not correctly drew in UI.
Jan 22 2017, 12:05 PM · User Interface, BF Blender

Jan 21 2017

Kerim Borchaev (warkid) added a comment to T50308: RenderEngine - use of python threads with sleep(0)/wait(0) crash.

Seems like ANY python thread might crash when RENDERED is being turned off. In my test I've simply added an operator that spawns a thread. Not using a renderengine callback(callbacks are empty). It crashes.
addon_thread_from_operator_crashes_on_rendered_off.7z Just execute the 'Test Start Thread' operator and start pressing Shift-Z(using Test engine or Blender doesn't matter) - it crashes after a few iterations.

Jan 21 2017, 10:00 PM · Python, BF Blender
Joey Ferwerda (TheOnlyJoey) added a comment to T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.

Fix is commited, please check the buildbot soon to check if it solved your case.

Jan 21 2017, 7:08 PM · Python, Platform: Linux, Addons
Joey Ferwerda (TheOnlyJoey) closed T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock' as "Resolved" by committing rBA8c7a77ab5c8f: Fix T50475: Fixed using netrender with SSL, did not pass all arguments for….
Jan 21 2017, 7:05 PM · Python, Platform: Linux, Addons

Jan 20 2017

Niklas (blenderCMB) added a comment to T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.

Thanks in advance for fixing it.

Jan 20 2017, 9:20 AM · Python, Platform: Linux, Addons

Jan 19 2017

Joey Ferwerda (TheOnlyJoey) claimed T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.

Though netrender is currently unmaintained and removed for 2.8, this seems to be a simple fix.

Jan 19 2017, 5:49 PM · Python, Platform: Linux, Addons
Joey Ferwerda (TheOnlyJoey) added a comment to T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.
Jan 19 2017, 4:10 PM · Python, Platform: Linux, Addons
Niklas (blenderCMB) created T50475: NetworkRender and SSL -> wrap_socket() missing 1 required positional argument: 'sock'.
Jan 19 2017, 3:20 PM · Python, Platform: Linux, Addons