Commit Graph

15556 Commits

Author SHA1 Message Date
Brecht Van Lommel
0b49dc77de 2.5: Bump Mapping
Patch by Alfredo de Greef. Considerably improves the quality of bump
mapping, and texture filtering for displacement and warp too. Mainly
this is achieved by getting the texture derivatives just right in
various cases, many thanks to Alfredo for figuring this one out, works
great.


This is enabled by default now, but disabled still for existing
textures to preserve backwards compatibility. Can be enabled with
the "New Bump" option in the material texture slot in the outliner.

Also, I made the range for the normal factor a bit smaller since this
gives stronger effects, but note that you can still type in larger
values than the slider allows.
2009-07-21 13:46:49 +00:00
Joshua Leung
d19bb6ffcf Silencing warnings (mingw + scons) about undefined stuff... 2009-07-21 13:20:39 +00:00
Brecht Van Lommel
e3c6ae9b89 2.5: Texture Filtering
Patch by Alfredo de Greef with high quality image texture filters.
This adds 3 new filters:

* SAT: Summed Area Tables. This is like mipmaps, but using somewhat
  more memory avoids some artifacts.
* EWA: Ellipitical Weighted Average, anisotropic filter.
* FELINE: Fast elliptical lines for anisotropic texture mapping.

The one change I made to this was to try to fix an alpha/premul
problem, hopefully I didn't break anything, it looks compatible
with the existing filter now for me.
2009-07-21 13:20:35 +00:00
Joshua Leung
ea0b015b0a 2.5 - Copy/Paste Operators for Armatures
* Buttons in header now use operators too. The paste-flipped button needs attention though, since the flipped argument isn't set yet

* Assigned Ctrl-C, Ctrl-V, and Ctrl-Shift-V to Copy/Paste/Paste-Flipped respectively for now.

* Auto-Keying for this doesn't work again yet. On todo for later...

---

* Also, new armatures now get the flag to show custom bone colours enabled by default.
2009-07-21 13:12:40 +00:00
Brecht Van Lommel
e56287bfc9 2.5: Texture Buttons
* World and Lamp previews now working here too.
* Experiment with list template, showing only icons. Unfortunately
  texture icon render crashes combined with preview render so it
  shows all icons the same.
* Influence panels updated, with slider for each option. The values
  are still linked though, will fix that later.
* Image texture controls a bit more complete, still WIP.
* Color ramp back.
2009-07-21 12:57:55 +00:00
Joshua Leung
7284eb6d91 2.5 - More work on Bone Groups
* Added a new UI Template for the 3-colour picker used to visualise + select the custom colours for a bone group.

* Finished wrapping the colour properties for Bone Groups in RNA. Although changing the colour-set used will change the displayed/cached colours, changing the colours via the colour wells will not change the colour set to 'custom' (as per 2.4x) yet. This needs a nice solution...

* Fixed context-related bugs with the Assign/Remove operators for bone groups. These were using context-iterators for selected posechannels, but that was only defined/valid for the 3d view (but not for the buttons window), hence a failure in that case.
2009-07-21 12:38:01 +00:00
Ton Roosendaal
e18164dbab 2.5
Overlooked WM event.val usage without checking proper #defines.
My previous commit made all input not work on any modifier key press.
2009-07-21 12:19:46 +00:00
Ton Roosendaal
ed92105857 2.5
Modal keymaps.

I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.

The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.

Tech doc:

1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
  This only for UI, so user can get information on available options

2) items
- WM_modalkeymap_add_item(): give it an enum value for events

3) activate
- In keymap definition code, assign the modal keymap to operatortype
  WM_modalkeymap_assign()

4) event manager
- The event handler will check for modal keymap, if so:
  - If the modal map has a match:
    - Sets event->type to EVT_MODAL_MAP
    - Sets event->val to the enum value

5) modal handler
- If event type is EVT_MODAL_MAP:
  - Check event->val, handle it
- Other events can just be handled still

Two examples added in the code:

editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()

Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
2009-07-21 11:03:07 +00:00
Brecht Van Lommel
0865bf2959 2.5: python module name for import had trailing "." 2009-07-21 10:40:13 +00:00
Joshua Leung
6d074526f2 2.5 - Restoring Bone Groups
* Added Bone Groups UI to 'Armature' context buttons for now. Later, it may be more convenient to have these with bones instead?

* Added operators for the operations that can be performed on these groups. Moved the core adding/removing functions to blenkernel so that they can be used elsewhere in future if need be.

