[Bf-blender-cvs] [c386365] temp_remove_pointcache: Removed UI for point cache users.

Lukas Tönne noreply at git.blender.org
Fri Apr 29 15:04:29 CEST 2016


Commit: c3863650cca233ec3a46d2da1584d402aa8c52e6
Author: Lukas Tönne
Date:   Thu Apr 28 18:38:10 2016 +0200
Branches: temp_remove_pointcache
https://developer.blender.org/rBc3863650cca233ec3a46d2da1584d402aa8c52e6

Removed UI for point cache users.

===================================================================

M	release/scripts/startup/bl_ui/properties_physics_cloth.py
M	release/scripts/startup/bl_ui/properties_physics_common.py
M	release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M	release/scripts/startup/bl_ui/properties_physics_smoke.py
M	release/scripts/startup/bl_ui/properties_physics_softbody.py
M	release/scripts/startup/bl_ui/properties_scene.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index a5cbffb..28a8858 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -21,15 +21,10 @@ import bpy
 from bpy.types import Menu, Panel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
 
-def cloth_panel_enabled(md):
-    return md.point_cache.is_baked is False
-
-
 class CLOTH_MT_presets(Menu):
     bl_label = "Cloth Presets"
     preset_subdir = "cloth"
@@ -61,8 +56,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
 
         split = layout.split()
 
-        split.active = cloth_panel_enabled(md)
-
         col = split.column()
 
         col.label(text="Presets:")
@@ -110,15 +103,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
             col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
 
 
-class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
-    bl_label = "Cloth Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        md = context.cloth
-        point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
-
-
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Collision"
     bl_options = {'DEFAULT_CLOSED'}
@@ -126,7 +110,6 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
     def draw_header(self, context):
         cloth = context.cloth.collision_settings
 
-        self.layout.active = cloth_panel_enabled(context.cloth)
         self.layout.prop(cloth, "use_collision", text="")
 
     def draw(self, context):
@@ -136,7 +119,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
         md = context.cloth
         ob = context.object
 
-        layout.active = cloth.use_collision and cloth_panel_enabled(md)
+        layout.active = cloth.use_collision
 
         split = layout.split()
 
@@ -165,7 +148,6 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
     def draw_header(self, context):
         cloth = context.cloth.settings
 
-        self.layout.active = cloth_panel_enabled(context.cloth)
         self.layout.prop(cloth, "use_stiffness_scale", text="")
 
     def draw(self, context):
@@ -175,7 +157,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
         ob = context.object
         cloth = context.cloth.settings
 
-        layout.active = (cloth.use_stiffness_scale and cloth_panel_enabled(md))
+        layout.active = cloth.use_stiffness_scale
 
         split = layout.split()
 
@@ -197,7 +179,6 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
     def draw_header(self, context):
         cloth = context.cloth.settings
 
-        self.layout.active = cloth_panel_enabled(context.cloth)
         self.layout.prop(cloth, "use_sewing_springs", text="")
 
     def draw(self, context):
@@ -207,7 +188,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
         ob = context.object
         cloth = context.cloth.settings
 
-        layout.active = (cloth.use_sewing_springs and cloth_panel_enabled(md))
+        layout.active = cloth.use_sewing_springs
 
         layout.prop(cloth, "sewing_force_max", text="Sewing Force")
 
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 04cb592..a3a5c50 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -97,111 +97,6 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
                             'CONSTRAINT')  # RB_TODO needs better icon
 
 
