Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2009-08-29 19:20:36 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-08-29 19:20:36 +0400
commit874d38eeb401a75f849cc36c7d7b911129c3aa75 (patch)
treef9d1ad815e40cfd27668dae5be83de72b385c650 /release/ui/buttons_physics_smoke.py
parentc03004f93eb94d4af10acaf0b7e8ca7adb097dd0 (diff)
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.
Diffstat (limited to 'release/ui/buttons_physics_smoke.py')
-rw-r--r--release/ui/buttons_physics_smoke.py46
1 files changed, 4 insertions, 42 deletions
diff --git a/release/ui/buttons_physics_smoke.py b/release/ui/buttons_physics_smoke.py
index 3cfba0f9df9..d7313632638 100644
--- a/release/ui/buttons_physics_smoke.py
+++ b/release/ui/buttons_physics_smoke.py
@@ -1,6 +1,8 @@
import bpy
+from buttons_particle import point_cache_ui
+
def smoke_panel_enabled_low(smd):
if smd.smoke_type == 'TYPE_DOMAIN':
return smd.domain.point_cache.baked==False
@@ -139,48 +141,8 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
domain = md.domain_settings
cache = domain.point_cache
- layout.set_context_pointer("PointCache", cache)
-
- row = layout.row()
- row.template_list(cache, "point_cache_list", cache, "active_point_cache_index")
- col = row.column(align=True)
- col.itemO("ptcache.add_new", icon='ICON_ZOOMIN', text="")
- col.itemO("ptcache.remove", icon='ICON_ZOOMOUT', text="")
-
- row = layout.row()
- row.itemR(cache, "name")
-
- row = layout.row()
- row.itemR(cache, "start_frame")
- row.itemR(cache, "end_frame")
-
- row = layout.row()
-
- if cache.baked == True:
- row.itemO("ptcache.free_bake", text="Free Bake")
- else:
- row.item_booleanO("ptcache.bake", "bake", True, text="Bake")
-
- subrow = row.row()
- subrow.enabled = cache.frames_skipped or cache.outdated
- subrow.itemO("ptcache.bake", "bake", False, text="Calculate to Current Frame")
-
- row = layout.row()
- #row.enabled = smoke_panel_enabled(psys)
- row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
-
- row = layout.row()
- #row.enabled = smoke_panel_enabled(psys)
-
- layout.itemL(text=cache.info)
-
- layout.itemS()
-
- row = layout.row()
- row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
- row.itemO("ptcache.free_bake_all", text="Free All Bakes")
- layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
-
+ point_cache_ui(self, cache, cache.baked==False, 0, 1)
+
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
__label__ = "Smoke High Resolution"
__default_closed__ = True