Commit Graph

25214 Commits

Author SHA1 Message Date
Campbell Barton
b1025f2a30 fix [#27437] Appending armatures with custom bone shapes brings no custom objects into scene.. impossible to edit
previous fix unintentionally made linking groups also add objects to the scene,
tested this more throughly, its ensured only to run on append and not to conflict with group linking/appending.
2011-05-21 07:15:36 +00:00
Campbell Barton
6c4cd8d9f3 no functional changes, make give_base_to_objects() arguments less confusing. 2011-05-21 06:48:19 +00:00
Joshua Leung
1890b7f431 Bugfix [#27452] Wrong linking of character groups
Linking in groups also ended up adding those objects to the current
scene that we're linking the group in to. This is a regression. It
leads to more work (and/or confusion) from animators when just trying
to get a character into a shot file to start animating it (see my
notes on my blog for the proper workflow regarding this).

Reverting r36762, which caused this mess.
2011-05-21 06:04:44 +00:00
Campbell Barton
4c37fe91f3 patch [#27449] bpy_script_paths() return path reversed [patch]
from Dan Eicher (dna)
2011-05-21 05:34:20 +00:00
Campbell Barton
d16da799fb change transform to round at 0.5 for fcurves.
this gave noticeable issue when transforming int/fcurve's below zero.
2011-05-20 18:19:29 +00:00
Campbell Barton
9563743f4e was using the wrong rna type for GRAPH_OT_select_leftright 2011-05-20 18:00:19 +00:00
Campbell Barton
259582235c error in recent commit. 2011-05-20 16:43:23 +00:00
Campbell Barton
b100f9d79d edit gp_stroke_convertcoords not to modify the mval passed to it & make some mval args const elsewhere too. 2011-05-20 14:11:05 +00:00
Campbell Barton
363bfdc46a use consistant arguments to ED_view3d_win_* funcs, a single float vector rather then 2 floats. 2011-05-20 13:50:41 +00:00
Campbell Barton
53d5761c94 function rename to give clearer meaning that they change from window to 3d coordinates.
some functions had vague names, I even ended up re-writing some of these functions by accident!
also added doxy comments.

* ED_view3d_win_to_3d (was window_to_3d)
* ED_view3d_win_to_delta (was window_to_3d_delta)
* ED_view3d_win_to_vector (was window_to_3d_vector / viewvector)
* ED_view3d_win_to_segment_clip (was viewline)
* ED_view3d_win_to_ray (was viewray)
2011-05-20 13:09:34 +00:00
Campbell Barton
c833fff638 replace checks with rv3d->persp with rv3d->is_persp since in these cases it only matters if its a perspective view matrix, this wouldn't work right for camera views. 2011-05-20 11:15:44 +00:00
Campbell Barton
4916c44af8 simplify window_to_3d_vector() and call it from viewline()
also update python view function to match.
2011-05-20 10:28:40 +00:00
Campbell Barton
2999d0fad9 rename mul_project_m4_v4 to mul_project_m4_v3. 2011-05-20 10:09:03 +00:00
Nathan Letwory
3ddaaa3784 Remedy compile error on windows/msvc introduced in r36787. 2011-05-20 08:52:52 +00:00
Campbell Barton
9f766c71b0 use event->mval rather then subtracting ar->winrct.x / y from event->x / y 2011-05-20 07:40:05 +00:00
Campbell Barton
2338765726 renaming bones didnt update update the view3d lock bone name. 2011-05-20 05:39:56 +00:00
Campbell Barton
170716ca53 use BKE_area_find_region_type in place of inline loops (no functional changes). 2011-05-20 05:27:31 +00:00
Campbell Barton
984d2e42e4 make api functions for converting rv3d->camzoom, so the odd logic for this isn't inlined all over. 2011-05-20 04:14:29 +00:00
Campbell Barton
c07012b41e int values were not drawing curve handles, yet the handles could still be selected and transformed, and different handle types set. disable this check and draw curve handles for int fcurves. 2011-05-20 01:02:00 +00:00
Campbell Barton
2f4813500c - mousewheel zoom now zooms camera area when the camera is locked and in ortho view.
- remove secret apricot feature now dolly is its own operator.
2011-05-19 17:19:05 +00:00
Campbell Barton
0942e62bc4 move rna property area.active_space --> area.spaces.active 2011-05-19 15:18:40 +00:00
Campbell Barton
79e7a89c38 formatting changes only. 2011-05-19 13:50:53 +00:00
Campbell Barton
fbe541d1a8 modify fcurve evaluation for bool/enum/int values. was converting from a float to an int which means 0.9x evaluates to 0.0, negative numbers are also rounded up.
Round at 0.5 instead & treat negative numbers the same.
2011-05-19 12:39:57 +00:00
Brecht Van Lommel
e088f592bd Fix some compile warnings. 2011-05-19 11:54:03 +00:00
Brecht Van Lommel
417b7836ec UI tweak: properties editor header now has same size as other headers again. 2011-05-19 11:45:06 +00:00
Brecht Van Lommel
525f4e226e Fix for preview render, lamp and world now also get localized like material and texture. 2011-05-19 11:37:08 +00:00
Brecht Van Lommel
54b97c1d9d Code refactor: split code for render updates and opening render view into
separate files, no functional changes.
2011-05-19 11:34:11 +00:00
Brecht Van Lommel
ae0c552bd1 Fix crash when accessing mesh from python while a mesh with a subsurf modifier
is in editmode.
2011-05-19 11:24:56 +00:00
Brecht Van Lommel
3aaa03e1f8 Add localize_lamp and localize_world functions as already existed for materials
and textures, unused still.
2011-05-19 11:21:37 +00:00
Brecht Van Lommel
4c28693ae3 UI: fix direction properties not showing the right direction editing widget,
code was there but in the wrong location. This makes the opengl lights in
the user preferences show that widget again as in 2.4.
2011-05-19 11:18:09 +00:00
Campbell Barton
7603c8a2fb screenshot operator can now be executed directly.
so python can screenshot with: bpy.ops.screen.screenshot(filepath="some_image.png"):
2011-05-19 11:13:35 +00:00
Brecht Van Lommel
d77b9af609 UI: fix menus getting closed too quick when moving mouse not exactly towards
them, noticeable for the vertex groups or material slot utility menus.
2011-05-19 11:05:34 +00:00
Campbell Barton
1dad9bf0bc change window_to_3d to take screen coords as floats. 2011-05-19 07:55:48 +00:00
Campbell Barton
31d3e8d214 converting grease pencil now works in the camera view. 2011-05-19 07:43:10 +00:00
Campbell Barton
1ce0958369 fix [#27437] Appending armatures with custom bone shapes brings no custom objects into scene.. impossible to edit 2011-05-19 06:17:44 +00:00
Campbell Barton
32793a1395 add python access to mathutils.intersect_line_plane, update view3d_utils module to use it. 2011-05-19 04:28:09 +00:00
Campbell Barton
391dbde03d added math function isect_line_plane_v3(), use for window_to_3d rather then having it inline. 2011-05-19 03:49:57 +00:00
Andrea Weikert
c04f9b779c fix [#27158] Appending crash with preview.
* fixed incorrect reading of PreviewImage struct from .blend 
* fixed memory leak, PreviewImage data wasn't correctly free'd
2011-05-18 19:42:30 +00:00
Campbell Barton
91bd739a09 use window_to_3d for armature_click_extrude operator. 2011-05-18 18:14:59 +00:00
Campbell Barton
7282f8cf98 window_to_3d() wasn't working at all (only used by grease pencil/path conversion), now works in ortho and perspective view, initgrabz() is no longer needs to be called first. 2011-05-18 18:01:01 +00:00
Campbell Barton
f4d8be977f there wasn't a good way to know if a RegionView3D was perspective or not (without having the View3D too and checking its camera values), added struct member 'is_persp', set with the view matrix. 2011-05-18 17:52:26 +00:00
Campbell Barton
6266e62170 python mathutils.Matrix.is_orthogonal readonly attribute. 2011-05-18 15:31:00 +00:00
Brecht Van Lommel
d2b0954b2a UI: fix access of freed memory in buttons handling code. 2011-05-18 15:23:40 +00:00
Brecht Van Lommel
a6fe2f1e18 RNA: some compile fixes for C/C++ api. 2011-05-18 12:56:58 +00:00
Brecht Van Lommel
66f51ba5d1 RNA: make mechanism used by operators to keep python instance alive more generic, to be used by render engine later. 2011-05-18 11:21:10 +00:00
Brecht Van Lommel
178ba76b09 RNA: pass Main rather than Context to register/unregister callbacks. 2011-05-18 10:56:26 +00:00
Campbell Barton
304ce06a5a fix remaining crash from [#27035] 3 problems: crash and enum "REGION" not found in ('VERTS') 2011-05-18 09:58:17 +00:00
Campbell Barton
0454c817ef fix a crash when getting the value of an enum. 2011-05-18 09:26:07 +00:00
Campbell Barton
ebe47add08 fix for one of the issues in [#27035] 3 problems: crash and enum "REGION" not found in ('VERTS')
now constraint macro argument shows as 'NORMAL' rather then '<UNKNOWN ENUM>'
2011-05-18 09:07:15 +00:00
Campbell Barton
5f32094bce use ED_operator_screenactive rather then ED_operator_screenactive so transform works in background mode. 2011-05-18 08:36:06 +00:00
Campbell Barton
2fe3840780 2 minor glitches
- removing bone groups didnt set the next one active.
- removing poselib was using int for enum rna property.
2011-05-18 08:16:33 +00:00
M.G. Kishalmi
7e6520c080 additional bake modes
(refined patch #23430)

+ specular color
+ specular intensity
+ mirror color
+ mirror intensity
+ alpha (tranparency)
+ emission (glow)
2011-05-18 07:46:54 +00:00
Campbell Barton
c92c3758a8 - check paths are not empty strings before making blend file paths absolute or relative.
- when saving blend file with 'Remap Relative' enabled, don't try make paths absolute if the internal filename is invalid.
- use case insensitive path comparison on windows when checking if path remapping is needed & for comparing next/prev dirs in the file selector.
2011-05-18 06:48:52 +00:00
Campbell Barton
37178ab0fd cleanup only
- rename 'name', 'dir' --> 'filepath' where these actually represent a file path to avoid confusion.
- bugfix for possible (but unlikely) uninitialized string.
- remove commented script append function, now we have a python api for this.
2011-05-18 06:27:32 +00:00
Campbell Barton
edb9045824 fix [#27405] Append objects with linked materials they dissapears after save
when linking in files to an unsaved blend file, make all library paths absolute.
2011-05-18 05:21:44 +00:00
Peter Schlaile
dc50003824 This fixes:
[#27422] Strobe setting does not work with effect strip
[#27421] Some Settings of Adjustment Layers are not Functional.
2011-05-17 18:37:44 +00:00
Nathan Letwory
2eed2a7f58 fix for r36723 - putting extern Material inside code like that results in wrong linking. Move to proper place so that linking goes right. 2011-05-17 16:20:07 +00:00
Campbell Barton
1294504603 fix for warning 2011-05-17 06:51:31 +00:00
Campbell Barton
0858904571 fix [#27414] no-material renders differently in View3D vs BGE
when a texface layer exists this still overrides the default material.
2011-05-17 02:44:52 +00:00
Janne Karhu
c4dca3890b RNA glitch: particle path step values had soft & hard limits the wrong way around. 2011-05-16 20:48:14 +00:00
Andrea Weikert
079caae727 code cleanup: icon creation
* changed stupid miplevel/MIPMAP naming in icon code, it was really the icon size (small icon or larger preview) that was meant there.
2011-05-16 18:37:54 +00:00
Campbell Barton
4023427fe0 set clip_start value minimum to 0.001, since 0.0 makes the viewport go very strange. 2011-05-16 18:04:19 +00:00
Peter Schlaile
ff884f4179 == Sequencer ==
This fixes one part of [#27353] VSE crashes on large M4V

StripData was alloced in full length for MOVIE and SOUND-tracks, which only
use the first element for filename storage. (StripData as an array is only
used in IMAGE strips).

Fixed the crash and documented accordingly.
2011-05-16 17:54:55 +00:00
Peter Schlaile
70b832589a [PATCH] == Sequencer ==
This patch adds adjustment layer tracks to the sequencer and does some cleaning
up of the code.

What's an adjustment layer?

Think of it as an effect track, which takes no explicit input, but alters
the output of everything down the layer stack.

So: you can add several stages of color correction with it.

And: you can even use it with metastrips to group several adjustments together.
2011-05-16 17:14:47 +00:00
Brecht Van Lommel
b434e7f933 LCMS code removed, was an experiment but never finished. 2011-05-16 13:34:42 +00:00
Nathan Letwory
37e95c525d Remove artificial limit, now HDR textures can be used to displace. 2011-05-16 11:46:16 +00:00
Campbell Barton
617d69a627 rename wave texture_coordinate_object -> texture_coords_object to match Displace and Warp modifiers. 2011-05-16 05:50:04 +00:00
Campbell Barton
80c2582f0e enable game panel even if the BGE is disabled since its settings effect the viewport.
also remove unused function in creator.c and minor edit to search menu poll function.
2011-05-16 04:55:31 +00:00
Thomas Dinges
7459133648 Patch [#27344] 300+ New/changed tooltips by Davis Sorenson (dsavi). Thanks a lot!
Reviewed by Tom Musgrove and myself. 

From the patch description:
ValterVB on #blendercoders submitted a long list of missing tooltips in Blender, and I went through the list and added all I knew. After that I crowdsourced the rest by putting a spreadsheet on Google docs and having people fill in the missing ones that I didn't know. So if there's some weird tooltip in there that doesn't make sense, that's why.

Thanks to Wolter, spacetug and others on BlenderArtists for contributing tooltips.
2011-05-15 17:59:48 +00:00
Janne Karhu
f60528687f Fix for [#27142] manipulator in particle mode does not work
* Manipulator operator wasn't registered in particle mode.
2011-05-15 16:42:39 +00:00
Janne Karhu
b0ced3ef83 Fix for [#27131] particle system BUG - one particle generated twice at vertex (e.g. 9 particles generated at 8 locations)
* The tiny offset value used in particle distribution code was actually too small, so that floating point errors got the best of the calculations.
2011-05-15 15:51:17 +00:00
Campbell Barton
ca3b61f578 homekey in camera view now fits the view scale as well as centering the camera. 2011-05-15 14:07:24 +00:00
Sergey Sharybin
19eb07c63d Do not remove MDISPS customdata layer when removing multires modifier
and there are still another multires modifiers in the stack.

Helps to prevent loosing sculpt data when you occasionally added another
multires and reomved it with "X" button.
2011-05-15 13:13:51 +00:00
Mitchell Stokes
d05b26c635 BGE:
This fixes frame colors not showing up right when using letterbox in the embedded player. Frames are drawn by clearing the whole canvas and then changing the viewport to be within the frames. The problem is that the embedded player's canvas is setup to be within the frames. This means that the extra that would normally be cleared and filled with the frame color is instead the gray color of Blender's region since nothing is actually drawn there by the BGE. To solve this, I just handle the frames in BL_KetsjiEmbedStart.
2011-05-15 08:48:43 +00:00
Campbell Barton
6744123881 remove redundant (and confusing) register flag. 2011-05-15 06:29:52 +00:00
Campbell Barton
b8be69c568 camera composition guides:
removed diagonal golden rule (not very common), added harmonious triangle and golden triangle options.
2011-05-15 05:43:59 +00:00
Campbell Barton
99b7960781 remove some unused view3d members & added RV3D_VIEW_USER define.
Aligorith: replaced v3d->keyflags with ANIMFILTER_KEYS_LOCAL since v3d->keyflags couldn't be set anywhere and wasn't initialized.
2011-05-15 03:42:28 +00:00
Campbell Barton
36bec40fbc fix for bug with camera locking, view dolly and rotate with 'about selection' preference enabled would offset the camera. 2011-05-15 03:07:07 +00:00
Campbell Barton
baa64d1751 fix for user reported issues
- camera object movement was missing a notifier
- auto perspective now works when rotating the view.
- shift+b now zooms.
2011-05-15 02:39:36 +00:00
Nathan Letwory
12fecba3ae Remove files that were intended for shader branch. 2011-05-14 18:54:56 +00:00
Campbell Barton
e7db080565 option to have the view controls apply to the camera view (and camera object).
- follow rotate/pan/zoom/dolly operators.
- auto-depth preference works.
- smooth view navigation supported.
- view selected, all & numpad operator work too.

TODO
- deal with camera transform locked axis
- find a way to move/zoom the frame while the camera is locked (if it turns out to be a problem).
2011-05-14 17:50:33 +00:00
Campbell Barton
93bc463f6d action editor was setting wrong rna type on Ctrl+RMB 2011-05-14 15:44:56 +00:00
Sergey Sharybin
da7f700749 Fix #27390: Shift for activating Smooth Brush broken in sculpt
Smooth brushes at requires face map which haven't used to be created for
simple meshes (without modifiers).

Use corrected need_fmap flag at stroke initialization, so face map
is created properly for "temporary" smooth brushes and simple meshes.
2011-05-14 12:32:15 +00:00
Campbell Barton
28608b9281 fix for view dolly not working with auto-depth & zoom to mouse location when no depth was found. 2011-05-14 10:35:11 +00:00
Mitchell Stokes
99113b8541 These two files didn't get added when I created a branch from my working copy. 2011-05-14 06:32:25 +00:00
Mitchell Stokes
d25be80320 stubs.c update: ED_view3d_from_m4() 2011-05-14 06:24:29 +00:00
Campbell Barton
c213b9525f minor changes to view3d operators, add View3D to 'ViewOpsData' 2011-05-14 05:42:58 +00:00
Campbell Barton
054eb2897c object_mat3_to_rot wasn't correctly accounting for the euler delta rotations, so setting the matrix of an object would fail in this case (rotational jump). 2011-05-14 04:59:37 +00:00
Campbell Barton
4b7d981c91 view3d api edits, no functional changes.
rename v3d functions
* view3d_to_ob -> ED_view3d_to_object
* view3d_apply_ob -> ED_view3d_from_object
* view3d_apply_mat4 -> ED_view3d_from_m4

Changed ED_view3d_to_object() not to temp modify the view rotation and don't overwrite the objects recalc.
2011-05-14 04:25:47 +00:00
Campbell Barton
daa3dd0e9b using the viewmatrix to position the camera could be problematic if the view wasn't yet recalculated, use the quaternion instead. 2011-05-13 18:32:27 +00:00
Campbell Barton
47569160d7 rename setcameratoview3d to view3d_to_ob & add to ED_view3d.h so others can use. 2011-05-13 18:05:30 +00:00
Campbell Barton
62cd927f57 made BLI_edgefill returns the list length since some callers count directly after, also remove 2 unused flags from ScFillVert struct. 2011-05-13 16:04:20 +00:00
Campbell Barton
05d004fd14 support for reading/writing image resolution (dpi), for PNG and TIFF,
only RNA access currently 'image.resolution'.
2011-05-13 14:27:12 +00:00
Campbell Barton
91bddf2b13 remove imbuf crect and profile_filename when building without LCMS 2011-05-13 04:53:20 +00:00
Matt Ebb
b73fe01295 * Enabled rna access to fluid sim velocity vectors
The main purpose for this is to allow rendering motion blurred blender fluids in external renderers (eg. http://vimeo.com/21870635 ).

Python code snippet for interpreting this data here: http://www.pasteall.org/21577 . Cleaned up some ugly hacks in this area too

* Also added read-only access to scene.subframe to RNA - setting current frame and subframe should still go via scene.frame_set()
2011-05-12 22:52:30 +00:00
Sergey Sharybin
1d6278f80a Fix #27359: Pasting long text crashes blender
Actual problem was caused by insufficient buffer size
in ui_text_leftclip()

Also fixed possible invalid memory write in GHOST_SystemWin32::getClipboard
which was caused by accessing clipboard buffer after closing
clipboard. This mustn't happen.
Also fixed possible crush when buffer was failed to be locked.
2011-05-12 16:49:53 +00:00
Campbell Barton
5f5cdf9d00 for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.

this problem still happens on linux because of XTranslateCoordinates
2011-05-12 16:47:36 +00:00
Ton Roosendaal
2ca7ded51d Bugfix #27181
2D view panning and zooming is now fully keymappable, you can set a
keyboard key to it too (hold key -> move mouse -> release key).
2011-05-12 13:49:47 +00:00
Campbell Barton
2f08309ffe window_to_3d_vector was incorrect but dolly view operator was accounting for it. fixed so result isnt negated and mouse coords dont need to be adjusted. 2011-05-12 06:52:24 +00:00
Nicholas Bishop
910220be47 == Radial control ==
Patch to make the radial control more generic with RNA. Patch was
reviewed here: http://codereview.appspot.com/4280080/

Prior to this update, the radial control code in trunk had generic
parts of the radial control implemented as an incomplete operator
within WM. Then each different user of the radial control had to
implement a separate operator to actually pass in specific brush data
-- e.g. sculpt's brush size, vpaint's brush size, etc.

This patch removes all the extra operators and makes the WM operator
do everything. It now takes several RNA path strings as its properties
-- the only required property is data_path, which specifies the data
to be modified by the radial control. The other paths affect display
in various ways, e.g. rotation, color, etc.

In addition to decreasing some duplicate paint brush code, these
updates make it pretty easy to enable radial control for other
purposes (and it can be set up entirely though python or keymaps, no
extra C code needed.)
2011-05-12 01:57:47 +00:00