2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-07-02 19:41:31 +00:00
|
|
|
import bpy
|
2011-08-12 06:57:00 +00:00
|
|
|
from bpy.types import Panel
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2017-10-21 12:41:42 +11:00
|
|
|
from .properties_physics_common import (
|
|
|
|
point_cache_ui,
|
|
|
|
effector_weights_ui,
|
|
|
|
)
|
2009-08-29 15:20:36 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2017-08-11 14:25:36 +02:00
|
|
|
COMPAT_OB_TYPES = {'MESH', 'LATTICE', 'CURVE', 'SURFACE', 'FONT'}
|
|
|
|
|
|
|
|
|
2009-08-29 15:20:36 +00:00
|
|
|
def softbody_panel_enabled(md):
|
2010-08-18 08:26:18 +00:00
|
|
|
return (md.point_cache.is_baked is False)
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-08-29 15:20:36 +00:00
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class PhysicButtonsPanel:
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "physics"
|
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
ob = context.object
|
2018-04-17 13:35:05 +02:00
|
|
|
return ob and ob.type in COMPAT_OB_TYPES and context.engine in cls.COMPAT_ENGINES and context.soft_body
|
2010-03-13 22:53:03 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body"
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
md = context.soft_body
|
|
|
|
ob = context.object
|
|
|
|
|
2011-11-10 19:10:23 +00:00
|
|
|
softbody = md.settings
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-11-10 19:10:23 +00:00
|
|
|
# General
|
|
|
|
split = layout.split()
|
|
|
|
split.enabled = softbody_panel_enabled(md)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-11-10 19:10:23 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(softbody, "friction")
|
|
|
|
col.prop(softbody, "mass")
|
2014-03-27 07:15:08 +04:00
|
|
|
col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-11-10 19:10:23 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Simulation:")
|
|
|
|
col.prop(softbody, "speed")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2016-07-31 18:56:44 +10:00
|
|
|
layout.prop(softbody, "collision_group")
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Cache"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
md = context.soft_body
|
2010-05-11 20:06:20 +00:00
|
|
|
point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
|
2009-08-02 19:39:33 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Goal"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
softbody = context.soft_body.settings
|
|
|
|
|
|
|
|
self.layout.active = softbody_panel_enabled(context.soft_body)
|
2009-11-23 00:27:30 +00:00
|
|
|
self.layout.prop(softbody, "use_goal", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
md = context.soft_body
|
|
|
|
softbody = md.settings
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
layout.active = softbody.use_goal and softbody_panel_enabled(md)
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
# Goal
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Goal Strengths:")
|
|
|
|
col.prop(softbody, "goal_default", text="Default")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(softbody, "goal_min", text="Minimum")
|
|
|
|
sub.prop(softbody, "goal_max", text="Maximum")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Goal Settings:")
|
|
|
|
col.prop(softbody, "goal_spring", text="Stiffness")
|
|
|
|
col.prop(softbody, "goal_friction", text="Damping")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
|
2009-07-03 20:03:24 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Edges"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
softbody = context.soft_body.settings
|
|
|
|
|
|
|
|
self.layout.active = softbody_panel_enabled(context.soft_body)
|
2009-11-23 00:27:30 +00:00
|
|
|
self.layout.prop(softbody, "use_edges", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
md = context.soft_body
|
|
|
|
softbody = md.settings
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
layout.active = softbody.use_edges and softbody_panel_enabled(md)
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Springs:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(softbody, "pull")
|
|
|
|
col.prop(softbody, "push")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(softbody, "damping")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(softbody, "plastic")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(softbody, "bend")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(softbody, "spring_length", text="Length")
|
2014-03-27 07:15:08 +04:00
|
|
|
col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text="Springs")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(softbody, "use_stiff_quads")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = softbody.use_stiff_quads
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(softbody, "shear")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Aerodynamics:")
|
2010-06-30 02:34:34 +00:00
|
|
|
col.row().prop(softbody, "aerodynamics_type", expand=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(softbody, "aero", text="Factor")
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2010-06-30 02:34:34 +00:00
|
|
|
#sub = col.column()
|
|
|
|
#sub.enabled = softbody.aero > 0
|
2010-07-05 22:22:22 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Collision:")
|
|
|
|
col.prop(softbody, "use_edge_collision", text="Edge")
|
|
|
|
col.prop(softbody, "use_face_collision", text="Face")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Self Collision"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
softbody = context.soft_body.settings
|
|
|
|
|
|
|
|
self.layout.active = softbody_panel_enabled(context.soft_body)
|
2010-08-20 06:09:58 +00:00
|
|
|
self.layout.prop(softbody, "use_self_collision", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
md = context.soft_body
|
|
|
|
softbody = md.settings
|
|
|
|
|
2010-08-20 06:09:58 +00:00
|
|
|
layout.active = softbody.use_self_collision and softbody_panel_enabled(md)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.label(text="Collision Ball Size Calculation:")
|
2017-06-01 16:38:32 +03:00
|
|
|
layout.row().prop(softbody, "collision_type", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Ball:")
|
|
|
|
col.prop(softbody, "ball_size", text="Size")
|
|
|
|
col.prop(softbody, "ball_stiff", text="Stiffness")
|
|
|
|
col.prop(softbody, "ball_damp", text="Dampening")
|
2009-07-03 20:03:24 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Solver"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
md = context.soft_body
|
|
|
|
softbody = md.settings
|
|
|
|
|
|
|
|
layout.active = softbody_panel_enabled(md)
|
|
|
|
|
|
|
|
# Solver
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Step Size:")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(softbody, "step_min")
|
|
|
|
col.prop(softbody, "step_max")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(softbody, "use_auto_step", text="Auto-Step")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(softbody, "error_threshold")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Helpers:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(softbody, "choke")
|
|
|
|
col.prop(softbody, "fuzzy")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.label(text="Diagnostics:")
|
2010-08-20 06:09:58 +00:00
|
|
|
layout.prop(softbody, "use_diagnose")
|
|
|
|
layout.prop(softbody, "use_estimate_matrix")
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Soft Body Field Weights"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
md = context.soft_body
|
|
|
|
softbody = md.settings
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2012-10-10 13:18:07 +00:00
|
|
|
effector_weights_ui(self, context, softbody.effector_weights, 'SOFTBODY')
|
2011-04-04 10:13:04 +00:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
|
|
|
|
classes = (
|
|
|
|
PHYSICS_PT_softbody,
|
|
|
|
PHYSICS_PT_softbody_cache,
|
|
|
|
PHYSICS_PT_softbody_goal,
|
2017-03-20 02:34:32 +11:00
|
|
|
PHYSICS_PT_softbody_edge,
|
|
|
|
PHYSICS_PT_softbody_collision,
|
2017-03-18 20:03:24 +11:00
|
|
|
PHYSICS_PT_softbody_solver,
|
2017-03-20 02:34:32 +11:00
|
|
|
PHYSICS_PT_softbody_field_weights,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|