Commit Graph

225 Commits

Author SHA1 Message Date
Brecht Van Lommel
f24bcac43e 2.5: Various Fixes
* Fix crash loading particle AnimData. This crashed many BBB
  files. If you have a .blend file that crashes when loading
  it in 2.5, please mail me, I'd like to know.

* Image window zoom ratio did not work correct with py 2.x.
* Other minor fixes for image window RNA.

* Buttons window now remembers the tab that was last clicked
  by the user, even if that tab is no longer available due
  to context, and then enable the tab again if the context
  for it is back.
* Cleaned up buttons space DNA a bit, removing unused vars.

* Armature bone rename outside edit mode did not call right
  function yet.
* Armature layers are now editable even if lib linked. This
  is useful for proxies. For this purpose a PROP_LIB_EXCEPTION
  flag was added. Need to think over proxy / RNA a bit though,
  not sure what the requirements are yet.
* Parent to Armature Deform now has options to create vertex
  groups, instead of always creating them.
2009-07-24 16:41:12 +00:00
William Reynish
ad6aaeb319 Resized the preferences window to 800 px. This makes proper space for the header button text. Merged File Paths and Autosave preference tabs to one 'File' item. This makes the number of items inside the tabs more even and makes text in the tabs easier to read when the window is narrower.
Also added weight paint ramp.
2009-07-24 14:30:40 +00:00
Ton Roosendaal
2f8a19e5bc 2.5
Related to previous commit:
- new file menu option "user prefs"
- removed 'save user pref' confirmation menu
2009-07-24 12:45:25 +00:00
William Reynish
bd628d9c0c UI
Added cursor location to the view panel in 3D view. 

Removed the Shade Smooth/Flat buttons from mesh data for two reasons:  

These kinds of tools are more appropriate in the tools area, and the context would not always match the selected datablock, if you have multiple objects selected, or if you're viewing the mesh data tab in 'pinned' mode.
The shade smooth/flat buttons are in the edit mode tools area now.
2009-07-24 11:48:45 +00:00
William Reynish
87f3ba8a80 Toolbar
Improved the brush tools UI and added a bunch of brush controls. There seems to be some RNA magic missing for texture paint to work, so that's empty for now. Added tablet pressure buttons, which needs a new icon.

Added a bunch of tools in a categorized fashion for all edit modes. Need to figure out what to do for vert/edge/face specific tools - perhaps it could detect the mode setting and show most appropriate tools for each mode.
2009-07-24 11:14:59 +00:00
Brecht Van Lommel
366a64959c 2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.

* Top header now has an engine menu, to choose between the blender
  render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
  only properties that work in the game engine, and similarly for
  the render engine.
* Moved panels from the logic space and game tabs to the physics,
  scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
  specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
Brecht Van Lommel
1ee8038e41 2.5: Top Menu
* Clean up File menu, added back recover last session op.
* .blend compress now behaves a bit different, previously
  it would only respect the user preference. Now it saves
  existing files the same way they are saved, and new files
  following the user preference. The save operator has a
  Compress toggle in the file browser left panels now.

* Add menu working again, some fixes to make these operators
  work outside the 3d view were needed.
* Timeline menu removed, its contents will be moved to the
  timeline header menus.
* Game menu can now start game, changed the start game op
  to choose another 3d view if none is available.
* Render menu has a few items now.
* Help menu contains a few links again.
2009-07-23 21:35:11 +00:00
William Reynish
580b527854 Various layout tweaks. Improved game buttons, made minor adjustments to lamp, scene and fluids. 2009-07-23 14:35:20 +00:00
Campbell Barton
712298abd2 autocomplete wasn't working 2009-07-23 12:31:45 +00:00
Janne Karhu
17a9b3e44c External cache
Particle point cache can now be loaded from external files.
- Activated by "external" checkbox in cache panel and giving proper folder path and file name identifier.
- External cache panel has controls for particle emission start, end, lifetime and random lifetime. These should be set according to the external data for correct playback.
- External files should be named "identifier_frame_index.bphys" or "identifier_frame.bphys" where:
	* "identifier" is a freely choseable name.
	* "frame" is the cached frame number.
		** Six digits padded with zeros!, for example "000024".
	* "index" can be used to tell caches with the same identifier apart.
		** Two digits starting from zero.
		** The index and the underscore before are optional. If no index is present the index number in ui should be set to -1.
