Commit Graph

21885 Commits

Author SHA1 Message Date
Campbell Barton
5452f335d7 New optional operator function, check(), it takes the same arguments as execute().
This runs after changing a property and allows correcting incompatible options.
 Returning True will redraw the UI.

Currently this is used for setting the write extension when saving files, so changing the image format also corrects the extension.
The same is accessible from python where its used when saving SVG/EPS/PNG files.

This fixes: [#23828] obj export problems, [#23760] Exporting OBJ and filetype ending
also fixed document submission operator.


Now the filename in the file selector is the one used for writing this means we remove the "Save Over" popup which could be overlooked too easily.
Instead display the filename field with red tint, and a note in the tooltip.
2010-09-17 09:27:31 +00:00
Campbell Barton
945ae25409 fix for some errors when saving blend files.
- when comparing with libraries, relative paths were used which could easily fail.
- testing libraries was done before adding the .blend extension.
2010-09-17 08:53:39 +00:00
Sergey Sharybin
b9a3da9080 Fix #23869: outliner not updated correctly/instantly
Added ND_OB_SELECT notifier to separate operator. Selected objects
aren't actually changing, but there is no existing ND which could be used
for outliner update.
2010-09-17 06:52:48 +00:00
Campbell Barton
e546d7666b minor changes needed for the next commit.
- BKE_add_image_extension now sets the extension rather then appending. (no more image.jpg.tga)
- py/rna functions which have no return value now raise an error if a non-None value is returned.
- added back the red-alert flag so buttons can have a red highlight if somethings wrong.
2010-09-17 05:58:06 +00:00
Brecht Van Lommel
5ae75d5dc8 Fix #23652: texture paint RMB would translate the object after sampling
color, made sample a modal operator now to solve this. It's an indirect
solution, but couldn't think of anything better, and it's useful to have
anyway.
2010-09-16 21:03:07 +00:00
Brecht Van Lommel
7d0e17922a Fix compile error after last commit in boids. 2010-09-16 20:33:46 +00:00
Janne Karhu
e7a393d2e1 Tiny addition to boids functionality: pitch value
* Controls maximum rotation around side vector (as opposed to banking, which controls rotation around forward vector)
2010-09-16 20:06:10 +00:00
Janne Karhu
43d2d0c6ea Bug fix: Boids that could only fly didn't take the ground object into account leading to problems when flying near the ground.
Reported by Mike Pan and Dalai Felinto by mail.
2010-09-16 20:00:30 +00:00
Brecht Van Lommel
39113a3582 Fix #23857: game engine world colors were not color corrected yet,
giving inconsistent results with render/UI.
2010-09-16 19:03:01 +00:00
Brecht Van Lommel
7abb3217e3 Fix #23867: GroupNode.nodetree name inconsistent with Material/Texture.node_tree,
changed to the latter, patch by Dan Eicher, thanks!
2010-09-16 19:00:15 +00:00
Sergey Sharybin
2c79fa84b6 Fix #22603: Crash on launching external editor in texture paint [r29461] [WinXP 32bit]
Crash was caused by missed offscreen OpenGL buffer. Added checking around this stuff.
Also fixed crash of simple "Image from view operator".

Note: This commit fixes only crashing, you'll be still unable to use this tools.
2010-09-16 15:54:48 +00:00
Campbell Barton
f788c68b9c bugfix [#23831] Removing an IK Constraint in pose mode still draws bone with IK highlight
+ moved bone envalope scale into transform menu, pose menu is getting huge.
2010-09-16 07:14:48 +00:00
Campbell Barton
4a840db7e9 armature selection when entering editmode wasnt working well (in 2.4x too)
root bone selections were cleared if there was no connected parent. Now only set the root selection state if there is a connected parent.
2010-09-16 06:28:11 +00:00
Campbell Barton
26b41bd0b5 bugfix [#23841] Bone envelope draws funky 2010-09-16 06:04:47 +00:00
Nathan Letwory
666b65a8d0 Make sure rna_armature.c compiles. Use BLI_math.h that includes <math.h> and ensures it compiles on all platforms. (fix for r31956). 2010-09-16 05:49:09 +00:00
Campbell Barton
36c273b1f7 - bone roll now in degrees not radians.
- rna buttons with units set now use the units base value for snapping. 
- bone head/tail radius could be set negative.

matt: removed a check in ui_is_but_unit() which made angle buttons return false, what was this for?
2010-09-16 04:19:22 +00:00
Brecht Van Lommel
d08a40450e Fix cmake/osx blenderplayer linking. 2010-09-15 19:03:52 +00:00
Campbell Barton
7d8f0fce7a patch [#23758] Better handling of UTF chars in UNITS fields (lengths, angles, etc.)
from Lorenzo Tozzi (oni_niubbo) with minor edits.

--- from the tracker
The present situation is this: due to bug#22274, during editing, UTF chars are stripped from buttons with a unit associated
(length, angles, etc.).
Example: if the button displays '90°' and you click on it with LMB, the editing string will become '90'.

The problem arises if you use microns: '34µm' becomes '34' that blender interprets as 34 meters. So clicking on a button
and hitting enter won't confirm the previous value, but will change it (very badly also).

Of course nobody is using microns in blender, but the problem will arise when we will implement areas and option 'Separate
Units' will be enabled. The value '2m² 3cm²' will become '2m' during editing.

This patch solves the problem rewriting the string in a smarter way than just stripping the UTF chars: the unit is translated
from unit->name_short ('µm') to unit->name_alt ('um'). So clicking on '34µm' the editing string will become
'34um'.
--- end

note: rather then allowing empty strings in name_alt field I made it so if the unit system was the default one a NULL name_alt will just strip the string, since its the default its not needed.
2010-09-15 17:37:00 +00:00
Campbell Barton
e6ce108f5c ignore BLI_bfile with cmake since its not used anywhere 2010-09-15 16:23:04 +00:00
Campbell Barton
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
Nathan Letwory
95a3f41096 Don't do weird PYTHONPATH juggling anymore. Debug build crash doesn't happen anymore since proper libs have been committed.
Hopefully this helps in cases where people have PYTHONPATH set on their system to an incompatible Python version, which can result in crashes.
2010-09-15 15:29:31 +00:00
Campbell Barton
d5ee95644d win32 mingw works again with cmake 2010-09-15 14:36:32 +00:00
Campbell Barton
1e291017ca add missing notifiers for bone circle/border/lasso select. 2010-09-15 13:22:36 +00:00
Campbell Barton
4828d0cba0 bugfix [#23830] Border selecting bones in editmode bug
was missing a call to glLoadName(-1); so drawing commands after the bone were taken into account with the selection.

made some other minor changes that dont change functionality.
2010-09-15 13:07:36 +00:00
Nathan Letwory
2ac0a5637c Apply patch [#23779] Small cleanup with gl_roundbox*
By Luca Bonavita (mindrones)

The patch renames and moves gl_round_box, gl_round_box_shade and gl_round_box_vertical_shade to UI_interface.h, so the extern usages are not needed anymore.
2010-09-15 12:18:50 +00:00
Nathan Letwory
d97d727d09 Apply patch [#23755] Sequencer: small code cleanup using existing color math functions
By Luca Bonavita (mindrones)

From detailed description: This patch doesnt change functionality, but uses the existing color math functions from math_color.c into
sequencer_draw.c.
2010-09-15 11:58:19 +00:00
Nathan Letwory
8a25c33fca Apply patch [#23809] Blender.exe -W support
by Dalai Felinto/Nathan Letwory

This basically implements -W support for Blender.
2010-09-15 11:48:59 +00:00
Campbell Barton
fadf169190 - rna properties for bones, select_head, select_tail
- fix for minor inconsistency in armature selection, entering editmode and selecting a bone would move the manipulator because the selected bones, childs root wasnt selected on entering editmode.
- use copy_v3_v3 rather then VECCOPY in editarmature.c
2010-09-15 08:03:33 +00:00
Campbell Barton
a8db76f00e fix for error in last commit. 2010-09-15 08:00:19 +00:00
Dalai Felinto
ee7a2ccb22 BGE Dome: fix for "objects parented to the camera will be rendered multiple times in Dome mode"
The funny thing is: I only spotted this bug in March of this year. Almost one year after the original release. I think I don't parent objects to the camera often.

In terms of code I think that I can even think in a more elegant solution. I don't really need to rotate the camera, but simply to calculate its Modelview Matrix.
"""
m_rasterizer->SetViewMatrix(viewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), 1.0);
cam->SetModelviewMatrix(viewmat);
"""
The reason why I originally was rotating the camera was to make sure the frustum calculation was using the right camera frustum. For the frustum it takes the camera modelviewmatrix so the rotation really shouldn't be necessary. Leaving as it's for the time being.

* Note: the bug was never officially reported
2010-09-15 07:05:55 +00:00
Campbell Barton
9234f29e67 bugfix [#23405] PNG Images bigger then 2gig wont load with blender.
all image formats should be able to load files bigger then 2gig (when its supported)
2010-09-15 06:43:36 +00:00
Campbell Barton
7eb7410002 remove inventor and vrml1 support, we're better of having these legacy formats as addons. 2010-09-15 05:57:48 +00:00
Dalai Felinto
e2a0b302ff Logic UI: reset the value of a key when clicking outside the input button
Otherwise you had no way to set it to none. This doesn't really matter, but it's nice "userwise" to be able to clear the pressed key.
2010-09-15 04:42:01 +00:00
Joshua Leung
d2a1218210 Two small bugfixes:
- A property used in an 'active' poll for UI code in the NLA Editor was missed during the RNA renaming madness, leading to error prints in the console

- For matrix blending code, 'fsize' arrays were being declared wrong size (4 elements long instead of 3).
2010-09-15 04:15:42 +00:00
Daniel Salazar
a3470be1bc Allow start frames < 1 on image sequences. 2010-09-15 03:45:33 +00:00
Campbell Barton
8d0c01e6e2 keyconfig updates/changes
- use preset subclass with funcs for updating the keyconfig
- keyconfig filenames are used for the UI names as with presets (so separation anymore)
- keyconfig's are stored in the preset dir (scripts/cfg dir removed)
- only the active keyconfig script is loaded
- some bugfixes for saving keymaps
- user interactions no longer saves keyconfigs too, I think this needs to be re-worked.

developer note...
multiple keyconfigs at once are not really needed now that they are stored & accessed directly in python.
for now I left it alone but we could consider to remove this capability in the future.
2010-09-14 16:45:24 +00:00
Campbell Barton
ce98d6ae17 fix for own bug for font buffer drawing (only effected the bottom line of the stamp) 2010-09-14 12:35:02 +00:00
Janne Karhu
baadd70ea1 Fix for [#23794] Particle System + FS Motion Blur corrupts some frames and possibly cache 2010-09-14 12:17:09 +00:00
Janne Karhu
a1ff472e07 Particle edit brush strengths were loaded wrong for old files. 2010-09-14 09:32:43 +00:00
Dalai Felinto
46f25680aa blenderplayer fix for "offset" problem when in fullscreen mode (worked together with Nathan Letwory - jesterKing)
The FullScreen state was never set. Therefore the window boundary was returning the wrong dimensions (it was assuming that it was not fullscreen).

* Note: blender.exe -W has a similar problem. We are working on that ...

Tested in Windows only. If someone can test in Linux and OSX please let me know if it's good there as well. To test it: ./blenderplayer -f myfile.blend
2010-09-14 08:19:42 +00:00
Janne Karhu
7245177c26 Fix for a particles memory leak:
* Hair wasn't freed properly when changing particles from hair to normal particles.
2010-09-14 01:47:01 +00:00
Janne Karhu
ca940016e1 Fix for [#20350] particles are offset from emittor in dupli-objects 2010-09-14 01:43:46 +00:00
Dalai Felinto
9cc3f7dd98 "flip -> pen_flip" missing rename on particle edit mode
(it was raising the error RNA_boolean_set OperatorStrokeElement.flip not found ) [Thanks Mike for spotting that :p]
2010-09-14 01:11:54 +00:00
Nathan Letwory
ba2a9ae88e Fix [#22612] FFMPEG writes incorrect Xvid FourCC code
Reported by Karl Nyman

When XVID is chosen for FFMPEG make sure that XVID is written for FourCC code.
2010-09-13 12:56:39 +00:00
Janne Karhu
74f060bfe5 Fix for [#23729] Smoke / Edit Mode bug 2010-09-13 11:14:12 +00:00
Dalai Felinto
898e7857f4 blenderplayer parsing code (better) fix
After last commit I realized that we have a different behavior when running blenderplayer or a runtime. Reason being is that when running blenderplayer the filename is mandatory. While in runtime mode it has no use for it (it can still be passed, but it makes no difference).

I also updated the -h (help) message to be multiplataform and to pass the filename argument only when in blenderplayer mode.

If someone wants to have fun it would be nice to port the blender new parsing code to the gameplayer.
* note: how come "noaudio" is used in the examples but it's not in the options list? *ouch*
I'm leaving as it's in case noaudio get implemented ...
2010-09-13 08:30:56 +00:00
Campbell Barton
cd1dc29e65 patch [#23221] Merge bone : Within chains : infinite loop
from Yvon Tanguy (vono)
2010-09-13 07:30:11 +00:00
Campbell Barton
0c815a42fd bugfix [#23528] ED_pose_channel_in_IK_chain() doesn't take length of IK chain into account 2010-09-13 06:57:03 +00:00
Campbell Barton
bd5a62cfcb bugfix [#23068] Image editor: Update Automatically not updating the compositor.
[#23637] Replacing an image used in the compositor crashes
       [#23343] changes in images doesn't update compositor image nodes
2010-09-13 06:08:26 +00:00
Campbell Barton
18702a9eef bugfix [#23001] Addons do not unregister properly in Blender 2.5.3
Now reloading the user defaults also unloads/loads addons, resetting the state to the one set in the user preferences.

moved addon functions into bpy.utils
- bpy.utils.addon_enable(name, default_set=True)
- bpy.utils.addon_disable(name, default_set=True)
- bpy.utils.addon_reset_all(name, default_set=True)

the user preference operators now just wrap these.
2010-09-13 04:52:56 +00:00