Age | Commit message (Collapse) | Author |
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
fix for [#6950] Blender crashes when .blog file top line is 160 characters or more
- made sure BLI_convertstringcode doesn't return more than 240 chars
- went through all callers and fixed places where string passed to BLI_convertstringcode was too short
- TODO: look into increasing sample->name and sound->name too, I prevented crashes, but filename might get shortened.
|
|
|
|
|
|
segfaults Blender
|
|
|
|
Geoffrey):
* no newline at end of file (2-3)
* uninitialised vars (1)
* unused vars (1-2)
* assigning/comparing pointers and ints (numerous)
* etc.
|
|
scripts running when you open a blend file.
Also scripts will re-run on undo rather then closing.
This is done by saving and loading the name of the script or textblock of the 'Script' datablock, connected to the ScriptSpace. This way when there is a name but the script dosnt run.
Blender runs the script or text block if available.
|
|
Another experiment to support threading properly. By default the Python Interpreter releases its lock every 100 instructions so that other threads get a chance to run Python code and API calls. But that is not enough to prevent race conditions causing artifacts (and maybe crashes) during threaded rendering, since all threads will access the same pynodes data.
So I'm disabling this automatic releasing of the lock (the GIL) by the interpreter, which seems to be a better option for how Blender uses Python.
|
|
Without them blender would crash when reloading scripts.
|
|
Small update to where a PyGILState_Ensure() call is made.
--
Let me use this commit to mention a couple things related to this change to make Python thread-safe in Blender:
1) This page explains the changes: http://wiki.blender.org/index.php/BlenderDev/BPythonAPI/Threads
2) If you experience hangs (deadlocks) when running anything related to Python in Blender, the related part in the code may need a proper Ensure/Release block, as explained in the above link.
From Joshua (aligorith)'s previous commit to this file:
"* various problems related to gilstate calls being added in strange places (could someone familiar with python double check that they're in the right places now)?"
I checked the two places you fixed, second one is ok, the first one needed to be before the call to create a py dict -- done. Thanks for catching them!
|
|
* missing include for depsgraph from previous commit
* various problems related to gilstate calls being added in strange places (could someone familiar with python double check that they're in the right places now)?
|
|
Submitted by: Thomas Knight (epat)
Parts committed:
1) Fixed a few misspellings in some error strings.
2) Fixed a (theoretical) bug with pyconstraints where a text object could be deleted from python but would remain linked
to the constraint it was assigned to - causing slight UI usage discontinuities!
Not committed yet:
3) Particle system bugfix in this patch has not been committed. Could jahka or brecht check this.
|
|
* Make PyNodes work with threaded renderer. This patch is by Willian. He has worked hard on getting this sorted out - now you should be able to render with PyNodes AND multiple threads.
|
|
A new file could have its Blender.Get("filename") return "<memory>" after undo'ing on an open file.
Fix for own error with python sys.path, messed up game engine.
|
|
Setting the user preference for python scripts didnt add the bpymodules subdirectory to sys.path (python module search path).
Also problems with entering and exiting- the old path was used until next restart.
|
|
Uncommented armature weakrefs stuff for PyConstraints. This should fix some erratic error messages a user found with these a few months ago.
|
|
|
|
|
|
Bugfix, Space Handlers could crash blender when used with armatures.
also fixed some possible bugs in other areas.
|
|
I've finally traced down the causes of several of the bugs which caused PyConstraints to work incorrectly (or not at all).
* Freeing is now done using BLI_freelistN inside the pycon_free function, instead of looping through the targets ourselves. This fixes all of those Memblock free: pointer not in list errors.
* BPY_pyconstraint_update now correctly creates/frees the constraint's targets as needed. Previously, it was creating/removing the wrong number of targets. Also, pyconstraints no longer get disabled when using armatures (not bones)
* The panel drawing was also not working right, as there were still some offset issues.
|
|
Once again, I've recoded the constraints system. This time, the goals were:
* To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes.
* To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target.
As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up.
Known issues:
* PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon.
* Constraints BPy-API is currently has a few features which currently don't work yet
* Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
|
|
bugs with pyconstraints, also added a missing decref from python (wasnt freeing the return value from the settings
button).
|
|
True whenever it was assigned in the
script
|
|
thanks for finding caedes!
this bug is in 2.45 but can work around by setting it manually
---
import sys as pysys
try:
pysys.modules['__main__'].__arm_weakrefs
except:
pysys.modules['__main__'].__arm_weakrefs = {}
---
changed how draw modes work - when displaying textured meshes in editmode, only draw selected edges when "Edge Draw" is not enabled. this makes it easy to see the texture/mapping without edges getting in the way.
This means editmode can draw like UV/Face mode did when "Draw Edges" was disabled.
Also made the active vert/edge/face color themeable, still need to set the default to somthing other then pink.
|
|
exit with an error rather then crashing.
|
|
https://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11653
I think this commit make it do what it was intended to, but Joshua should
recheck this ASAP.
|
|
I've added the ability for PyConstraints to define a function (doDriver) that is able to directly modify values of the owner/target, so that certain setups can be created reliably. Users should take note that this is against the basic concept of what a constraint does, and that under no circumstances may they set the values of any variables controlling the transforms. For more details, check out the information in the PyConstraint template script.
I've also updated PyConstraints to be aware of geometry targets. The script template has been updated with this information.
|
|
|
|
After just over a week of coding, I've finished doing a major refactor/cleanup of the constraints code. In the process, quite a few old kludges and ugly hacks have been removed. Also, some new features which will greatly benefit riggers have been implemented.
=== What's New ===
* The long-awaited ``ChildOf Constraint'':
This allows you to animate parent influences, and choose which transformation channels the parent affects the child on (i.e. no translation/rotation/scaling). It should be noted that disabling some combinations may not totally work as expected. Also, the 'Set Inverse' and 'Clear Inverse' buttons at the bottom of this constraint's panel set/clear the inverse correction for the parent's effects. Use these to make the owner not stick/be glued to the parent.
* Constraint/Target Evaluation Spaces:
In some constraints, there are now 1-2 combo boxes at the bottom of their panel, which allows you to pick which `co-ordinate space' they are evaluated in. This is much more flexible than the old 'local' options for bones only were.
* Action Constraint - Loc/Rot/Size Inputs
The Action Constraint can finally use the target's location/rotation/scaling transforms as input, to control the owner of the constraint. This should work much more reliably than it used to. The target evaluation should now also be more accurate due to the new space conversion stuff.
* Transform - No longer in Crazy Space (TM)
Transforming objects/bones with constraints applied should no longer occur in Crazy Space. They are now correctly inverse-corrected. This also applies to old-style object tracking.
=== General Code Changes ===
* solve_constraints is now in constraints.c. I've removed the old `blend consecutive constraints of same type' junk, which made the code more complex than it needed to be.
* evaluate_constraint is now only passed the constraint, and two matrices. A few unused variables have been removed from here.
* A tempolary struct, bConstraintOb, is now passed to solve_constraints instead of relying on an ugly, static workobject in some cases. This works much better.
* Made the formatting of constraint code consistent
* There's a version patch for older files so that constraint settings are correctly converted to the new system. This is currently done for MajorVersion <= 244, and SubVersion < 3. I've bumped up the subversion to 3 for this purpose. However, with the imminent 2.45 release, this may need to be adjusted accordingly.
* LocEulSizeToMat4 and LocQuatSizeToMat4 now work in the order Size, Rot, Location. I've also added a few other math functions.
* Mat4BlendMat4 is now in arithb. I've modified it's method slightly, to use other arithb functions, instead of its crazy blending scheme.
* Moved some of the RigidBodyJoint constraint's code out of blenkernel, and into src. It shouldn't be setting its target in its data initialisation function based + accessing scene stuff where it was doing so.
=== Future Work ===
* Geometry to act as targets for constraints. A space has been reserved for this already.
* Tidy up UI buttons of constraints
|
|
* Error print for getSettings was lacking a newline
* When adding a PyConstraint using Ctrl-Alt-C, the script is now queried to find out whether it uses a target.
|
|
At last! The ability to code constraints in Python. This opens up many interesting rigging possibilities, as well as making prototyping constraints easier.
* A PyConstraint script must begin with the line
#BPYCONSTRAINT
* It must also define a doConstraint function, which performs the core actions of the constraint.
* PyConstraints use IDProperties to store custom properties for each PyConstraint instance. The scripter can choose which of these ID-Properties to expose to a user to control the behaviour of the constraint. This must be done using the Draw.PupBlock method.
Credits to Joe Eager (joeedh) for coding the original patch on which this is based. I've made heavy revisions to large parts of the patch.
For more detailed information, and some demo scripts, see the following page:
http://aligorith.googlepages.com/pyconstraints2
|
|
setup_armature_weakrefs() wasnt't deallocating the old list, instead just adding a new one to the dictionary.
|
|
Data from Armature.c and logic.c still leaks.
Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing.
Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
|
|
moved bpy into bpy.data and bpy will be eventually replace the root level 'Blender' module.
currently we have bpy.library bpy.config and bpy.data
|
|
|
|
-Adding name "self" to the pydriver's dictionary, so that objects can be easily referenced in their own expressions. For example, the expression:
self.LocY
for the LocX channel of an object would force this object's location in X to be equal to its location in Y. As always, feedback welcomed.
|
|
some py versions are formated as major.minor.subversion.
Clean up some old comments.
|
|
* stopped bpy from importing automaticaly as decieded in the meeting.
* removed Blender.Main, since we agree it will be called bpy, renamed files also.
* updated epydocs from this and last commit.
* updated scripts to use bpy.*, and bugfix's for widgetwizard
|
|
----------
Roll back to previous version; didn't mean to commit changes with Py_GetVersion
just yet!
|
|
----------
Support for new bpy.libraries module, which is being proposed to replace
the Blender.Library module.
|
|
----------
Definition of default "bpy" module was decrementing reference count, which
caused assertion errors on Windows. This fixes the problem on Linux; Win
developers please test!
|
|
|
|
from gen_utils and BPY_interface
small cleanup, removed unused functions and explicetly cast pointers..
|
|
way to access blender data
gen_utils was missing some type checks that made assigning a objects DupGroup and meshes texcomesh not work.
|
|
ID_asPyObject(*id)
|
|
|
|
only work from some menu's.
|
|
- fix for #5955
- fixing too short pathnames causing memory overwriting when
starting blender from a path with a very long name.
|
|
Setup for Armature weak ref list was missing from some places where
we execute py code. This confused the interpreter and gave random
attribute/tuple parse errors.
Changed name of weak ref list to "__arm_weakrefs" to avoid name
collision with user variables.
|