- Cache file format is pure floating point numbers (in binary, not text!) with each particle's data one after the other with the following data members:
	* 3 floats: particle's location vector
	* 3 floats: particle's velocity vector (per second)
	* 4 floats: particle's rotation quaternion
	* 3 floats: particle's angular velocity vector (per second)
	* 1 float: frame of the actual data (this can be non-integer for particles that are born or die between two integer frames, but otherwise should be the same as the "frame" in the file name)
- Cache files don't have to exist for each frame.
	* Frames without actual data are interpolated from surrounding frames that have data (extrapolation is not supported).
- Cache file formats with extended (or reduced even) data members are in future plans for easier usage.
- Current code only does particles, don't yet know if it's applicable to cloth or sb.
- Known issue: endianness can't yet be handled in any way.

Other changes:

New hard limits for many particle parameters. Some examples:
- Maximum amount of particles: 10M particles :) And before you all go and crash your Blender trying this out remember that this limit is only for those freaks who really have the machine power to handle it. 10M particles alone take around 2.2 Gb of memory / disk space in saved file and each cached frame takes around 0.5 Gb of memory / disk space depending on cache mode.
	* Known issue: To actually use this many particles they most likely need to be allocated in parts as taking hold of a 2.2Gb chunk of memory at once is probably not ok with any operating system.
- Maximum amount of children: 100k children/particle (1T childparticles here we come :D)
- Kink frequency: -100k to 100k half-rotations (really strange the previous limit was only from zero upwards)
- Path draw steps: 10 (power of 2 remember)
- Path render steps: 20 (power of 2 also!! If over 1M segments doesn't get you smooth paths then I think nothing will!)
2009-07-23 00:19:01 +00:00
Brecht Van Lommel
c354ea0ef1 2.5: Render
This adds a RenderEngine type to RNA, which can be subclassed
in python (c++ will follow once we support subclassing there).
It's very basic, but plugs into the pipeline nicely. Two example
scripts:

http://www.pasteall.org/6635/python
http://www.pasteall.org/6636/python

Issues:
* Render runs in a separate thread, and there is unrestricted
  access, so it's possible to crash blender with unsafe access.
* Save buffers and full sample are not supported yet.
2009-07-21 20:28:32 +00:00
Campbell Barton
e4b7997277 py console wasnt working since r21743 2009-07-21 15:52:15 +00:00
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
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
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
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
William Reynish
5cd5e85143 Cleaned up logic buttons in logic space slightly.
Moved Shade Smooth/Flat from Mesh obdata panel to tools area. These kinds of operator tools aren't really allowed in the buttons window anymore - whole point of new tools area :)
The only operators that are allowed in buttons window are things that act on the RNA fields, like add/remove buttons for adding vertex groups etc.
2009-07-21 09:35:39 +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
6dfec894f9 2.5: Lamp button layout improvements by nudelZ. 2009-07-21 01:52:05 +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
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
William Reynish
a3366cb8f0 UI layouts
Changed order of panels in scene buttons to better follow order of importance, putting the post-processing options further down.

Cleaned up game physics properties
2009-07-20 21:31:32 +00:00
Dalai Felinto
bb0eab7f93 fix from last commit.
I thought """ """ could be used everywhere to make comments in python
2009-07-20 20:42:13 +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
William Reynish
e43c425e8c Ok, first commit! Hope this goes ok.
Added the Turbidity parameter to the Sky panel in lamp buttons, since it affects sky as well as atmosphere.
2009-07-20 17:59:45 +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
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
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
Daniel Genrich
26ec00d567 First version of fields panel.
Please keep in mind: I am no python expert and may have some ugly layout-tricks in this file. GUI designed by nudelZ. 
Commit approved by William ;-)
2009-07-19 11:28:43 +00:00
Nicholas Bishop
036c0012e6 Sculpt/2.5:
* Added pointer RNA for the sculpt brush
* Converted sculpt settings panel (in the NKEY area) from C to Python
* For Python UI, needed context for whether sculpt is enabled or not; discussed this with Brecht and added sculpt_object to scene context
2009-07-19 01:55:21 +00:00
Campbell Barton
d7564761c0 operator macro playback (run operator reports in the console)
- reports can be selected with RMB, Border (bkey) and (de)select all.
- delete reports (X key)
- run operators in the console (R key)
- copy reports (Ctrl+C), can be pasted in the text editor an run with alt+p

