Disabling Python in Blender - testers needed

Hi,

today i finished a patch to enable/disable Python in Blender. It also give you options to enable/disable specific features per file (such as PyConstraints, PyNodes, PyDrivers, …).

I uploaded to Graphicall two buildings with some test files. However I think that would be nice if you could help me testing it against your scripts. (Specially PyConstraints which I’m not so familiar with).

Here is the Patch:
https://projects.blender.org/tracker/?func=detail&aid=17701&group_id=9&atid=127

Here are the buildings:
Linux 64 bits - http://graphicall.org/builds/builds/showbuild.php?action=show&id=831
Windows - http://graphicall.org/builds/builds/showbuild.php?action=show&id=830

I also would like your opinion about this feature.

Have a great day :slight_smile:
Dalai

Pyconstraints are disabled ok, though I’d force a redraw. Right now you don’t see the effect of disabling/enabling them in the 3d view. Here’s an example file… (just move the root bone around and rotate it).

http://alienhelpdesk.com/pages/pivot_constraint/PivotConstraintExample.blend

I’m really not sure whether I’m in favour of this stuff… I like having things that just work…

Thanks a lot Macouno.

I had tested PyConstraint with objects, but not with bones.

Apparently there is one more check that I need to do. Right now the PyConstraint is running (if you put a print “test”) in the first line of the script you will see.

I will fix it. Thanks for the example file.

I like having things that just work…

Things that were working before will not change, UNLESS you block Python.
That way you can disable PyNodes when you don’t want to see this and work on other stuffs. And then enable it again.

It is also about security. To help you opening “untrusted” files.

I hope the binaries help us to discuss this topic.(64 downloads so far, this is great)
It works as a prof of concept too.

I updated the patch (not the binaries though).

Now is blocking and redrawing the PyConstraint.
https://projects.blender.org/tracker/index.php?func=detail&aid=17701&group_id=9&atid=127

I’m wondering if the high number of downloads is due the NoPython or the SmoothStroke patch that I put together …

@dfelinto: I like the security minded approach a lot: Python has a huge potential for turning Blender in a major hazard (see my current thread on network rendering within Blender http://blenderartists.org/forum/showthread.php?t=137181 as a case in point, my scripts basically open up Blender for anybody who wants to connect :slight_smile:

@macouno: your point is quite valid too: having things not ‘just working’ may cause many headaches when trying to find out what’s wrong exactly. Therefor I think a simple switch (python/nopython) is preferable to having many individual switches for different parts of Blender that use python, but thats just my’view.

@varkenvarken: thanks for your opinion :slight_smile:
This patch started after I “released” some scripts to send emails from Blender, and then I was alerted for the flaws of security in Blender.
I think this is something to think about …

Anyways, I updated Graphicall builds:

Windows build - http://www.graphicall.org/builds/builds/showbuild.php?action=show&id=830
Linux build - http://www.graphicall.org/builds/builds/showbuild.php?action=show&id=831

Now I have two menu options, tell what you think that work better.
And please leave here your comment (anyone, everyone :D)

Cheers,
Dalai

dfelinto: But then maybe it would be more interesting to think about it as “security issues with python”… not blender. From what I heard it’s quite hard to “sandbox” python… so maybe we should poke the py devs… not the blender devs…

That said… there’s been lots of discussion amongst the coders about this already and I think I ought to defer to them on this :wink: