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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-08-06 13:25:24 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-08-06 13:45:03 +0300
commit9843921288307be33fc39450586ff9ad226829a1 (patch)
treede6e0ddd71b48d036bf5525e62edf10a57d3238e /release/scripts/startup/bl_ui/properties_physics_cloth.py
parent4571fdde0ecfdebac6a9374364b05be74233aca5 (diff)
parent28c3bdf50bd62b510fdbd88a5dcb1c40f8726c20 (diff)
Merge branch 'master' into blender2.8
Conflicts: release/scripts/startup/bl_ui/properties_particle.py release/scripts/startup/bl_ui/properties_physics_cloth.py release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py release/scripts/startup/bl_ui/properties_physics_softbody.py source/blender/blenkernel/BKE_library.h source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/cloth.c source/blender/blenkernel/intern/library.c source/blender/blenkernel/intern/library_query.c source/blender/blenkernel/intern/particle_system.c source/blender/blenkernel/intern/scene.c source/blender/blenkernel/intern/softbody.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/versioning_270.c source/blender/editors/space_file/filesel.c source/blender/editors/space_outliner/outliner_intern.h source/blender/makesdna/DNA_ID.h source/blender/makesdna/DNA_object_force.h source/blender/makesdna/DNA_particle_types.h source/blender/makesrna/intern/rna_particle.c source/blender/makesrna/intern/rna_sculpt_paint.c source/blender/makesrna/intern/rna_smoke.c source/blender/makesrna/intern/rna_space.c
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_cloth.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py64
1 files changed, 50 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 28a8858a61e..0362cc42371 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -25,6 +25,11 @@ from bl_ui.properties_physics_common import (
)
+def cloth_panel_enabled(md):
+ return True
+ #return md.point_cache.is_baked is False
+
+
class CLOTH_MT_presets(Menu):
bl_label = "Cloth Presets"
preset_subdir = "cloth"
@@ -41,11 +46,12 @@ class PhysicButtonsPanel:
def poll(cls, context):
ob = context.object
rd = context.scene.render
- return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth)
+ return (ob and ob.type == 'MESH') and (rd.engine in cls.COMPAT_ENGINES) and (context.cloth)
class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
bl_label = "Cloth"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@@ -54,18 +60,31 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
ob = context.object
cloth = md.settings
- split = layout.split()
+ layout.active = cloth_panel_enabled(md)
+
+ split = layout.split(percentage=0.25)
col = split.column()
- col.label(text="Presets:")
- sub = col.row(align=True)
+ split.label(text="Presets:")
+ sub = split.row(align=True)
sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
sub.operator("cloth.preset_add", text="", icon='ZOOMIN')
sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True
- col.label(text="Quality:")
- col.prop(cloth, "quality", text="Steps", slider=True)
+ split = layout.split(percentage=0.25)
+
+ split.label(text="Quality:")
+ split.prop(cloth, "quality", text="Steps")
+
+ split = layout.split(percentage=0.25)
+
+ split.label(text="Speed:")
+ split.prop(cloth, "time_scale", text="Multiplier")
+
+ split = layout.split()
+
+ col = split.column()
col.label(text="Material:")
col.prop(cloth, "mass")
@@ -79,7 +98,11 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
col.prop(cloth, "air_damping", text="Air")
col.prop(cloth, "vel_damping", text="Velocity")
- col.prop(cloth, "use_pin_cloth", text="Pinning")
+ split = layout.split()
+
+ col = split.column()
+
+ col.prop(cloth, "use_pin_cloth", text="Pinning:")
sub = col.column()
sub.active = cloth.use_pin_cloth
sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
@@ -96,20 +119,28 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
col.prop(cloth, "goal_friction", text="Friction")
"""
+ col = split.column()
+
+ col.prop(cloth, "use_dynamic_mesh", text="Dynamic Mesh")
+
key = ob.data.shape_keys
if key:
- col.label(text="Rest Shape Key:")
- col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
+ sub = col.column()
+ sub.active = not cloth.use_dynamic_mesh
+ sub.label(text="Rest Shape Key:")
+ sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
bl_label = "Cloth Collision"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
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):
@@ -119,12 +150,12 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
md = context.cloth
ob = context.object
- layout.active = cloth.use_collision
+ layout.active = cloth.use_collision and cloth_panel_enabled(md)
split = layout.split()
col = split.column()
- col.prop(cloth, "collision_quality", slider=True, text="Quality")
+ col.prop(cloth, "collision_quality", text="Quality")
col.prop(cloth, "distance_min", slider=True, text="Distance")
col.prop(cloth, "repel_force", slider=True, text="Repel")
col.prop(cloth, "distance_repel", slider=True, text="Repel Distance")
@@ -134,7 +165,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
col.prop(cloth, "use_self_collision", text="Self Collision")
sub = col.column()
sub.active = cloth.use_self_collision
- sub.prop(cloth, "self_collision_quality", slider=True, text="Quality")
+ sub.prop(cloth, "self_collision_quality", text="Quality")
sub.prop(cloth, "self_distance_min", slider=True, text="Distance")
sub.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="")
@@ -144,10 +175,12 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
bl_label = "Cloth Stiffness Scaling"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
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):
@@ -157,7 +190,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
ob = context.object
cloth = context.cloth.settings
- layout.active = cloth.use_stiffness_scale
+ layout.active = (cloth.use_stiffness_scale and cloth_panel_enabled(md))
split = layout.split()
@@ -175,10 +208,12 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
bl_label = "Cloth Sewing Springs"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
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):
@@ -188,7 +223,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
ob = context.object
cloth = context.cloth.settings
- layout.active = cloth.use_sewing_springs
+ layout.active = (cloth.use_sewing_springs and cloth_panel_enabled(md))
layout.prop(cloth, "sewing_force_max", text="Sewing Force")
@@ -207,6 +242,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
bl_label = "Cloth Field Weights"
bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
cloth = context.cloth.settings