Commit Graph

16 Commits

Author SHA1 Message Date
Thomas Dinges
04bbb6a0c7 2.5: Layout Python Files:
* Code cleanup.
* Made some files match the code guidelines, should be all now.
Please everybody use them: http://wiki.blender.org/index.php/Dev:Py/Blender2.5/Layouts/Guidelines
* Made polls and header_draw functions as small as possible. 

* Small fixes here and there.
2009-09-01 00:33:39 +00:00
Thomas Dinges
a7689e9b60 2.5 Physic Buttons:
* Some Panels missed the "md" context declaration for the new cloth_panel_enabled(md) check. 
* Code Cleanup.
2009-08-30 21:00:26 +00:00
Janne Karhu
874d38eeb4 Point cache editing:
- Baked point caches for particles, cloth and softbody can now be edited in particle mode.
	* This overwrites the old cloth/sb cache editmode editing.
	* The type of editable system is chosen from a menu.
	* For particles the current particle system and it's current cache are used.
- Currently this only works for caches that are in memory, but some automatic conversion from disk to memory and back can be implemented later.
- All tools from hair editing can't be applied to point caches and are hidden in the tool panel and specials menu. Some functionality like subdividing paths can be later implemented in a slightly different way from how it works for hair.
- Code is not yet optimized for speed, so editing might be slow sometimes.

Known issues:
- Cloth doesn't update properly while in particle mode, due to the way cloth modifier currently works. Daniel can you check on this?
- As "particle mode" is not only for particles any more some other name would be in place?
- Better icons are needed for the path, point, and tip-modes as the current icons from mesh edit mode are quite misleading.
- Direct editing of point velocities is not yet implemented, but will be in the future.

Other changes:
- Hair editing doesn't require a "make editable" button press any more.
- Multiple caches in single particle system disables changing emission properties.
- Unified ui code for all point cache panels.
	* Defined in buttons_particle.py and imported for cloth, smoke & softbody.
- Proper disabling of properties in ui after baking point caches. (Daniel could you please make needed disable code for smoke panels as their functionality is not familiar to me.)
- Hair weight brush has been removed. Once hair dynamics is re-implemented I'll code a more useable alternative to the functionality.

Bug fixes:
- Unlinking particle settings crashed.
- Deleting the active object with particles in the scene crashed.
- Softbody didn't write point caches correctly on save.
2009-08-29 15:20:36 +00:00
William Reynish
8aa6f672ba Moved the autokey mode menu from the timeline header into the timeline menus. Its previous prominent large size made it seem like this setting was very important, when in fact it's a setting you are almost never likely to touch. This helps clean up the main UI. 2009-08-25 12:31:35 +00:00
Campbell Barton
fe0dfc2315 use '' for enums rather then "" 2009-08-22 08:48:01 +00:00
Brecht Van Lommel
990dcd0f7f 2.5:
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.
2009-08-18 12:58:51 +00:00
Thomas Dinges
efc4624e8a 2.5 Physic Buttons:
Patch by nudelZ. Thanks.
* Some layout and code cleanup.
* Made Collision Panel use Modifier Layout with Add/remove Operator.
2009-08-15 14:16:50 +00:00
Janne Karhu
b221c0e2e6 New point cache file format:
- HEADER (beginning of each file)
	* general header:
		+ 8 char: "BPHYSICS"
		+ 1 int: simulation type (same as PTCacheID->type)
	* custom header (same for sb, particles and cloth, but can be different for new dynamics)
		+ 1 int: totpoint (number of points)
		+ 1 int: data_types (bit flags for what the stored data is)
- DATA (directly after header)
	*totpoint times the data as specified in data_types flags

- simulation type
	soft body = 0, particles = 1, cloth = 2
- data types (more can be added easily when needed)
	data		flag		contains
	----------------------------------------
	index		(1<<0)		1 int	(index of current point)
	location	(1<<1)		3 float
	velocity	(1<<2)		3 float
	rotation	(1<<3)		4 float	(quaternion)
	avelocity 	(1<<4)		3 float	(used for particles)
	xconst		(1<<4)		3 float	(used for cloth)
	size		(1<<5)		1 float
	times		(1<<6)		3 float (birth, die & lifetime of particle)
	boids		(1<<7)		1 BoidData
	
Notes:
- Every frame is not nescessary since data is interpolated for the inbetween frames.
- For now every point is needed for every cached frame, the "index" data type is reserved for future usage.
- For loading external particle caches only "location" data is necessary, other needed values are determined from the given data.
- Non-dynamic data should be written into an info file if external usage is desired.
	* Info file is named as normal cache files, but with frame number 0;
	* "Non-dynamic" means data such as particle times.
	* Written automatically when baking to disk so basically a library of particle simulations should be possible.
- Old disk cache format is supported for reading, so pre 2.5 files shouldn't break. However old style memory cache (added during 2.5 development) is not supported. To keep memory cached simulations convert the cache to disk cache before svn update and save the blend.
- External sb and cloth caches should be perfectly possible, but due to lack of testing these are not yet enabled in ui.
	
Other changes:
- Multiple point caches per dynamics system.
	* In the future these will hopefully be nla editable etc, but for now things are simple and the current (selected) point cache is used.
	* Changing the amount of cached points (for example particle count) is allowed, but might not give correct results if multiple caches are present.
- Generalization of point cache baking etc operator & rna code.
- Comb brushing particle hair didn't work smoothly.
2009-08-12 09:54:29 +00:00
Campbell Barton
07ed542187 pedantic changes to python UI scripts
- SOFTBODY -> SOFT_BODY
- Use getattr() with enum value to get the modifier function rather then a lot of elif's
2009-08-06 13:15:23 +00:00
Thomas Dinges
b666f55e0e 2.5 Layout files:
* Removed __idname__ from all panels. 
Note: Operator classes still need that id. Don't remove it there.
2009-07-26 16:31:48 +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
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
Daniel Genrich
d301d8174c Some little UI adjustments to cloth + fluid panel and their presets 2009-07-20 17:15:41 +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
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