Commit Graph

18987 Commits

Author SHA1 Message Date
Brecht Van Lommel
72cb4548a7 Fix #20223: texture stencil does not work on normal. 2010-01-28 11:40:38 +00:00
Brecht Van Lommel
a2372d4312 Properties window: try to keep showing shading related tabs as you switch
between active objects, e.g. switch from lamp to material tab when you are
selecting a lamp instead of a mesh.
2010-01-28 10:57:31 +00:00
Campbell Barton
1b7b5eb434 minor changes needed for PDF generation 2010-01-28 10:48:17 +00:00
Matt Ebb
9d0dbd707e Fix [#20754] Histogram Not Updating, Showing Incorrect Levels, Colour Management on/off leads to Crash
Various internal fixes, also additional feature - can drag on the histogram to change scale 
(0 key to reset).

Also fix [#20844] Color balance node (lift freeze)
2010-01-28 07:26:21 +00:00
Matt Ebb
b0989aac02 Fix [#20152] Video textures do not refresh at frame change 2010-01-28 02:08:16 +00:00
Joshua Leung
bf16ed0c80 Fixed some crashes with undo, when going back to the initial state of the file. 2010-01-27 23:20:32 +00:00
Campbell Barton
cc08cc3e8f nicer start page for sphinx docs 2010-01-27 22:17:27 +00:00
Brecht Van Lommel
5445dda295 Ambient Occlusion split up into:
Ambient occlusion: multiplied with direct lighting by default, add
is also still available and more blending methods might be added if
they are useful. This is fundamentally a non physical effect.

Environment lighting: always added as you would expect (though you can
subtract by specifying negative energy). This can be just white or take
colors or textures from the world.

Indirect lighting: only supported for AAO at the moment (and is still
too approximate), and also is always added. A factor is available to
specify how much is added, though value 1.0 is correct.

Also:
* Material ambient value now defaults to 1.0.
* Added Environment, Indirect and Emit pass.
* "Both" blending method is no longer available.
* Attenuation, sampling parameters are still shared, some could be split
  up, though if they are different this would affect performance.
2010-01-27 21:40:08 +00:00
Campbell Barton
478dc000b3 * Mathutils attributes documented - http://www.blender.org/documentation/250PythonDoc/Mathutils.html
* Vector.difference() needed normalized vectors
* bpy.DEUBG -> bpy.app.debug
2010-01-27 21:33:39 +00:00
Martin Poirier
fb7878a2c2 PROP_ENUM_NO_CONTEXT flag for rna properties, forcing enum item functions to be passed a null context (to return non-contextual items).
This is set on keymap item operator properties and macro definition operator properties to make them non-contextual (since the context at definition time is most likely not the same then at execution time, it's better to have all options visible).

This removes some more errors in keymap export and import.

This commit also sanitize some enum item function, making sure they can cope with null context and have usable defaults in that case.
2010-01-27 21:19:39 +00:00
Martin Poirier
1809e04cb4 ctx_data_pointer_verify is a verified NULL value if C is NULL.
prevents ctx_data_main and ctx_data_scene from crashing on NULL context
2010-01-27 20:12:54 +00:00
Martin Poirier
74b2d3681e missing parenthesis broke os x compile. 2010-01-27 19:46:12 +00:00
Campbell Barton
89cd4be1af slice assignment wasnt running the properties update function (setting object layers wasnt working from py)
also commented operator subclassing, loosing py property order.
2010-01-27 17:23:28 +00:00
Martin Poirier
a46f36b19c [#20792] MMB emulation, release broken
Store last mmb event value to make emulation work when modifier keys are released first.

This is done in a not so nice way for now. Eventually, I'd like for emulation keys to have their own data structures (user creatable and all that)
2010-01-27 17:01:41 +00:00
Brecht Van Lommel
39fa9ecd1a Fix #20651: 3D Cursor resets after add object operator redo. The 3d cursor
is not getting an undo push, so also made it preserved now through undo's,
this is like e.g. the 3d view position which also stays the same.
2010-01-27 15:30:20 +00:00
Campbell Barton
035daa2e2d py api - utility function for vectors.
quat = vec.difference(other)

also pedantic change with enum names.
2010-01-27 15:29:21 +00:00
Brecht Van Lommel
877251fb8c Fix #20824: vertex parent fails with subsurf on. 2010-01-27 15:09:34 +00:00
Ton Roosendaal
f0ec3cb4b1 Two small dragdrop fixes:
- drop material didn't send correct notifiers to refresh view
- drop material gave error print
2010-01-27 15:08:30 +00:00
Brecht Van Lommel
aefdec6ae2 Fix part of #20090: boolean modifier would lose link to object
if evaluation failed, it should display an error message instead.
2010-01-27 14:13:01 +00:00
Brecht Van Lommel
0e31581778 SDNA: fix for parsing struct members like:
float (*disps)[3];

It still isn't advised to use this syntax, best to just use regular pointers,
however at least it is working better now. Previously this would lead to the
rest of the header file to be included right in the SDNA. If you look into an
existing .B25.blend file with a text editor, you can see the second half of
DNA_meshdata_types.h...
2010-01-27 13:25:06 +00:00
Campbell Barton
f8200f14ae crash fix from own recent updates to Mathutils.RotationMatrix() 2010-01-27 12:53:25 +00:00
Joshua Leung
a22eb04b19 Bumped subversion for readfile patch (Anim Editors View2D stuff) 2010-01-27 11:58:04 +00:00
Joshua Leung
22f01f4761 Bugfix #20845: Grease Pencil settings lack view refresh
Added updates to Grease Pencil RNA data, and added appropriate listeners to 3D-View and Nodes Editors that were previously missing too.
2010-01-27 11:56:14 +00:00
Joshua Leung
f84f96aee5 DopeSheet and NLA Editor Scrollbar/View Bugs:
Fixed some long-standing bugs with DopeSheet and NLA Editor main views not being properly lined up with their channels, and/or showing an incorrect scrollbar. 

This fixes #20759, and probably a few other reports about similar issues that might've cropped up.

NOTE: 
- probably a version bump might be needed after this, to avoid problems on durian animation files?
- the default .b.blend needs updating again, since the saved config there doesn't get updated (or doesn't here, when using load factory settings)
2010-01-27 11:43:34 +00:00
Campbell Barton
7a95905902 workaround for running python scripts before the contexts values are set.
not happy with this but running python scripts with the -P command line could crash in simple cases (like selecting an object).
2010-01-27 11:18:55 +00:00
Campbell Barton
49abcd49f1 fix for crash when using a NULL context from python 2010-01-27 10:54:11 +00:00
Joshua Leung
2cb23d03ef Bugfix #20752: Background Image Panel Properties Keyframing?
Added a check in RNA_property_animateable() which checks if the base ID-block can have animation data or not. Screen data currently cannot have animation data, so this solves that problem (where there were non-functional entries there in the menu).
2010-01-27 10:43:14 +00:00
Brecht Van Lommel
f268ab1eba Attempt to fix strand + new bump crash (they can't work together). 2010-01-27 10:30:10 +00:00
Joshua Leung
3937ed3050 Tweaks for Animation Editor Translations:
* Auto-snapping can now be toggled on/off using Ctrl-Key again. Defaults to turning Nearest-Frame on if no auto-snapping is enabled, since this offers the best snapping behaviour in general.

* Graph Editor's 'Draw Time' option can now be taken into account for increment snapping/stepping
2010-01-27 09:42:17 +00:00
Campbell Barton
b9cad87243 missing check for NULL poll for wmPaintCursorDraw which is allowed.
would crash when in transform and moving the mouse over another window.
2010-01-27 09:36:28 +00:00
Campbell Barton
107f6cb269 - duplicate window crasheing when it was full screen
- keymap item was missing NULL check crash
- editmode object in inactive layer crash
2010-01-27 09:16:28 +00:00
Matt Ebb
de56a63849 Fix [#20773] NODE ANIMATION: Animating node values broken
Now the compositing node tree will update on frame change if any of the 
nodes are animated.

This doesn't work for playback (i.e. alt a), that's better off waiting until we 
have some kind of frame caching system.
2010-01-27 05:42:17 +00:00
Matt Ebb
904665f15b [#20728] "Export UV Layout" overwrites existing files (without feedback)
The 'save over' popup was only appearing based on a string comparison of the operator name ("Save"). Changed this to use a hidden operator property: "check_existing". Python operators must 
have this property for the file selector confirmation too.

This property can also be set to false, to prevent checking for existing files, useful in the File->Save menu item to prevent the dangerously missable confirmation popup.
2010-01-27 02:20:24 +00:00
Matt Ebb
0bb36e9ced Fixes to Color Balance node:
* The Lift/Gamma/Gain formula previously was incorrect, fixed this and 
removed conversions - now the RNA values are the same as what goes into 
the formula.
* Because of this, added the ability for the Value slider to map to a wider range 
than 0.0-1.0. The black/white gradient remains the same, in this case just 
indicating darker/brighter rather than absolute colour values. Also added ability 
for color wheels to be locked at full brightness (useful for this case, where the 
color value itself is dark).
* Added an alternate formula - offset/power/slope (asc-cdl). This fits the standard 
Color Decision List formula, here for compatibility with other systems, though 
default Lift/Gamma/Gain is easier to use and gives nicer results.
2010-01-27 00:22:29 +00:00
Campbell Barton
ebafb7e484 bugfix [#20823] Attempting to undo renaming a UV set on this scene causes a crash 2010-01-27 00:01:59 +00:00
Elia Sarti
0d69ebe878 Fix for 3d view's properties region notifier: 3D cursor position was not updated 2010-01-26 23:32:03 +00:00
Benoit Bolsee
58fd865744 CMake: fix MSVC debug build crash at startup when ffmpeg enabled.
A wrong libraries link order was causing this problem for
some reason. Since a sorting algorithm for linked libraries
was already implemented in Unix, I just enabled it for Windows.

Note about CMake 2.6.0: The Link Library Dependencies option
(Linker General settings panel) is automatically enabled, which
causes the Blender libraries to be linked twice because CMake
will also add them in the Additional Dependencies field.
CMake 2.8.0 does not have this problem, please upgrade if you
are still using CMake 2.6.0.
2010-01-26 22:49:59 +00:00
Campbell Barton
709b1a93e6 support for #'s for output animation paths
This was supported...
image: /tmp/foo_###_bar --> /tmp/foo_001_bar.png

But not this...
anim: /tmp/foo_###_bar --> /tmp/foo_001_250_bar.avi
2010-01-26 21:41:38 +00:00
Martin Poirier
586af8ca47 Properties for macro operator call in python.
Dicts are converted to operator properties like this:

bpy.ops.armature.extrude_forked(TRANSFORM_OT_translate={"value":(2,0,1)})

Note that this doesn't work quite well if one operator is twice in the same macro, but that's a problem at the RNA level too. I'll have to deal with that eventually.
2010-01-26 20:43:27 +00:00
Brecht Van Lommel
b7405ce98f Fix for dropping objects in 3d view, need to set property in
sub operator in macro.
2010-01-26 19:06:01 +00:00
Ton Roosendaal
b119ce5fcc Drag and drop 2.5 integration! Finally, slashdot regulars can use
Blender too now! :)

** Drag works as follows:

- drag-able items are defined by the standard interface ui toolkit
- each button can get this feature, via uiButSetDragXXX(but, ...).
  There are calls to define drag-able images, ID blocks, RNA paths, 
  file paths, and so on. By default you drag an icon, exceptionally 
  an ImBuf
- Drag items are registered centrally in the WM, it allows more drag 
  items simultaneous too, but not implemented

** Drop works as follows:

- On mouse release, and if drag items exist in the WM, it converts 
  the mouse event to an EVT_DROP type. This event then gets the full 
  drag info as customdata

- drop regions are defined with WM_dropbox_add(), similar to keymaps 
  you can make a "drop map" this way, which become 'drop map handlers' 
  in the queues.
- next to that the UI kit handles some common button types (like 
  accepting ID or names) to be catching a drop event too.

- Every "drop box" has two callbacks:
  - poll() = check if the event drag data is relevant for this box
  - copy() = fill in custom properties in the dropbox to initialize 
    an operator
- The dropbox handler then calls its standard Operator with its 
  dropbox properties.

** Currently implemented

Drag items:
- ID icons in browse buttons
- ID icons in context menu of properties region
- ID icons in outliner and rna viewer
- FileBrowser icons
- FileBrowser preview images

Drag-able icons are subtly visualized by making them brighter a bit 
on mouse-over. In case the icon is a button or UI element too (most 
cases), the drag-able feature will make the item react to 
mouse-release instead of mouse-press. 

Drop options:

- UI buttons: ID and text buttons (paste name)
- View3d: Object ID drop copies object
- View3d: Material ID drop assigns to object under cursor
- View3d: Image ID drop assigns to object UV texture under cursor
- Sequencer: Path drop will add either Image or Movie strip
- Image window: Path drop will open image


** Drag and drop Notes:

- Dropping into another Blender window (from same application) works 
too. I've added code that passes on mousemoves and clicks to other 
windows, without activating them though. This does make using multi-window
Blender a bit friendler.

- Dropping a file path to an image, is not the same as dropping an 
Image ID... keep this in mind. Sequencer for example wants paths to 
be dropped,  textures in 3d window wants an Image ID.

- Although drop boxes could be defined via Python, I suggest they're 
part of the UI and editor design (= how we want an editor to work), and 
not default offered configurable like keymaps. 

- At the moment only one item can be dragged at a time. This is for 
several reasons.... For one, Blender doesn't have a well defined 
uniform way to define "what is selected" (files, outliner items, etc). 
Secondly there's potential conflicts on what todo when you drop mixed 
drag sets on spots. All undefined stuff... nice for later.

- Example to bypass the above: a collection of images that form a strip, 
should be represented in filewindow as a single sequence anyway. 
This then will fit well and gets handled neatly by design.

- Another option to check is to allow multiple options per drop... it 
could show the operator as a sort of menu, allowing arrow or scrollwheel 
to choose. For time being I'd prefer to try to design a singular drop 
though, just offer only one drop action per data type on given spots.

- What does work already, but a tad slow, is to use a function that 
detects an object (type) under cursor, so a drag item's option can be 
further refined (like drop object on object = parent). (disabled)


** More notes

- Added saving for Region layouts (like split points for toolbar)

- Label buttons now handle mouse over

- File list: added full path entry for drop feature.

- Filesel bugfix: wm_operator_exec() got called there and fully handled, 
while WM event code tried same. Added new OPERATOR_HANDLED flag for this. 
Maybe python needs it too?

- Cocoa: added window move event, so multi-win setups work OK (didnt save).

- Interface_handlers.c: removed win->active

- Severe area copy bug: area handlers were not set to NULL

- Filesel bugfix: next/prev folder list was not copied on area copies

** Leftover todos

- Cocoa windows seem to hang on cases still... needs check
- Cocoa 'draw overlap' swap doesn't work
- Cocoa window loses focus permanently on using Spotlight
  (for these reasons, makefile building has Carbon as default atm)

- ListView templates in UI cannot become dragged yet, needs review... 
it consists of two overlapping UI elements, preventing handling icon clicks.

- There's already Ghost library code to handle dropping from OS 
into Blender window. I've noticed this code is unfinished for Macs, but 
seems to be complete for Windows. Needs test... currently, an external 
drop event will print in console when succesfully delivered to Blender's WM.
2010-01-26 18:18:21 +00:00
Brecht Van Lommel
722f57ca75 Fix Blend From Shape having no effect after exiting edit mode.
Also added a UI string for mesh selection mode property to show
up in undo stack.
2010-01-26 17:39:45 +00:00
Martin Poirier
d5ca236948 Typo in error string 2010-01-26 17:37:44 +00:00
Brecht Van Lommel
32fdc12923 Fix #20831: setting shadowbuffersize to 10240 only possible via typing it in. 2010-01-26 17:14:13 +00:00
Martin Poirier
655800bbab Typo in function declaration causing warnings. 2010-01-26 17:09:32 +00:00
Campbell Barton
246bcf48ad weight panel editing now supports mirroring
- use mirror when the option is enabled in editmode.
- fliped group names are used when they exist.
- only the setting that is edited will be applied to the mirrored verts group.
- copy value is applied to all mirrored verts of the selection.
- normalize normalizes all vgroups and mirrors.

utility functions defvert_sync and defvert_sync_mapped, similar to defvert_copy but does not remove existing groups and optionally creates groups as needed.
defvert_sync_mapped uses a an int array for mapping the flipped values.
2010-01-26 17:07:47 +00:00
Brecht Van Lommel
e308fe9632 Fix #20805: L selection in edit mode with bezier doesn't work. 2010-01-26 17:06:28 +00:00
Brecht Van Lommel
8d6a40c016 Fix #19802: tweaking the values of e.g. the add tube operator when
entering editmode on a second mesh would create a duplicate tube.

Cleaning the undo stack from the previous mesh would mess up the redo.
Also, OBJECT_OT_mode_set was causing enter/exit editmode undo push to
be done twice, now it leaves undo push to the operator it calls.
2010-01-26 15:54:42 +00:00
Brecht Van Lommel
dcf54b9b66 Fix for missing space between colon and number in sliders buttons. 2010-01-26 15:44:27 +00:00
Campbell Barton
bffad18da8 [#20046] 2.5 "bridge faces" tool doesn't delete original selection
remove this script, its not good enough, remove grease pencil retopo also.
2010-01-26 14:39:01 +00:00