diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-28 19:38:10 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-04-28 19:38:10 +0300 |
commit | c3863650cca233ec3a46d2da1584d402aa8c52e6 (patch) | |
tree | 70fac236a3ee1c6ead7e7d2e9828305a8e1efb4b /release/scripts/startup | |
parent | 1f723603c882e6d79ab69bea6e5c034ae21a6ce7 (diff) |
Removed UI for point cache users.
Diffstat (limited to 'release/scripts/startup')
6 files changed, 7 insertions, 205 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index a5cbffb2e2c..28a8858a61e 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 04cb592a0d1..a3a5c503908 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 87ec206de08..bba13a90aa2 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 4d5ee0c5742..5c98cb45bac 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_adaptive_domain(PhysicButtonsPanel, Panel): layout.active = domain.use_adaptive_domain split = layout.split() - split.enabled = (not domain.point_cache.is_baked) col = split.column(align=True) col.label(text="Resolution:") @@ -240,7 +235,6 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): layout.active = md.use_high_resolution split = layout.split() - split.enabled = not md.point_cache.is_baked col = split.column() col.label(text="Resolution:") @@ -302,10 +296,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): layout.prop(domain, "cache_file_format") - if cache_file_format == 'POINTCACHE': - layout.label(text="Compression:") - layout.prop(domain, "point_cache_compress_type", expand=True) - elif cache_file_format == 'OPENVDB': + if cache_file_format == 'OPENVDB': if not bpy.app.build_options.openvdb: layout.label("Built without OpenVDB support") return @@ -316,9 +307,6 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): row.label("Data Depth:") row.prop(domain, "data_depth", expand=True, text="Data Depth") - cache = domain.point_cache - point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE') - class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): bl_label = "Smoke Field Weights" diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index e74cac3d06b..32f220ce7c1 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -21,15 +21,10 @@ import bpy from bpy.types import Panel from bl_ui.properties_physics_common import ( - point_cache_ui, effector_weights_ui, ) -def softbody_panel_enabled(md): - return (md.point_cache.is_baked is False) - - class PhysicButtonsPanel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -55,7 +50,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): # General split = layout.split() - split.enabled = softbody_panel_enabled(md) col = split.column() col.label(text="Object:") @@ -68,15 +62,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): col.prop(softbody, "speed") -class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): - bl_label = "Soft Body Cache" - bl_options = {'DEFAULT_CLOSED'} - - def draw(self, context): - md = context.soft_body - point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY') - - class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): bl_label = "Soft Body Goal" bl_options = {'DEFAULT_CLOSED'} @@ -84,7 +69,6 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): def draw_header(self, context): softbody = context.soft_body.settings - self.layout.active = softbody_panel_enabled(context.soft_body) self.layout.prop(softbody, "use_goal", text="") def draw(self, context): @@ -94,7 +78,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel): softbody = md.settings ob = context.object - layout.active = softbody.use_goal and softbody_panel_enabled(md) + layout.active = softbody.use_goal split = layout.split() @@ -123,7 +107,6 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): def draw_header(self, context): softbody = context.soft_body.settings - self.layout.active = softbody_panel_enabled(context.soft_body) self.layout.prop(softbody, "use_edges", text="") def draw(self, context): @@ -133,7 +116,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel): softbody = md.settings ob = context.object - layout.active = softbody.use_edges and softbody_panel_enabled(md) + layout.active = softbody.use_edges split = layout.split() @@ -172,7 +155,6 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): def draw_header(self, context): softbody = context.soft_body.settings - self.layout.active = softbody_panel_enabled(context.soft_body) self.layout.prop(softbody, "use_self_collision", text="") def draw(self, context): @@ -181,7 +163,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel): md = context.soft_body softbody = md.settings - layout.active = softbody.use_self_collision and softbody_panel_enabled(md) + layout.active = softbody.use_self_collision layout.label(text="Collision Ball Size Calculation:") layout.prop(softbody, "collision_type", expand=True) @@ -203,8 +185,6 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel): md = context.soft_body softbody = md.settings - layout.active = softbody_panel_enabled(md) - # Solver split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 069b27701c8..7b7e2367a42 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -27,7 +27,6 @@ from bpy.types import ( from rna_prop_ui import PropertyPanel from bl_ui.properties_physics_common import ( - point_cache_ui, effector_weights_ui, ) @@ -371,24 +370,6 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): col.prop(rbw, "solver_iterations", text="Solver Iterations") -class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): - bl_label = "Rigid Body Cache" - bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER'} - - @classmethod - def poll(cls, context): - rd = context.scene.render - scene = context.scene - return scene and scene.rigidbody_world and (rd.engine in cls.COMPAT_ENGINES) - - def draw(self, context): - scene = context.scene - rbw = scene.rigidbody_world - - point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY') - - class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): bl_label = "Rigid Body Field Weights" bl_options = {'DEFAULT_CLOSED'} |