-# cache-type can be 'CLOTH', 'SMOKE' etc
-
-def point_cache_ui(self, context, cache, enabled, cachetype):
-    layout = self.layout
-
-    layout.context_pointer_set("point_cache", cache)
-
-    if not cachetype == 'RIGID_BODY':
-        row = layout.row()
-        row.template_list("UI_UL_list", "point_caches", cache, "point_caches",
-                          cache.point_caches, "active_index", rows=1)
-        col = row.column(align=True)
-        col.operator("ptcache.add", icon='ZOOMIN', text="")
-        col.operator("ptcache.remove", icon='ZOOMOUT', text="")
-
-    row = layout.row()
-    if cachetype == 'SMOKE':
-        row.prop(cache, "use_external")
-        row.prop(cache, "use_library_path", "Use Lib Path")
-
-    if cache.use_external:
-        split = layout.split(percentage=0.35)
-        col = split.column()
-        col.label(text="Index Number:")
-        col.label(text="File Path:")
-
-        col = split.column()
-        col.prop(cache, "index", text="")
-        col.prop(cache, "filepath", text="")
-
-        cache_info = cache.info
-        if cache_info:
-            layout.label(text=cache_info)
-    else:
-        if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
-            if not bpy.data.is_saved:
-                layout.label(text="Cache is disabled until the file is saved")
-                layout.enabled = False
-
-    if not cache.use_external or cachetype == 'SMOKE':
-        row = layout.row(align=True)
-
-        if cachetype != 'DYNAMIC_PAINT':
-            row.enabled = enabled
-            row.prop(cache, "frame_start")
-            row.prop(cache, "frame_end")
-        if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
-            row.prop(cache, "frame_step")
-
-        if cachetype != 'SMOKE':
-            layout.label(text=cache.info)
-
-        can_bake = True
-
-        if cachetype not in {'SMOKE', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
-            split = layout.split()
-            split.enabled = enabled and bpy.data.is_saved
-
-            col = split.column()
-            col.prop(cache, "use_disk_cache")
-
-            col = split.column()
-            col.active = cache.use_disk_cache
-            col.prop(cache, "use_library_path", "Use Lib Path")
-
-            row = layout.row()
-            row.enabled = enabled and bpy.data.is_saved
-            row.active = cache.use_disk_cache
-            row.label(text="Compression:")
-            row.prop(cache, "compression", expand=True)
-
-            layout.separator()
-
-            if cache.id_data.library and not cache.use_disk_cache:
-                can_bake = False
-
-                col = layout.column(align=True)
-                col.label(text="Linked object baking requires Disk Cache to be enabled", icon='INFO')
-        else:
-            layout.separator()
-
-        split = layout.split()
-        split.active = can_bake
-
-        col = split.column()
-
-        if cache.is_baked is True:
-            col.operator("ptcache.free_bake", text="Free Bake")
-        else:
-            col.operator("ptcache.bake", text="Bake").bake = True
-
-        sub = col.row()
-        sub.enabled = (cache.is_frame_skip or cache.is_outdated) and enabled
-        sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
-
-        sub = col.column()
-        sub.enabled = enabled
-        sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
-
-        col = split.column()
-        col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
-        col.operator("ptcache.free_bake_all", text="Free All Bakes")
-        col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
-
-
 def effector_weights_ui(self, context, weights, weight_type):
     layout = self.layout
 
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 87ec206..bba13a9 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -21,7 +21,6 @@ import bpy
 from bpy.types import Panel, UIList
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
@@ -386,28 +385,6 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
             row.prop(surface, "shrink_speed")
 
 
-class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
-    bl_label = "Dynamic Paint Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        md = context.dynamic_paint
-        rd = context.scene.render
-        return (md and
-                md.ui_type == 'CANVAS' and
-                md.canvas_settings and
-                md.canvas_settings.canvas_surfaces.active and
-                md.canvas_settings.canvas_surfaces.active.is_cache_user and
-                (not rd.use_game_engine))
-
-    def draw(self, context):
-        surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
-        cache = surface.point_cache
-
-        point_cache_ui(self, context, cache, (cache.is_baked is False), 'DYNAMIC_PAINT')
-
-
 class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Source"
 
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 4d5ee0c..5c98cb4 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -21,7 +21,6 @@ import bpy
 from bpy.types import Panel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
@@ -54,8 +53,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
 
             split = layout.split()
 
-            split.enabled = not domain.point_cache.is_baked
-
             col = split.column()
             col.label(text="Resolution:")
             col.prop(domain, "resolution_max", text="Divisions")
@@ -169,7 +166,6 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
         domain = context.smoke.domain_settings
 
         split = layout.split()
-        split.enabled = not domain.point_cache.is_baked
 
         col = split.column(align=True)
         col.label(text="Reaction:")
@@ -205,7 +201,6 @@ class PHYSICS_PT_smoke_ada

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list