diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_common.py | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index b821b20a1ae..46cb7d0761f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -30,8 +30,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): - rd = context.scene.render - return (context.object) and rd.engine in cls.COMPAT_ENGINES + return (context.object) and context.engine in cls.COMPAT_ENGINES def physics_add(self, layout, md, name, type, typeicon, toggles): @@ -57,7 +56,7 @@ def physics_add_special(self, layout, data, name, addop, removeop, typeicon): class PHYSICS_PT_add(PhysicButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} - COMPAT_ENGINES = {'BLENDER_RENDER'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} def draw(self, context): obj = context.object @@ -140,14 +139,16 @@ def point_cache_ui(self, context, cache, enabled, cachetype): layout.enabled = False if not cache.use_external or cachetype == 'SMOKE': - row = layout.row(align=True) + col = layout.column(align=True) + col.use_property_split = True if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}: - row.enabled = enabled - row.prop(cache, "frame_start") - row.prop(cache, "frame_end") + + col.enabled = enabled + col.prop(cache, "frame_start", text="Simulation Start") + col.prop(cache, "frame_end") if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT', 'RIGID_BODY'}: - row.prop(cache, "frame_step") + col.prop(cache, "frame_step") if cachetype != 'SMOKE': layout.label(text=cache.info) @@ -207,9 +208,12 @@ def point_cache_ui(self, context, cache, enabled, cachetype): def effector_weights_ui(self, context, weights, weight_type): layout = self.layout + layout.use_property_split = True layout.prop(weights, "group") + layout.use_property_split = False + split = layout.split() split.prop(weights, "gravity", slider=True) @@ -241,12 +245,10 @@ def effector_weights_ui(self, context, weights, weight_type): def basic_force_field_settings_ui(self, context, field): layout = self.layout - split = layout.split() - if not field or field.type == 'NONE': return - col = split.column() + col = layout.column() if field.type == 'DRAG': col.prop(field, "linear_drag", text="Linear") @@ -266,10 +268,10 @@ def basic_force_field_settings_ui(self, context, field): else: col.prop(field, "flow") - col = split.column() + col = layout.column() sub = col.column(align=True) sub.prop(field, "noise") - sub.prop(field, "seed") + sub.prop(field, "seed", text="Noise Seed") if field.type == 'TURBULENCE': col.prop(field, "use_global_coords", text="Global") elif field.type == 'HARMONIC': @@ -277,46 +279,34 @@ def basic_force_field_settings_ui(self, context, field): if field.type == 'FORCE': col.prop(field, "use_gravity_falloff", text="Gravitation") - split = layout.split() - - col = split.column() - col.label(text="Effect point:") + col.label(text="Effect point") col.prop(field, "apply_to_location") col.prop(field, "apply_to_rotation") - col = split.column() - col.label(text="Collision:") + col.label(text="Collision") col.prop(field, "use_absorption") def basic_force_field_falloff_ui(self, context, field): layout = self.layout - split = layout.split(percentage=0.35) - if not field or field.type == 'NONE': return - col = split.column() - col.prop(field, "z_direction", text="") + col = layout.column() + col.prop(field, "z_direction") - col = split.column() col.prop(field, "falloff_power", text="Power") - split = layout.split() - col = split.column() - row = col.row(align=True) - row.prop(field, "use_min_distance", text="") - sub = row.row(align=True) + col.prop(field, "use_min_distance", text="Min Min Distance") + sub = col.column(align=True) sub.active = field.use_min_distance - sub.prop(field, "distance_min", text="Minimum") + sub.prop(field, "distance_min", text="Min Distance") - col = split.column() - row = col.row(align=True) - row.prop(field, "use_max_distance", text="") - sub = row.row(align=True) + col.prop(field, "use_max_distance", text="Use Max Distance") + sub = col.column(align=True) sub.active = field.use_max_distance - sub.prop(field, "distance_max", text="Maximum") + sub.prop(field, "distance_max", text="Max Distance") classes = ( |