forked from bartvdbraak/blender
Fix T52344: Softbody on Text.
Own previous fix (rBd5d626df236b) was not valid, curves are actually supported by SoftBodies. It was rather a mere UI bug, which was not including Surfaces and Font obect types in those valid for softbody UI. Thanks to @brecht for the head up! Also, fix safe for 2.79, btw.
This commit is contained in:
parent
2e25754ecd
commit
31be0a6e52
@ -79,7 +79,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
||||
|
||||
col = split.column()
|
||||
|
||||
if obj.type in {'MESH', 'LATTICE', 'CURVE'}:
|
||||
if obj.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}:
|
||||
physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True)
|
||||
|
||||
if obj.type == 'MESH':
|
||||
|
@ -26,6 +26,9 @@ from bl_ui.properties_physics_common import (
|
||||
)
|
||||
|
||||
|
||||
COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}
|
||||
|
||||
|
||||
def softbody_panel_enabled(md):
|
||||
return (md.point_cache.is_baked is False)
|
||||
|
||||
@ -39,7 +42,7 @@ class PhysicButtonsPanel:
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
rd = context.scene.render
|
||||
return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (rd.engine in cls.COMPAT_ENGINES) and (context.soft_body)
|
||||
return ob and ob.type in COMPAT_OB_TYPES and rd.engine in cls.COMPAT_ENGINES and context.soft_body
|
||||
|
||||
|
||||
class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
|
||||
|
@ -100,7 +100,8 @@ ModifierTypeInfo modifierType_Softbody = {
|
||||
/* structName */ "SoftbodyModifierData",
|
||||
/* structSize */ sizeof(SoftbodyModifierData),
|
||||
/* type */ eModifierTypeType_OnlyDeform,
|
||||
/* flags */ eModifierTypeFlag_AcceptsLattice |
|
||||
/* flags */ eModifierTypeFlag_AcceptsCVs |
|
||||
eModifierTypeFlag_AcceptsLattice |
|
||||
eModifierTypeFlag_RequiresOriginalData |
|
||||
eModifierTypeFlag_Single,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user