* Properly wrapped bone groups in RNA. Copied the way that Vertex Groups are wrapped, since they share some similarities. Setting colours for bone groups still needs more work though.
2009-07-21 10:18:08 +00:00
Campbell Barton
0ebf23c0b8 BLI_setenv, use instead of copying ifdefs about for setting env vars.
set PYTHONHOME as well as PYTHONPATH, quiets some warnings.
2009-07-21 09:26:28 +00:00
Joshua Leung
ca466dc8d8 2.5 - Porting 'Pose' Menu (and its submenus) to Layout Engine
It's alarming how many tools are still missing here!
2009-07-21 05:08:59 +00:00
Joshua Leung
93f2743b0f 2.5 - IK Constraint Tools + Constraint Editing Tweaks
* Add/Remove IK now works again using Shift-I and Ctrl-Alt-I as before. The code for this is now located in editconstraint.c for now...

* Adding constraints with automatically added targets works again. It's a relief that the old code still works (with a minor tweak)
2009-07-21 04:21:07 +00:00
Joshua Leung
74fce51841 2.5 - Constraint (Re)Naming
* Names for newly added constraints are now derived from the type of constraint, making it easier to identify the type of constraint

* Fixed crash when renaming constraints (due to invalid pointer being passed for the 'old' string name)
2009-07-21 02:54:02 +00:00
Brecht Van Lommel
22f421a9ee 2.5: Texture buttons preview now has an option to display the
texture, the material, or both side by side.
2009-07-21 01:57:46 +00:00
Brecht Van Lommel
a78ef19054 2.5: UI
* List template visual changes. Items now look different,
  and it expands to size 5 as more items are added.

* Added LISTROW and LISTBOX elements. The former is like
  a typical ROW button, but looks diffrent. The latter
  looks like a BOUNDBOX, and has no extra features yet.
* Fix some glColor3ubv warnings with casting, did not find
  a nicer way.
2009-07-21 01:26:17 +00:00
Brecht Van Lommel
f682de6fd2 RNA
* Added suppport for generating code without verifying with DNA,
  this doesn't give good errors and is more error prone, but makes
  it easier to wrap things like EditBone which are not in DNA.
* RNA_define_verify_sdna(0), and set to 1 again afterwards.
2009-07-21 01:14:55 +00:00
Brecht Van Lommel
1f4fa869e4 2.5: RNA & UI
* Revert lamp sampling/buffers change. The right enum items should
  be defined in RNA, not the layout, so that it works in outliner,
  python api too.
* Also changed type popup to radio buttons again, and removed the
  icons. This is more consistent, and I don't think it's a good idea
  to start using icons for these things, too much clutter.

* Replace Mesh with Normals panel in the mesh buttons.
* Remove Material panel from mesh buttons.
* Added name fields for shape/vgroup/vcol/uv.
* Spacing tweak to Object and Bone names.

* Fix some naming conflicts in RNA, with "name" and "type" properties
  being defined twice in the same struct.

* context.scene.tool_settings -> context.tool_settings.
2009-07-21 00:55:20 +00:00
Brecht Van Lommel
0aebd5f144 2.5: Make shade smooth/flat operators consistent,
and add object mode operators.
2009-07-21 00:36:07 +00:00
Janne Karhu
5fd16476d9 Forgotten file from boids commit. 2009-07-21 00:31:33 +00:00
Brecht Van Lommel
ae10731eb9 2.5: DNA fixes for game engine changes, making it work on 64bit. 2009-07-21 00:30:19 +00:00
Guillermo S. Romero
024cd8c3d8 SVN maintenance. 2009-07-21 00:19:07 +00:00
Janne Karhu
b4353a8443 Initial code for boids v2
Too many new features to list! But here are the biggies:
- Boids can move on air and/or land, or climb a goal object.
- Proper interaction with collision objects.
	* Closest collision object in negative z direction is considered as ground.
	* Other collision objects are obstacles and boids collide with them.
- Boid behavior rules are now added to a dynamic list.
	* Many new rules and many still not implemented.
	* Different rule evaluation modes (fuzzy, random, average).
- Only particle systems defined by per system "boid relations" are considered for simulation of that system.
	* This is in addition to the boids own system of course.
	* Relations define other systems as "neutral", "friend" or "enemy".
- All effectors now effect boid physics, not boid brains.
	* This allows forcing boids somewhere.
	* Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength).
	
Known issue:
- Boid health isn't yet stored in pointcache so simulations with "fight" rule are not be read from cache properly.
- Object/Group visualization object's animation is not played in "particle time". This is definately the wanted behavior, but isn't possible with the current state of dupliobject code.

Other new features:
- Particle systems can now be named separately from particle settings.
	* Default name for particle settings is now "ParticleSettings" instead of "PSys"
- Per particle system list of particle effector weights.
	* Enables different effection strengths for particles from different particle systems with without messing around with effector group setting.

Other code changes:
- KDTree now supports range search as it's needed for new boids.
- "Keyed particle targets" renamed as general "particle targets", as they're needed for boids too. (this might break some files saved with new keyed particles)

Bug fixes:
- Object & group visualizations didn't work.
- Interpolating pointcache didn't do rotation.
2009-07-20 23:52:53 +00:00
Dalai Felinto
01b787636b fix for recent stereo changes+tweaks
(it's the 3rd commit in a row. But as they say, the 3rd is always a charm ;)

I still think we have a little mess with the DEFINE parameters in BGE (as in RAS_IRasterizer::StereoMode).
We used to have them duplicated and hardcoded in 2.4xx, but I think we can do it in another way now.

(I didn't change gameplayer, but I can do it once we have it linking and building properly)
2009-07-20 22:36:56 +00:00
Thomas Dinges
c72064272f 2.5 Lamps:
* Replaced RNA ENUM hacks for "shadow method" and "shadow_ray_sampling_method" with modifications in the layout file.
2009-07-20 20:34:14 +00:00
Dalai Felinto
9a9d118bbf BGE panels: wip
Logic Panel:
- world settings (moved from world)
 ... that includes physic engine selection + gravity
- game player (from gamesettings, it wasn't wrapped)
- stereo/dome (from gamesettings, it wasn't wrapped)
 ... separated stereom into stereoflag and stereomode
- properties
 ... (didn't touch it)

Buttons Game Panel:
(wip panel)
- Physics (moved from Logic Panel)
 ... it will be a datablock in the future (right Campbell ?)
- Material Physics (not currently implemented)
 ... a datablock link to the materials of an object + the dynamic physic variables

* NOTE:
in readfile.c::do_version I couldn't do if(scene->world). There is something wrong with scenes with an unlinked world. So so far we are ignoring the old values....
2009-07-20 20:28:29 +00:00
Campbell Barton
1b7f1bc72d mistake in own recent change, errors with startup scripts didnt raise errors 2009-07-20 20:00:59 +00:00
Thomas Dinges
0b4a6ddf4a 2.5 Notifier:
* Added some missing notifier for 3DView Display settings.
2009-07-20 17:42:40 +00:00
Daniel Genrich
d301d8174c Some little UI adjustments to cloth + fluid panel and their presets 2009-07-20 17:15:41 +00:00
Campbell Barton
587d408f61 patch from William
Cleaned up force fields panel, as well as the other fixes (sculpt, lamps)
2009-07-20 16:39:16 +00:00
Campbell Barton
33bfd7397b BGE Button types panel, can edit existing buttons but not add new ones yet.
World Physics panel too though Im not sure if we'll eventually move this into another struct.
2009-07-20 16:21:55 +00:00
Joshua Leung
cc69f13013 2.5 - Constraints Editing + Keyframe Drawing Tweaks
Constraints:
* Adding constraints with targets should now work. 
-- (When no target is provided, the code to create a new target is not yet in place again yet)
* Constraints can be added in Object and PoseModes again using the Ctrl-Shift-C hotkey. 
* All constraints can now be cleared from the active Object or selected Bones using the Ctrl-Alt-C hotkey.
* Added warnings when adding constraints invalid for the current context, and removed the old add_constraint() function.
* Buttons window updates correctly after adding keyframes now

Keyframes Drawing:
* Removed un-necessary extra function-call for RB-Tree implementation, by inlining a special one-off case.
* Keyframe diamonds which are not within the viewable area are now not drawn (but filtering will still need to find them).
2009-07-20 12:42:31 +00:00
Campbell Barton
8bf9a8cb1e Added error prints if the text's main is not set. 2009-07-20 11:30:27 +00:00
Joshua Leung
ae7e321c8b 2.5 - Fixes to try and let C++ compilers not choke on DNA_anim_types.h 2009-07-20 10:43:41 +00:00
Campbell Barton
4d0a6fee4a cmake option to disable SDL,
bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
2009-07-20 10:24:53 +00:00
Joshua Leung
b76009232e 2.5 - Bugfixes
* Fix for crash when holding down downarrow in the info-header search box. Was caused by badly written poll callback for file-browser. Thanks pidhash for noticing the error

* Made add constraint operators work again from 3D-View. They were using the wrong context pointer when in the 3D-View, since the old one was only valid for the buttons-window. Now they check which window they're in.
2009-07-20 00:02:03 +00:00
Campbell Barton
4e9171e6f6 binreloc wasnt working with cmake. 2009-07-19 19:36:56 +00:00
Campbell Barton
62ffb81316 d_type isnt a member of dirent on win32. 2009-07-19 18:51:25 +00:00
Campbell Barton
979bec79c3 - Support for importing python packages. (directories of python scripts containing an __init__.py)
- BLI_add_slash returns the new string length.
- BLI_where_am_i() would often have /./ in the path (not incorrect but annoying, got into python exceptions)
- release/ui/space_image.py, py error referencing invalid keyword args.
2009-07-19 17:45:14 +00:00
Nicholas Bishop
d410135408 Sculpt+Paint/2.5:
* Moved brush NKEY panel from C to Python. Could use some UI review :)
* Added a NULL check in bpy_internal_import.c, was crashing here on Python errors
* Added RNA for vpaint brush and for weight paint
* Added context for vpaint/wpaint similar to edit_object and sculpt_object
2009-07-19 17:44:44 +00:00
Martin Poirier
8ac67fcd21 Remove unneeded manipulator functions.
Disable manipulator drawing while moving. This still use G.moving, but that's acceptable for now (it's sort of a weird display option, after talk with Ton, we couldn't find a good place to set it).
2009-07-19 17:42:01 +00:00
Ton Roosendaal
20f1fb6a7f 2.5
Bugfix: extrudes failed when called a 2nd time, missing statistics
update. Reported by Sanne in irc, thanks!
2009-07-19 17:14:26 +00:00
Ton Roosendaal
9e047d5acc 2.5
Bugfix: the 'active 3d view layer' was never set, causing issues when
adding new objects. Reported by Martin, thanks!
2009-07-19 16:53:57 +00:00
Campbell Barton
b96a6e1838 issues auto generating rna docs
- add a warning when an operator name is NULL, set it to a dummy name to prevent crash. POSE_OT_constraints_clear had its name commented (not sure why)
- rna_Object_parent_type_itemf wasnt checking for context being NULL, needed for docs else it crashes.
- bpy.ops.add/remove didnt show up in a dir(bpy.ops)
2009-07-19 14:57:20 +00:00
Campbell Barton
d9a7e5144f Python operators
- simplified C operator API bpy.__ops__ since its wrapped by python now.
- needs the class to have an __idname__ rather then __name__ (like menus, headers)
- convert python names "console.exec" into blender names "CONSOLE_OT_exec" when registering (store the blender name as class.__idname_bl__, users scripters wont notice)
- bpy.props.props ???, removed
2009-07-19 13:32:02 +00:00
Joshua Leung
8efdb04817 2.5 - Recode of Add Constraint Operator(s)
Add Constraint operators are now based on the old add_constraint() function (to be removed when the new code works well). 
- Fixed a few bugs with the code, including depsgraph missing rebuild call, and unique-naming for constraints failing due to wrong order for adding constraint to list
- Added capabilities for setting the target of the constraint to the first selected object/bone for the operator when called from menus + hotkeys (but not for buttons window)

This commit is still buggy. I'll fix the remaining issues tomorrow, as well as adding some more operators for IK add/clear.
2009-07-19 13:06:18 +00:00
Ton Roosendaal
f72018ebeb 2.5
Small fix: Triple Buffer mode didn't clip custom paint cursors correctly
for overlapping regions (example, view3d paint circle drawing into toolbar)
2009-07-19 12:15:20 +00:00
Ton Roosendaal
08ef73ab3e 2.5
Requested UI feature: when scaling Blender window, the buttons view keeps
scale (in visible pixels) as previously. Also works for the .B25.blend, which
currently will show the buttons a bit too large for small screens... this 
because the .B25.blend was created on a 1920x1200 screen. Might need a config
inbetween... 1440x1080 or so? Or we make a couple of defaults later.

Additional feature could be to also scale the buttons area itself, but that
will change the entire screen layout too much, potentially giving bad issues
with extremer scaling.
2009-07-19 11:13:15 +00:00
Campbell Barton
1917e951ca py rna arrays were assumed sizeof(char)*len, should be sizeof(int)*len, was causing end of array corruption errors when running operators that took bool array options - transform. 2009-07-19 09:33:27 +00:00
Joshua Leung
8ced84eec9 2.5 - Clear Constraints Operators
Added some operators to clear all constraints on the active object or the selected bones.
2009-07-19 07:20:21 +00:00