Details
- Added "selected_editable_objects" and "selected_editable_bases" to screen_context.c, use the scene layers, this was needed for duplicate to run outside the 3D view.
- RNA_property_as_string converted an array of 1 into "(num)" need a comma so python sees it as a tuple - "(num,)"
- add flag to reports, use for seletion atm.

opens a new world of context bugs :)
2009-07-19 00:49:44 +00:00
Campbell Barton
ffdd2d12ce patch from oxben (Benjamin)
* fixes two typos in the material buttons: "Recieve" -> "Receive"
* adds a missing preference in the User Preferences view: "Rotate Around Selected"
2009-07-18 04:09:23 +00:00
Campbell Barton
802ca7f639 patch from William, adds some rna user prefs and adjusts prefs UI. 2009-07-17 12:35:57 +00:00
Campbell Barton
a705f64245 python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api.

bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()

eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")

For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.

bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__

personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
2009-07-17 12:26:40 +00:00
Matt Ebb
1ef7293585 Colour Management
- 1st stage: Linear Workflow

This implements automatic linear workflow in Blender's renderer. With the 
new Colour Management option on in the Render buttons, all inputs to the 
renderer and compositor are converted to linear colour space before 
rendering, and gamma corrected afterwards. In essence, this makes all 
manual gamma correction with nodes, etc unnecessary, since it's done 
automatically through the pipeline.

It's all explained much better in the notes/doc here, so please have a look:
http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture/Colour_Management

And an example of the sort of difference it makes:
http://mke3.net/blender/devel/rendering/b25_colormanagement_test01.jpg

This also enables Colour Management in the default B.blend, and changes the 
default lamp falloff to inverse square, which is more correct, and much 
easier to use now it's all gamma corrected properly.

Next step is to look into profiles/soft proofing for the compositor.

Thanks to brecht for reviewing and fixing some oversights!
2009-07-17 02:43:15 +00:00
Campbell Barton
70f6255433 bpy rna
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently
- now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given.
- calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int).
- store the number of parameters ParameterList
- python exception types were wrong in many cases, (using attribute error rather then type error)
- fixes to small errors in python UI scripts.
2009-07-17 02:31:28 +00:00
Campbell Barton
ef28383ab9 grr, py 2.5 2.6 and 3.x need different StringIO's 2009-07-16 23:04:29 +00:00
Campbell Barton
deb180e37f - Scrollbars for the console (use View2D functions)
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
2009-07-16 22:47:27 +00:00
Guillermo S. Romero
9eebb2ca36 SVN maintenance. 2009-07-16 22:06:04 +00:00
Daniel Genrich
37d33d0b76 2.5 UI: Renaming cloth UI file to fit naming scheme 2009-07-16 21:22:52 +00:00
Daniel Genrich
730f319130 Another fluid + (little) cloth gui and settings update 2009-07-16 14:31:32 +00:00
Joshua Leung
9f2a13b263 2.5 - User Preferences Layout patch from William
Screenshot here:
http://www.reynish.com/files/blender25/userprefs_layout.png
2009-07-16 10:32:21 +00:00