Commit Graph

4226 Commits

Author SHA1 Message Date
31e74d00c1 fix [#35691] Context Override replaces instead of overrides 2013-06-10 12:17:36 +00:00
412c043474 Python script auto-execution changes:
- script execution is off by default

- if a blend file attempts to execute a script
  this shows a message in the header with the action
  that was suppressed (script/driver/game-autostart) and 2 buttons to either reload the file trusted, or to ignore the message.

- the file selector will always default to use the trust setting in the user preferences,
  but reloading an open file will keep using the current setting (whatever was set before or set on the command-line).

- added SCons setting WITH_BF_PYTHON_SECURITY, this sets the default state for the user prefereces not to trust blend files on load.
  ... this option was in CMake before, but always off, now its enabled by default for SCons and CMake, and forced on in CMake for now.
2013-06-10 00:42:16 +00:00
e7a487d1e9 code cleanup: group python reset functions in BPY_python_reset() 2013-06-09 23:31:53 +00:00
dfad9b0c09 fix [#35555] Collada: export destroys mesh in some cases
add arguments to calculate normals when converting to bmesh:
  BM_mesh_bm_from_me, DM_to_bmesh

This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
2013-06-02 23:20:49 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
13bde6645b code cleanup: remove callbacks only added to wrap MEM_freeN 2013-05-21 08:45:10 +00:00
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
0fb5c9117f no need to add own define for openmp. 2013-05-20 14:38:43 +00:00
19f11fc783 Cmake / Fluids:
* Possible fix for Fluid threads UI not being shown with cmake builds.
2013-05-20 14:00:19 +00:00
88d1067f58 code cleanup: use BM_elem_flag_test rather then accessing 'ele->head.hflag' 2013-05-17 12:43:58 +00:00
04a9c0e28a bump mathutils callback slot size. 2013-05-17 07:10:40 +00:00
71775dc2a4 Fix another cases where painting long brush strokes with small radius was slowed
down, this time by the operator properties getting converted to a string for
display in the info window.

With 1000+ stroke points this can get slow, and takes up too much space anyway,
so now it's (somewhat arbitrarily) limited to printing only 10 points.
2013-05-15 14:37:01 +00:00
6fc51bf20e Moved main part of bpy.app.translations doc out of C code, as suggested by Campell, thx. 2013-05-14 18:16:37 +00:00
761850f377 API doc for bpy.app.translations should look better now. 2013-05-14 15:33:59 +00:00
c838b2d2a7 bmesh api: add 'is_boundary' attribute to verts. 2013-05-14 02:56:24 +00:00
3e1e76a2c1 Fix #35289: UV layout export to image was extremely slow for large meshes. This
was due to slow implementation of slice operation for things like mesh uv data.
Made that faster now for cases where the internal storage is an array.
2013-05-10 22:05:47 +00:00
c6702a3b91 use BM_face_create_ngon_verts for python api face creation
(avoid doing it inline).
2013-05-08 12:59:46 +00:00
a9fb183901 rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
was renamed fairly recently but other similar iterators not negated
	like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
0ffde4fae3 expose bmesh volume calculation to python api (use for print toolbox addon). 2013-05-07 00:00:32 +00:00
998b9241be correct bmesh api crossref and update uv-operator template. 2013-05-05 05:54:29 +00:00
4a8663d66e A bit more clear error message... 2013-05-02 14:03:56 +00:00
edd6327455 remove direct freestyle data access from bmesh, was crashing and this should really only be done via customdata layer support. 2013-04-30 22:27:52 +00:00
1edf56e7a5 fix [#35150] Crash when bmesh operation called from within a Panel draw()
accessing a bmesh from python would reallocate all customdata layers.

add an assert to BM_data_layer_free(), when its called unnecessarily since its reallocating all layers.
2013-04-29 20:21:19 +00:00
674d82d783 Fluid UI:
* Display Simulation threads only, when built with OpenMP.
2013-04-28 16:52:51 +00:00
5018ea5e29 real fix for [#35097], (curve cap flipping).
previous commit was incorrect, the face flipping depended on the orientation of the curve.

fix by passing the bevel direction to the fill function so we can have a reliable front/back.

This also gives some speedup for all curve filling since we can avoid calculating the normal since its already known.
2013-04-26 21:04:12 +00:00
245a175a00 fix [#34657] Smoothing will not be updated in object mode, when hiding faces in edit mode and changing shape.
remove the option to skip hidden faces in BM_mesh_normals_update, use openmp to speedup recalculation for high poly meshes.
2013-04-24 12:07:13 +00:00
03905043c6 minor changes to get numpy working with locally bundled python.
- enable site-packages for bundled python distrobution, py3.2 had a problem where it would try to parse headers we didnt include, but its resolved now.
- workaround for glitch I was having on arch-linux where lib64 would be be used for the bundled python directory when it was just a symlink.
2013-04-23 13:51:20 +00:00
5580b56876 Bugfix [#34836] Crash when driver variable has path == 'data'
Most of the places which relied on RNA_path_resolve() did so believing that if
it returned true, that it had found a valid property, and that the returned
pointer+property combination would be what the path referred to. However, it
turns out that if the property at the end of the path turns out to be a
"pointer" property (e.g. "data" for Object.data), this would automatically
become the pointer part, while the prop part would be set to null. Hence, if a
user accidentally (or otherwise) specifies a path for the single-property driver
variable type like this, then Blender would crash.

This commit introduces two convenience functions - RNA_path_resolve_property()
and RNA_path_resolve_property_full() - which mirror/wrap the existing
RNA_path_resolve() functions. The only difference though is that these include a
check to ensure that what was found from resolving the path was in fact a
property (they only return true iff this is the case), and make it explicitly
clear in the name that this is what they will do so that there's no further
confusion. It is possible to do without these wrapper functions by doing these
checks inline, but the few cases that had been patched already were pretty
hideous looking specimens. Using these just make it clearer and simpler for all.

I've also beefed up the docs on these a bit, and changed these to using bools.
2013-04-22 13:22:07 +00:00
c667f1ff10 utility function volume_tetrahedron(), for mathutils and BLI math. 2013-04-21 13:24:45 +00:00
a120049c3b use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions. 2013-04-16 09:04:34 +00:00
be71c46b24 code cleanup: minor BMESH_TODO's, some were left in even though they were done/invalid. 2013-04-15 04:34:14 +00:00
eb66c45301 correct pyapi function intersect_line_sphere_2d() using 3d vecs when only 2d are needed. 2013-04-14 11:57:35 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
742c1cb328 Related to #34558: clarify the description for the "default" parameter in bpy.props.EnumProperty. 2013-04-11 18:10:57 +00:00
c68ae745b6 interpolate verts as well as loops for inset.
- add vertex option to BM_face_interp_from_face, also expose via python.
2013-04-10 23:25:44 +00:00
2b2099cd51 Fix #34875: 0 digits of precision was not supported for FloatProperty, now
you can specify precision=0 for this, and use -1 for the default 2.
2013-04-08 18:55:08 +00:00
858ff6b696 Fix for [#34898] Typo in error message of mathutils.Vector
* Also fixed some more cases of "more then" -> "more than".
2013-04-07 15:09:06 +00:00
63d523336f freestyle lineset tag attribute was defined but not used, also some code cleanup. 2013-04-07 01:38:03 +00:00
acfc0ea511 svn merge ^/trunk/blender -r55815:55840 2013-04-06 13:24:34 +00:00
716ed32d90 fix [#34870] bmesh.ops.* parameter lists and descriptions don't show in PyConsole on auto-complete
more a feature request then a bug but nice to have __doc__ on bmesh operators.
2013-04-05 19:58:18 +00:00
79e58c31a0 add BM_face_calc_center_mean_weighted() gives much better result at cost of some speed. 2013-04-05 19:26:33 +00:00
93ac968db3 code cleanup: include order 2013-04-05 17:56:54 +00:00
89926a0598 svn merge ^/trunk/blender -r55776:55813 2013-04-05 15:42:31 +00:00
12981b0048 fix [#34881] Bad characters in error output (PyConsole) if trying to use a Bmesh UV Layer on a BMVert 2013-04-05 15:09:25 +00:00
98752a1f30 py api additions needed for fixing [#34864].
- add rna property 'as_bytes' method so you can get a string property as python bytes (bypass encoding).
- make bpy.path.abspath/relpath compatible with bytes.
- add 'relpath' option to bpy_extras.image_utils.load_image(), so you can load an image relative to a path.
2013-04-05 00:30:32 +00:00
5aee8b1487 py api, bmesh
- add BMEdge.calc_face_angle_signed() which gives a negative angle for for concave edges.
- add BMEdge.is_convex
2013-04-04 18:22:01 +00:00
83fff218cc svn merge ^/trunk/blender -r55700:55776 2013-04-04 13:37:07 +00:00
13ec0cd6c3 Fix #34856: crash passing an object rather than a mesh to bpy.data.mesh.remove(),
this should give an error message but it didn't.
2013-04-03 13:43:12 +00:00
4a0351cba2 Freestyle changes:
- Revert some stylistic changes made in branch
  They weren't directly related on freestyle project
  and better be handled in trunk. Helps reading patches
  ad prevents possible merge conflicts.

- Solved issue introduced with recent deprecation of
  RenderData.maximize,
2013-03-26 09:59:43 +00:00
18d2dd7e3a Merging r55547 through r55594 from trunk into soc-2008-mxcurioni 2013-03-26 09:09:31 +00:00