Commit Graph

4302 Commits

Author SHA1 Message Date
c701082a92 RNA: Add pixels property type 2013-12-13 04:40:30 +11:00
c35fb528c5 Fix intersect_line_plane bug causing crash on Motion trail and other
similar potential bugs in mathutils_geometry

marking no_flip as TODO
2013-12-11 10:28:30 -02:00
96f95e0223 Python API: when OIIO is disabled use the same version format. 2013-12-10 12:58:10 +11:00
ab6f60aad2 Python API: when OCIO is disabled use the same version format. 2013-12-10 01:11:02 +11:00
2ef3f6159c Fix T37715: Incorrect docstring 2013-12-10 00:02:37 +11:00
0d71d0a8f0 Correction to previous commit, sorry 2013-12-08 15:11:07 +06:00
46f8dba4c7 Extend system-info with information about OIIO, OCIO and OSL
Summary:
Version of those libraries might be useful to know.

- OIIO and OCIO is exposed via bpy.app.oiio and bpy.app.ocio.
  There're "supported", "version" and "version_string" defined
  in those modules.

- OSL is available as _cycles.osl_version and _cycles.osl_version_string.

Reviewers: campbellbarton

Reviewed By: campbellbarton

CC: dingto

Differential Revision: http://developer.blender.org/D79
2013-12-08 15:03:17 +06:00
75212f4677 BMesh Py API: add bmesh.geometry.intersect_face_point()
patch originally by mont29 with some edits.
2013-12-06 21:15:56 +11:00
1815225faa Blender Font (BLF): add length argument to string width/height functions
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
2013-12-02 21:10:07 +11:00
3e49787b01 Python API: give a better error message when creating a Matrix fails 2013-11-29 09:48:42 +11:00
02f90c0001 User Interface: don't show macro args in tooltips
was often making much too big strings to show in a tip.
2013-11-26 09:00:24 +11:00
4da651c8f0 Fix T37472: crash when packing UV islands. 2013-11-19 11:20:57 +11:00
85bbef0f4e python api internals: no need to set the stop-iter exception string. 2013-11-17 15:09:57 +11:00
927dea436e Further tweaks to buildinfo
Summary:
Old idea with changes since previous release tag
didn't work good enough. In most of the cases tag
was done in a branch hence not actually reachable
from the master branch.

Now change since release is gone, and date of
the latest commit is used instead.

The date is displayed in format YYYY-MM-DD HH:mm
in the splash.

New bpy.app fields:

- build_commit_timestamp is an unix timestamp of
  the commit blender was build from.
- build_commit_date is a date of that commit.
- build_commit_time is a time of that commit.

Reviewers: campbellbarton

Differential Revision: http://developer.blender.org/D5
2013-11-15 18:05:27 +06:00
bbade535fb fix for crash when deleting from an id property, with a non-string key. 2013-11-08 08:46:43 +00:00
ad34a5cc1b Fix [#34675] *AFTER 2.69* Info view shows duplicate operators with incorrect values of args
Refactored a bit WM api to generate operator's pystring, now it can also handle correctly macro operators. Thanks to Campbell for the review!
2013-11-06 20:56:18 +00:00
1b4afb161d code cleanup: typos 2013-11-05 04:23:46 +00:00
2010c6ad6c Made buildinfo aware of builds from GIT
- Use commit number since last annotated tag as a
  revision number replacement. It'll eb followed
  by 'M' symbol if there're local modification in
  the source tree.

- Commit short SHA1 is included. Helps getting
  information about commit used to build blender
  with much faster.

- If build is not done from master branch, this also
  will be noticed in the splash screen.

This commit also replaces revision stored in the
files with git-specific fields (change and hash).
This is kind of breaks compatibility, meaning
files which were saved before this change wouldn't
display any information about which revision they
were saved with. When we'll finally switch to git,
we'll see proper hash and change number since
previous release in the files, for until then
svn version will be used as a change number and
hash will be empty.

Not a huge deal, since this field was only used
by developers to help torubleshooting things and
isn't needed for blender itself.

Some additional tweaks are probably needed :)
2013-11-04 13:21:39 +00:00
beae4f498d code cleanup: spelling 2013-10-31 14:10:01 +00:00
712c8f3cae code cleanup: warnings 2013-10-31 03:30:20 +00:00
3264461598 move bmesh array lookup data and utility functions from editmesh into bmesh,
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.

developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
2013-10-28 02:05:33 +00:00
7be81ffaf5 Expose MVertSkin customdata layer in Python. This allows scripts to change parameters which are used by the skin modifier (such as radius) 2013-10-27 12:16:45 +00:00
7c8c49a34a style cleanup 2013-10-21 23:35:08 +00:00
6d5024828b add local _PyLong_AsInt() needed for python older then 3.3.2 2013-10-17 09:58:36 +00:00
d3a89fc9b7 add typechecks when assigning id-property arrays from python (overflows and errors weren't detected)
reduce/simplify exceptions more.
2013-10-17 03:18:21 +00:00
a619de52cf simplify & improve error handling for id-property python-api. 2013-10-17 02:57:59 +00:00
f5660a05b1 fix [#37105] Long int IDproperties produces errors at weird spots. 2013-10-17 02:36:33 +00:00
089d0ad8f9 add IDP_FreeFromGroup(), replaces IDP_RemFromGroup(), IDP_FreeProperty(), MEM_freeN(). 2013-10-16 05:29:28 +00:00
Dalai Felinto
7c2fae19b4 cmake/openimageio - partially reverting #60692
We now have openimageio building when cycles builds or when it's
manually set to build.

(I reverted the _IMAGE_ in the define name because I think the closer
the cmake flags match the defines in the software the better, and there
is no reason to rename all the existent WITH_OPENIMAGEIO references in
CMakeLists.txt - which would be the alternative)
2013-10-12 23:56:21 +00:00
b6db417ee4 code cleanup: use const's for vector args. 2013-10-12 02:19:37 +00:00
90cd0a37a9 Fix build scripts related to PSD support. Both CMake and SCons builds were broken. 2013-10-11 23:14:01 +00:00
Dalai Felinto
029f4b9767 adding WITH_IMAGE_OPENIMAGEIO and removing the PSD build option
As per Brecht van Lommel's suggestion.
2013-10-11 16:38:04 +00:00
Dalai Felinto
4abb8fde95 Photoshop PSD support
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
342cc2633f

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
2013-10-08 21:17:24 +00:00
91e020eea9 fix [#36924] Calling .define(...) on Macro subclass crashes Blender, if subclass wasn't registered 2013-10-03 05:27:39 +00:00
d6b21df2e6 correct include guards and add checks in check_style_c.py for them. 2013-09-19 23:17:52 +00:00
4dd7d4110a replace macro PYC_INTERPRETER_ACTIVE for PyC_IsInterpreterActive() function call,
(indirectly referenced Python define of ~30 lines, most were optimized out but still caused some code bloat).
2013-09-18 23:21:24 +00:00
b6631b8be7 fixes for python api docs.
also move foreach_get/set examples into their own py example files (prefer not to have example code built into blenders binary).
2013-09-18 05:20:43 +00:00
9d6f05edb8 fix relating to bug [#36758],
When printing operator reports, ommit unset properties.
This is needed because in some cases operators check if a value is set or not, so filling in default arguments may change behavior.
2013-09-18 01:22:28 +00:00
daa87ff0b4 Update foreach_get/_set doc. 2013-09-17 14:02:13 +00:00
1576565932 minor changes needed for building standalone mathutils. 2013-09-14 00:30:56 +00:00
365c368b5f add back library linking warning when renaming library datablocks in the outliner, also typo corrections. 2013-09-12 22:08:56 +00:00
2f6c748bb9 fix [#36020] SmartUV Project is messy on a cube
was using very simple/stupid check to rotate us islands, replace with box_fit_2d() function.

missed docstring last commit.
2013-09-11 07:10:15 +00:00
d2d1025e4a add mathutils.geometry.box_fit_2d() to wrap BLI_convexhull_aabb_fit_points_2d() 2013-09-11 06:56:51 +00:00
ab8d88ac18 add angle_to_mat2 utility function. 2013-09-10 20:45:47 +00:00
92d94ccb08 misc minor changes
- make cmake osx use of -ftemplate-depth match scons.
- use array size within sizeof(), more compact.
- replace AT with __func__ where the function is unique enough.
- BLI_box_pack_2D -> 2d to match other functions.
- rename new mesh normal calculation to mesh.calc_normals_split()
2013-09-10 19:23:39 +00:00
5dbe17cc12 add 2d convex hull utility function, BLI_convexhull_2d(), and python api mathutils.geometry.convex_hull_2d()
uses Andrew's monotone chain 2D convex hull algorithm.
2013-09-10 07:52:10 +00:00
890cafface fix for error in bmesh api, selection setting needs to go via BM_elem_select_set else the total selected elements count isn't mantained. 2013-09-05 08:38:06 +00:00
bebaa41047 Tweaks to New Driver creation behaviour
* 'Show Debug' now enabled for all newly created drivers. For most users, it is
useful to be able to see this to help figure out what's going on

* Removed failed experiment of creating new drivers with Generator FModifiers. I
had hoped that this would make it easier to create drivers that doubled or
halved the input values, but that has proved to not be the case, and instead
made harder for most users to set things up (as they'd have to remove these
first).

Now, when adding drivers from the UI, these get created with two keyframes (at
(0,0) and (1,1) for a 1-1 mapping), which can be easily tweaked normally.

However, for backwards compatability of scripts (notably rigify, and perhaps
some others out there), when creating drivers from scripts, they will still get
created with Generator FModifiers for now. We can review this situation again
for 2.7, but for now it seems ok.
2013-09-03 00:28:23 +00:00
c0ca93c9b2 Add poll message when poll fails because of window missing from the context.
This means calling invoke operators from python in states that dont support will give a meaningful error message.

also reduce context lookups when polling.
2013-09-02 19:28:44 +00:00
54310b8086 bmesh: internal api change, remove BMOElemMapping, its not needed since the values can be stored in the ghash directly.
saves 24 bytes per element (per vertex/edge/face on a 64bit system), for bmesh operators.
2013-09-02 03:13:51 +00:00