diff options
Diffstat (limited to 'release')
36 files changed, 834 insertions, 302 deletions
diff --git a/release/datafiles/fonts/droidsans.ttf.gz b/release/datafiles/fonts/droidsans.ttf.gz Binary files differindex a00f35f3a66..1701612d313 100644 --- a/release/datafiles/fonts/droidsans.ttf.gz +++ b/release/datafiles/fonts/droidsans.ttf.gz diff --git a/release/plugins/sequence/dnr.c b/release/plugins/sequence/dnr.c index 606ec19ef41..74b3a06ccbb 100644 --- a/release/plugins/sequence/dnr.c +++ b/release/plugins/sequence/dnr.c @@ -42,7 +42,7 @@ struct my_data { }; void plugin_seq_doit(Cast *, float, float, int, int, - ImBuf *, ImBuf *, ImBuf *, ImBuf *); + ImBuf *, ImBuf *, ImBuf *, ImBuf *); int plugin_seq_getversion(void) { return B_PLUGIN_VERSION;} diff --git a/release/plugins/sequence/gamma.c b/release/plugins/sequence/gamma.c index 7ce86fff347..1560c5805df 100644 --- a/release/plugins/sequence/gamma.c +++ b/release/plugins/sequence/gamma.c @@ -117,13 +117,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width, src1= (unsigned char *) ibuf1->rect; make_gamma_table(cast->setup_m, cast->gain_m, cast->gamma_m, - gamma_table_m); + gamma_table_m); make_gamma_table(cast->setup_r, cast->gain_r, cast->gamma_r, - gamma_table_r); + gamma_table_r); make_gamma_table(cast->setup_g, cast->gain_g, cast->gamma_g, - gamma_table_g); + gamma_table_g); make_gamma_table(cast->setup_b, cast->gain_b, cast->gamma_b, - gamma_table_b); + gamma_table_b); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { diff --git a/release/scripts/presets/cycles/integrator/direct_light.py b/release/scripts/presets/cycles/integrator/direct_light.py new file mode 100644 index 00000000000..504068722d7 --- /dev/null +++ b/release/scripts/presets/cycles/integrator/direct_light.py @@ -0,0 +1,11 @@ +import bpy +cycles = bpy.context.scene.cycles + +cycles.max_bounces = 8 +cycles.min_bounces = 8 +cycles.no_caustics = True +cycles.diffuse_bounces = 0 +cycles.glossy_bounces = 1 +cycles.transmission_bounces = 2 +cycles.transparent_min_bounces = 8 +cycles.transparent_max_bounces = 8 diff --git a/release/scripts/presets/cycles/integrator/full_global_illumination.py b/release/scripts/presets/cycles/integrator/full_global_illumination.py new file mode 100644 index 00000000000..8687f169b8a --- /dev/null +++ b/release/scripts/presets/cycles/integrator/full_global_illumination.py @@ -0,0 +1,11 @@ +import bpy +cycles = bpy.context.scene.cycles + +cycles.max_bounces = 128 +cycles.min_bounces = 3 +cycles.no_caustics = False +cycles.diffuse_bounces = 128 +cycles.glossy_bounces = 128 +cycles.transmission_bounces = 128 +cycles.transparent_min_bounces = 8 +cycles.transparent_max_bounces = 128 diff --git a/release/scripts/presets/cycles/integrator/limited_global_illumination.py b/release/scripts/presets/cycles/integrator/limited_global_illumination.py new file mode 100644 index 00000000000..f2a7e1f7b7a --- /dev/null +++ b/release/scripts/presets/cycles/integrator/limited_global_illumination.py @@ -0,0 +1,11 @@ +import bpy +cycles = bpy.context.scene.cycles + +cycles.max_bounces = 8 +cycles.min_bounces = 3 +cycles.no_caustics = True +cycles.diffuse_bounces = 1 +cycles.glossy_bounces = 4 +cycles.transmission_bounces = 8 +cycles.transparent_min_bounces = 8 +cycles.transparent_max_bounces = 8 diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index 056b3478c2b..5b28cdf44ae 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -86,7 +86,7 @@ class AddTorus(Operator): '''Add a torus mesh''' bl_idname = "mesh.primitive_torus_add" bl_label = "Add Torus" - bl_options = {'REGISTER', 'UNDO'} + bl_options = {'REGISTER', 'UNDO', 'PRESET'} major_radius = FloatProperty( name="Major Radius", diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index ac19bab4c66..dca96b302fb 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -395,9 +395,8 @@ class AddPresetOperator(AddPresetBase, Operator): options={'HIDDEN'}, ) - # XXX, not ideal preset_defines = [ - "op = bpy.context.space_data.operator", + "op = bpy.context.active_operator", ] @property @@ -432,7 +431,7 @@ class WM_MT_operator_presets(Menu): bl_label = "Operator Presets" def draw(self, context): - self.operator = context.space_data.operator.bl_idname + self.operator = context.active_operator.bl_idname Menu.draw_preset(self, context) @property diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py index 324414b8bcb..919677fff8b 100644 --- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py +++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py @@ -233,10 +233,13 @@ class FollowActiveQuads(Operator): bl_label = "Follow Active Quads" bl_options = {'REGISTER', 'UNDO'} - mode = bpy.props.EnumProperty(items=(("EVEN", "Even", "Space all UVs evently"), ("LENGTH", "Length", "Average space UVs edge length of each loop")), - name="Edge Length Mode", - description="Method to space UV edge loops", - default="LENGTH") + mode = bpy.props.EnumProperty( + name="Edge Length Mode", + description="Method to space UV edge loops", + items=(('EVEN', "Even", "Space all UVs evently"), + ('LENGTH', "Length", "Average space UVs edge length of each loop")), + default='LENGTH', + ) @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 52548817620..ae4add72a08 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -552,9 +552,9 @@ class LightMapPack(Operator): PREF_CONTEXT = bpy.props.EnumProperty( name="Selection", - items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"), - ("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"), - ("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop") + items=(('SEL_FACES', "Selected Faces", "Space all UVs evently"), + ('ALL_FACES', "All Faces", "Average space UVs edge length of each loop"), + ('ALL_OBJECTS', "Selected Mesh Object", "Average space UVs edge length of each loop") ), ) diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index 48aefa93a5c..3db768f73fe 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -44,6 +44,7 @@ _modules = ( "properties_particle", "properties_physics_cloth", "properties_physics_common", + "properties_physics_dynamicpaint", "properties_physics_field", "properties_physics_fluid", "properties_physics_smoke", diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py index 5dadcba2621..d1bc0694a89 100644 --- a/release/scripts/startup/bl_ui/properties_data_armature.py +++ b/release/scripts/startup/bl_ui/properties_data_armature.py @@ -71,7 +71,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel): flow.prop(arm, "use_deform_envelopes", text="Envelopes") flow.prop(arm, "use_deform_preserve_volume", text="Quaternion") - if context.scene.render.engine == "BLENDER_GAME": + if context.scene.render.engine == 'BLENDER_GAME': layout.row().prop(arm, "deform_method", expand=True) @@ -289,7 +289,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel): row.prop(itasc, "damping_max", text="Damp", slider=True) row.prop(itasc, "damping_epsilon", text="Eps", slider=True) -from bl_ui.properties_animviz import ( +from .properties_animviz import ( MotionPathButtonsPanel, OnionSkinButtonsPanel, ) diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index 1a0fb0ef4ac..1d7559b2ceb 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -18,7 +18,7 @@ # <pep8 compliant> import bpy -from bpy.types import Panel +from bpy.types import Panel, Menu from rna_prop_ui import PropertyPanel @@ -33,12 +33,12 @@ class CameraButtonsPanel(): return context.camera and (engine in cls.COMPAT_ENGINES) -class CAMERA_MT_presets(bpy.types.Menu): +class CAMERA_MT_presets(Menu): bl_label = "Camera Presets" preset_subdir = "camera" preset_operator = "script.execute_preset" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} - draw = bpy.types.Menu.draw_preset + draw = Menu.draw_preset class DATA_PT_context_camera(CameraButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e4b152834fc..e1b08d1ff8e 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -230,6 +230,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.prop(md, "mid_level") row.prop(md, "strength") + def DYNAMIC_PAINT(self, layout, ob, md): + layout.label(text="Settings can be found inside the Physics context") + def EDGE_SPLIT(self, layout, ob, md): split = layout.split() diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py index a1b86b51f5f..853c11c96c6 100644 --- a/release/scripts/startup/bl_ui/properties_data_speaker.py +++ b/release/scripts/startup/bl_ui/properties_data_speaker.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from bpy.types import Panel from rna_prop_ui import PropertyPanel @@ -32,7 +33,7 @@ class DataButtonsPanel(): return context.speaker and (engine in cls.COMPAT_ENGINES) -class DATA_PT_context_speaker(DataButtonsPanel, bpy.types.Panel): +class DATA_PT_context_speaker(DataButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} @@ -52,7 +53,7 @@ class DATA_PT_context_speaker(DataButtonsPanel, bpy.types.Panel): split.template_ID(space, "pin_id") -class DATA_PT_speaker(DataButtonsPanel, bpy.types.Panel): +class DATA_PT_speaker(DataButtonsPanel, Panel): bl_label = "Sound" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -71,7 +72,7 @@ class DATA_PT_speaker(DataButtonsPanel, bpy.types.Panel): row.prop(speaker, "pitch") -class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel): +class DATA_PT_distance(DataButtonsPanel, Panel): bl_label = "Distance" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -94,7 +95,7 @@ class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel): col.prop(speaker, "distance_reference", text="Reference") -class DATA_PT_cone(DataButtonsPanel, bpy.types.Panel): +class DATA_PT_cone(DataButtonsPanel, Panel): bl_label = "Cone" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -116,7 +117,7 @@ class DATA_PT_cone(DataButtonsPanel, bpy.types.Panel): col.prop(speaker, "cone_volume_outer", text="Outer") -class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, bpy.types.Panel): +class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "object.data" _property_type = bpy.types.Speaker diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index ba9bb4a624d..877b6c0893d 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -406,7 +406,7 @@ class SceneButtonsPanel(): bl_context = "scene" -class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_game_navmesh(SceneButtonsPanel, Panel): bl_label = "Navigation mesh" bl_default_closed = True COMPAT_ENGINES = {'BLENDER_GAME'} diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index f5a95016baa..6e66bd0d98b 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -612,7 +612,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel): col.prop(halo, "flare_subflare_size", text="Subsize") -class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel): +class MATERIAL_PT_game_settings(MaterialButtonsPanel, Panel): bl_label = "Game Settings" COMPAT_ENGINES = {'BLENDER_GAME'} @@ -637,7 +637,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel): row.prop(game, "face_orientation", text="") -class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel): +class MATERIAL_PT_physics(MaterialButtonsPanel, Panel): bl_label = "Physics" COMPAT_ENGINES = {'BLENDER_GAME'} diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index 36b8129ad8a..27b6aa721a4 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -280,7 +280,7 @@ class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel): row.prop(ob, "slow_parent_offset", text="Offset") -from bl_ui.properties_animviz import ( +from .properties_animviz import ( MotionPathButtonsPanel, OnionSkinButtonsPanel, ) diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index c493124c5bb..508818b62dc 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -131,7 +131,7 @@ class ConstraintButtonsPanel(): self.space_template(layout, con) def IK(self, context, layout, con): - if context.object.pose.ik_solver == "ITASC": + if context.object.pose.ik_solver == 'ITASC': layout.prop(con, "ik_type") getattr(self, 'IK_' + con.ik_type)(context, layout, con) else: diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index c6d96171c38..a541f43be66 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -21,7 +21,7 @@ import bpy from bpy.types import Panel from rna_prop_ui import PropertyPanel -from bl_ui.properties_physics_common import ( +from .properties_physics_common import ( point_cache_ui, effector_weights_ui, basic_force_field_settings_ui, diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index afb3c000980..32b94504525 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -20,7 +20,7 @@ import bpy from bpy.types import Menu, Panel -from bl_ui.properties_physics_common import ( +from .properties_physics_common import ( point_cache_ui, effector_weights_ui, ) @@ -60,61 +60,59 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): md = context.cloth ob = context.object + cloth = md.settings - if md: - cloth = md.settings - - split = layout.split() + split = layout.split() - split.active = cloth_panel_enabled(md) + split.active = cloth_panel_enabled(md) - col = split.column() + col = split.column() - col.label(text="Presets:") - sub = col.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="Presets:") + sub = col.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) + col.label(text="Quality:") + col.prop(cloth, "quality", text="Steps", slider=True) - col.label(text="Material:") - col.prop(cloth, "mass") - col.prop(cloth, "structural_stiffness", text="Structural") - col.prop(cloth, "bending_stiffness", text="Bending") + col.label(text="Material:") + col.prop(cloth, "mass") + col.prop(cloth, "structural_stiffness", text="Structural") + col.prop(cloth, "bending_stiffness", text="Bending") - col = split.column() + col = split.column() - col.label(text="Damping:") - col.prop(cloth, "spring_damping", text="Spring") - col.prop(cloth, "air_damping", text="Air") + col.label(text="Damping:") + col.prop(cloth, "spring_damping", text="Spring") + col.prop(cloth, "air_damping", text="Air") - 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="") - sub.prop(cloth, "pin_stiffness", text="Stiffness") + 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="") + sub.prop(cloth, "pin_stiffness", text="Stiffness") - col.label(text="Pre roll:") - col.prop(cloth, "pre_roll", text="Frame") + col.label(text="Pre roll:") + col.prop(cloth, "pre_roll", text="Frame") - # Disabled for now - """ - if cloth.vertex_group_mass: - layout.label(text="Goal:") + # Disabled for now + """ + if cloth.vertex_group_mass: + layout.label(text="Goal:") - col = layout.column_flow() - col.prop(cloth, "goal_default", text="Default") - col.prop(cloth, "goal_spring", text="Stiffness") - col.prop(cloth, "goal_friction", text="Friction") - """ + col = layout.column_flow() + col.prop(cloth, "goal_default", text="Default") + col.prop(cloth, "goal_spring", text="Stiffness") + col.prop(cloth, "goal_friction", text="Friction") + """ - key = ob.data.shape_keys + key = ob.data.shape_keys - if key: - col.label(text="Rest Shape Key:") - col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") + if key: + col.label(text="Rest Shape Key:") + col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="") class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 64dad98d99a..f623d9a37eb 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -65,6 +65,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel): if(ob.type == 'MESH'): physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False) physics_add(self, col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True) + physics_add(self, col, context.dynamic_paint, "Dynamic Paint", 'DYNAMIC_PAINT', 'MOD_DYNAMICPAINT', True) col = split.column() @@ -106,7 +107,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): layout.label(text=cache.info) else: - if cachetype == 'SMOKE': + 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 @@ -118,17 +119,17 @@ def point_cache_ui(self, context, cache, enabled, cachetype): row = layout.row(align=True) - if cachetype != 'PSYS': + if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}: row.enabled = enabled row.prop(cache, "frame_start") row.prop(cache, "frame_end") - if cachetype not in {'SMOKE', 'CLOTH'}: + if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT'}: row.prop(cache, "frame_step") row.prop(cache, "use_quick_cache") if cachetype != 'SMOKE': layout.label(text=cache.info) - if cachetype != 'SMOKE': + if cachetype not in {'SMOKE', 'DYNAMIC_PAINT'}: split = layout.split() split.enabled = enabled and bpy.data.is_saved diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py new file mode 100644 index 00000000000..a934e103c35 --- /dev/null +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -0,0 +1,498 @@ +# ##### 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ##### END GPL LICENSE BLOCK ##### + +# <pep8 compliant> + +import bpy +from bpy.types import Panel + +from .properties_physics_common import ( + point_cache_ui, + effector_weights_ui, + ) + + +class PhysicButtonsPanel(): + bl_space_type = 'PROPERTIES' + bl_region_type = 'WINDOW' + bl_context = "physics" + + @classmethod + 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.dynamic_paint + + +class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint" + + def draw(self, context): + layout = self.layout + + md = context.dynamic_paint + ob = context.object + + layout.prop(md, "ui_type", expand=True) + + if md.ui_type == 'CANVAS': + canvas = md.canvas_settings + + if canvas is None: + layout.operator("dpaint.type_toggle", text="Add Canvas").type = 'CANVAS' + else: + layout.operator("dpaint.type_toggle", text="Remove Canvas", icon='X').type = 'CANVAS' + + surface = canvas.canvas_surfaces.active + + row = layout.row() + row.template_list(canvas, "canvas_surfaces", canvas.canvas_surfaces, "active_index", rows=2) + + col = row.column(align=True) + col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="") + col.operator("dpaint.surface_slot_remove", icon='ZOOMOUT', text="") + + if surface: + layout.prop(surface, "name") + layout.prop(surface, "surface_format") + + col = layout.column() + if surface.surface_format != 'VERTEX': + col.label(text="Quality:") + col.prop(surface, "image_resolution") + col.prop(surface, "use_antialiasing") + + col = layout.column() + col.label(text="Frames:") + split = col.split() + + col = split.column(align=True) + col.prop(surface, "frame_start", text="Start") + col.prop(surface, "frame_end", text="End") + + split.prop(surface, "frame_substeps") + + elif md.ui_type == 'BRUSH': + brush = md.brush_settings + engine = context.scene.render.engine + + if brush is None: + layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH' + else: + layout.operator("dpaint.type_toggle", text="Remove Brush", icon='X').type = 'BRUSH' + + split = layout.split() + + col = split.column() + col.prop(brush, "absolute_alpha") + col.prop(brush, "paint_erase") + col.prop(brush, "paint_wetness", text="Wetness") + + col = split.column() + if engine == 'BLENDER_RENDER': + sub = col.column() + sub.active = (brush.paint_source != 'PARTICLE_SYSTEM') + sub.prop(brush, "use_material") + if brush.use_material and brush.paint_source != 'PARTICLE_SYSTEM' and engine == 'BLENDER_RENDER': + col.prop(brush, "material", text="") + col.prop(brush, "paint_alpha", text="Alpha Factor") + else: + col.prop(brush, "paint_color", text="") + col.prop(brush, "paint_alpha", text="Alpha") + + +class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Advanced" + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active + + def draw(self, context): + layout = self.layout + + canvas = context.dynamic_paint.canvas_settings + surface = canvas.canvas_surfaces.active + ob = context.object + + surface_type = surface.surface_type + + layout.prop(surface, "surface_type") + layout.separator() + + # dissolve + if surface_type == 'PAINT': + split = layout.split(percentage=0.35) + split.label(text="Wetmap drying:") + + col = split.column() + split = col.split(percentage=0.7) + split.prop(surface, "dry_speed", text="Time") + split.prop(surface, "use_dry_log", text="Slow") + + if surface_type != 'WAVE': + split = layout.split(percentage=0.35) + col = split.column() + if surface_type == 'WEIGHT': + col.prop(surface, "use_dissolve", text="Fade:") + else: + col.prop(surface, "use_dissolve", text="Dissolve:") + col = split.column() + col.active = surface.use_dissolve + split = col.split(percentage=0.7) + split.prop(surface, "dissolve_speed", text="Time") + split.prop(surface, "use_dissolve_log", text="Slow") + + # per type settings + if surface_type == 'DISPLACE': + layout.prop(surface, "use_incremental_displace") + if surface.surface_format == 'VERTEX': + row = layout.row() + row.prop(surface, "depth_clamp") + row.prop(surface, "displace_factor") + + elif surface_type == 'WAVE': + layout.prop(surface, "wave_open_borders") + + split = layout.split() + + col = split.column(align=True) + col.prop(surface, "wave_timescale") + col.prop(surface, "wave_speed") + + col = split.column(align=True) + col.prop(surface, "wave_damping") + col.prop(surface, "wave_spring") + + layout.separator() + layout.prop(surface, "brush_group", text="Brush Group") + + +class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Output" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): + return 0 + surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active + return surface and not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'})) + + def draw(self, context): + layout = self.layout + + canvas = context.dynamic_paint.canvas_settings + surface = canvas.canvas_surfaces.active + ob = context.object + + surface_type = surface.surface_type + + # vertex format outputs + if surface.surface_format == 'VERTEX': + if surface_type == 'PAINT': + # toggle active preview + layout.prop(surface, "preview_id") + + # paintmap output + row = layout.row() + row.prop_search(surface, "output_name", ob.data, "vertex_colors", text="Paintmap layer: ") + if surface.output_exists(object=ob, index=0): + ic = 'ZOOMOUT' + else: + ic = 'ZOOMIN' + + row.operator("dpaint.output_toggle", icon=ic, text="").index = 0 + + # wetmap output + row = layout.row() + row.prop_search(surface, "output_name2", ob.data, "vertex_colors", text="Wetmap layer: ") + if surface.output_exists(object=ob, index=1): + ic = 'ZOOMOUT' + else: + ic = 'ZOOMIN' + + row.operator("dpaint.output_toggle", icon=ic, text="").index = 1 + + elif surface_type == 'WEIGHT': + row = layout.row() + row.prop_search(surface, "output_name", ob, "vertex_groups", text="Vertex Group: ") + if surface.output_exists(object=ob, index=0): + ic = 'ZOOMOUT' + else: + ic = 'ZOOMIN' + + row.operator("dpaint.output_toggle", icon=ic, text="").index = 0 + + # image format outputs + if surface.surface_format == 'IMAGE': + layout.operator("dpaint.bake", text="Bake Image Sequence", icon='MOD_DYNAMICPAINT') + layout.prop_search(surface, "uv_layer", ob.data, "uv_textures", text="UV layer:") + layout.separator() + + layout.prop(surface, "image_output_path", text="") + row = layout.row() + row.prop(surface, "image_fileformat", text="") + row.prop(surface, "premultiply", text="Premultiply alpha") + + if surface_type == 'PAINT': + split = layout.split(percentage=0.4) + split.prop(surface, "do_output1", text="Paintmaps:") + sub = split.row() + sub.active = surface.do_output1 + sub.prop(surface, "output_name", text="") + + split = layout.split(percentage=0.4) + split.prop(surface, "do_output2", text="Wetmaps:") + sub = split.row() + sub.active = surface.do_output2 + sub.prop(surface, "output_name2", text="") + else: + col = layout.column() + col.prop(surface, "output_name", text="Filename: ") + if surface_type == 'DISPLACE': + col.prop(surface, "displace_type", text="Displace Type") + col.prop(surface, "depth_clamp") + elif surface_type == 'WAVE': + col.prop(surface, "depth_clamp", text="Wave Clamp") + + +class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Initial Color" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): + return 0 + surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active + return (surface and surface.surface_type == 'PAINT') + + def draw(self, context): + layout = self.layout + + canvas = context.dynamic_paint.canvas_settings + surface = canvas.canvas_surfaces.active + ob = context.object + + layout.prop(surface, "init_color_type", expand=False) + layout.separator() + + # dissolve + if surface.init_color_type == 'COLOR': + layout.prop(surface, "init_color") + + elif surface.init_color_type == 'TEXTURE': + layout.prop(surface, "init_texture") + layout.prop_search(surface, "init_layername", ob.data, "uv_textures", text="UV Layer:") + + elif surface.init_color_type == 'VERTEX_COLOR': + layout.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer: ") + + +class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Effects" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): + return False + surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active + return (surface and surface.surface_type == 'PAINT') + + def draw(self, context): + layout = self.layout + + canvas = context.dynamic_paint.canvas_settings + surface = canvas.canvas_surfaces.active + + layout.prop(surface, "effect_ui", expand=True) + + if surface.effect_ui == 'SPREAD': + layout.prop(surface, "use_spread") + + row = layout.row() + row.active = surface.use_spread + row.prop(surface, "spread_speed") + row.prop(surface, "color_spread_speed") + + elif surface.effect_ui == 'DRIP': + layout.prop(surface, "use_drip") + + col = layout.column() + col.active = surface.use_drip + effector_weights_ui(self, context, surface.effector_weights) + + layout.label(text="Surface Movement:") + row = layout.row() + row.prop(surface, "drip_velocity", slider=True) + row.prop(surface, "drip_acceleration", slider=True) + + elif surface.effect_ui == 'SHRINK': + layout.prop(surface, "use_shrink") + + row = layout.row() + row.active = surface.use_shrink + 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 + 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.uses_cache) + + def draw(self, context): + layout = self.layout + + 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" + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + return md and md.ui_type == 'BRUSH' and md.brush_settings + + def draw(self, context): + layout = self.layout + + brush = context.dynamic_paint.brush_settings + ob = context.object + + split = layout.split() + col = split.column() + col.prop(brush, "paint_source") + + if brush.paint_source == 'PARTICLE_SYSTEM': + col.prop_search(brush, "particle_system", ob, "particle_systems", text="") + if brush.particle_system: + col.label(text="Particle effect:") + sub = col.column() + sub.active = not brush.use_particle_radius + sub.prop(brush, "solid_radius", text="Solid Radius") + col.prop(brush, "use_particle_radius", text="Use Particle's Radius") + col.prop(brush, "smooth_radius", text="Smooth radius") + + if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE', 'POINT'}: + col.prop(brush, "paint_distance", text="Paint Distance") + split = layout.row().split(percentage=0.4) + sub = split.column() + if brush.paint_source == 'DISTANCE': + sub.prop(brush, "proximity_project") + elif brush.paint_source == 'VOLUME_DISTANCE': + sub.prop(brush, "proximity_inverse") + sub.prop(brush, "negate_volume") + + sub = split.column() + if brush.paint_source == 'DISTANCE': + column = sub.column() + column.active = brush.proximity_project + column.prop(brush, "ray_direction") + sub.prop(brush, "proximity_falloff") + if brush.proximity_falloff == 'RAMP': + col = layout.row().column() + col.separator() + col.prop(brush, "proximity_ramp_alpha", text="Only Use Alpha") + col.template_color_ramp(brush, "paint_ramp", expand=True) + + +class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Velocity" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + return md and md.ui_type == 'BRUSH' and md.brush_settings + + def draw(self, context): + layout = self.layout + + brush = context.dynamic_paint.brush_settings + ob = context.object + + split = layout.split() + + col = split.column() + col.prop(brush, "velocity_alpha") + col.prop(brush, "velocity_color") + + split.prop(brush, "velocity_depth") + + col = layout.column() + col.active = (brush.velocity_alpha or brush.velocity_color or brush.velocity_depth) + col.prop(brush, "max_velocity") + col.template_color_ramp(brush, "velocity_ramp", expand=True) + layout.separator() + + row = layout.row() + row.prop(brush, "do_smudge") + sub = row.row() + sub.active = brush.do_smudge + sub.prop(brush, "smudge_strength") + + +class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): + bl_label = "Dynamic Paint Waves" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + return md and md.ui_type == 'BRUSH' and md.brush_settings + + def draw(self, context): + layout = self.layout + + brush = context.dynamic_paint.brush_settings + ob = context.object + + layout.prop(brush, "wave_type") + if brush.wave_type != 'REFLECT': + row = layout.row() + row.prop(brush, "wave_factor") + row.prop(brush, "wave_clamp") + + +def register(): + bpy.utils.register_module(__name__) + + +def unregister(): + bpy.utils.register_module(__name__) + +if __name__ == "__main__": + register() diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index 2229b9dc3da..bc7f330a546 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -20,7 +20,7 @@ import bpy from bpy.types import Panel -from bl_ui.properties_physics_common import ( +from .properties_physics_common import ( basic_force_field_settings_ui, basic_force_field_falloff_ui, ) diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index ce65350e69b..a89249a6f75 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -40,151 +40,149 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): layout = self.layout md = context.fluid + fluid = md.settings + + row = layout.row() + if fluid is None: + row.label("Built without fluids") + return + + row.prop(fluid, "type") + if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: + row.prop(fluid, "use", text="") + + layout = layout.column() + if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: + layout.active = fluid.use + + if fluid.type == 'DOMAIN': + layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM') + split = layout.split() - if md: - fluid = md.settings - - row = layout.row() - if fluid is None: - row.label("Built without fluids") - return - - row.prop(fluid, "type") - if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: - row.prop(fluid, "use", text="") - - layout = layout.column() - if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}: - layout.active = fluid.use - - if fluid.type == 'DOMAIN': - layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM') - split = layout.split() - - col = split.column() - col.label(text="Resolution:") - col.prop(fluid, "resolution", text="Final") - col.label(text="Render Display:") - col.prop(fluid, "render_display_mode", text="") - - col = split.column() - col.label() - col.prop(fluid, "preview_resolution", text="Preview") - col.label(text="Viewport Display:") - col.prop(fluid, "viewport_display_mode", text="") - - split = layout.split() - - col = split.column() - col.label(text="Time:") - sub = col.column(align=True) - sub.prop(fluid, "start_time", text="Start") - sub.prop(fluid, "end_time", text="End") - - col = split.column() - col.label() - col.prop(fluid, "use_speed_vectors") - col.prop(fluid, "use_reverse_frames") - - layout.prop(fluid, "filepath", text="") - - elif fluid.type == 'FLUID': - split = layout.split() - - col = split.column() - col.label(text="Volume Initialization:") - col.prop(fluid, "volume_initialization", text="") - col.prop(fluid, "use_animated_mesh") - - col = split.column() - col.label(text="Initial Velocity:") - col.prop(fluid, "initial_velocity", text="") - - elif fluid.type == 'OBSTACLE': - split = layout.split() - - col = split.column() - col.label(text="Volume Initialization:") - col.prop(fluid, "volume_initialization", text="") - col.prop(fluid, "use_animated_mesh") - - col = split.column() - col.label(text="Slip Type:") - col.prop(fluid, "slip_type", text="") - if fluid.slip_type == 'PARTIALSLIP': - col.prop(fluid, "partial_slip_factor", slider=True, text="Amount") - - col.label(text="Impact:") - col.prop(fluid, "impact_factor", text="Factor") - - elif fluid.type == 'INFLOW': - split = layout.split() - - col = split.column() - col.label(text="Volume Initialization:") - col.prop(fluid, "volume_initialization", text="") - col.prop(fluid, "use_animated_mesh") - row = col.row() - row.active = not fluid.use_animated_mesh - row.prop(fluid, "use_local_coords") - - col = split.column() - col.label(text="Inflow Velocity:") - col.prop(fluid, "inflow_velocity", text="") - - elif fluid.type == 'OUTFLOW': - split = layout.split() - - col = split.column() - col.label(text="Volume Initialization:") - col.prop(fluid, "volume_initialization", text="") - col.prop(fluid, "use_animated_mesh") - - split.column() - - elif fluid.type == 'PARTICLE': - split = layout.split() - - col = split.column() - col.label(text="Influence:") - col.prop(fluid, "particle_influence", text="Size") - col.prop(fluid, "alpha_influence", text="Alpha") - - col = split.column() - col.label(text="Type:") - col.prop(fluid, "use_drops") - col.prop(fluid, "use_floats") - col.prop(fluid, "show_tracer") - - layout.prop(fluid, "filepath", text="") - - elif fluid.type == 'CONTROL': - split = layout.split() - - col = split.column() - col.label(text="") - col.prop(fluid, "quality", slider=True) - col.prop(fluid, "use_reverse_frames") - - col = split.column() - col.label(text="Time:") - sub = col.column(align=True) - sub.prop(fluid, "start_time", text="Start") - sub.prop(fluid, "end_time", text="End") - - split = layout.split() - - col = split.column() - col.label(text="Attraction Force:") - sub = col.column(align=True) - sub.prop(fluid, "attraction_strength", text="Strength") - sub.prop(fluid, "attraction_radius", text="Radius") - - col = split.column() - col.label(text="Velocity Force:") - sub = col.column(align=True) - sub.prop(fluid, "velocity_strength", text="Strength") - sub.prop(fluid, "velocity_radius", text="Radius") + col = split.column() + col.label(text="Resolution:") + col.prop(fluid, "resolution", text="Final") + col.label(text="Render Display:") + col.prop(fluid, "render_display_mode", text="") + + col = split.column() + col.label() + col.prop(fluid, "preview_resolution", text="Preview") + col.label(text="Viewport Display:") + col.prop(fluid, "viewport_display_mode", text="") + + split = layout.split() + + col = split.column() + col.label(text="Time:") + sub = col.column(align=True) + sub.prop(fluid, "start_time", text="Start") + sub.prop(fluid, "end_time", text="End") + + col = split.column() + col.label() + col.prop(fluid, "use_speed_vectors") + col.prop(fluid, "use_reverse_frames") + + layout.prop(fluid, "filepath", text="") + + elif fluid.type == 'FLUID': + split = layout.split() + + col = split.column() + col.label(text="Volume Initialization:") + col.prop(fluid, "volume_initialization", text="") + col.prop(fluid, "use_animated_mesh") + + col = split.column() + col.label(text="Initial Velocity:") + col.prop(fluid, "initial_velocity", text="") + + elif fluid.type == 'OBSTACLE': + split = layout.split() + + col = split.column() + col.label(text="Volume Initialization:") + col.prop(fluid, "volume_initialization", text="") + col.prop(fluid, "use_animated_mesh") + + col = split.column() + col.label(text="Slip Type:") + col.prop(fluid, "slip_type", text="") + if fluid.slip_type == 'PARTIALSLIP': + col.prop(fluid, "partial_slip_factor", slider=True, text="Amount") + + col.label(text="Impact:") + col.prop(fluid, "impact_factor", text="Factor") + + elif fluid.type == 'INFLOW': + split = layout.split() + + col = split.column() + col.label(text="Volume Initialization:") + col.prop(fluid, "volume_initialization", text="") + col.prop(fluid, "use_animated_mesh") + row = col.row() + row.active = not fluid.use_animated_mesh + row.prop(fluid, "use_local_coords") + + col = split.column() + col.label(text="Inflow Velocity:") + col.prop(fluid, "inflow_velocity", text="") + + elif fluid.type == 'OUTFLOW': + split = layout.split() + + col = split.column() + col.label(text="Volume Initialization:") + col.prop(fluid, "volume_initialization", text="") + col.prop(fluid, "use_animated_mesh") + + split.column() + + elif fluid.type == 'PARTICLE': + split = layout.split() + + col = split.column() + col.label(text="Influence:") + col.prop(fluid, "particle_influence", text="Size") + col.prop(fluid, "alpha_influence", text="Alpha") + + col = split.column() + col.label(text="Type:") + col.prop(fluid, "use_drops") + col.prop(fluid, "use_floats") + col.prop(fluid, "show_tracer") + + layout.prop(fluid, "filepath", text="") + + elif fluid.type == 'CONTROL': + split = layout.split() + + col = split.column() + col.label(text="") + col.prop(fluid, "quality", slider=True) + col.prop(fluid, "use_reverse_frames") + + col = split.column() + col.label(text="Time:") + sub = col.column(align=True) + sub.prop(fluid, "start_time", text="Start") + sub.prop(fluid, "end_time", text="End") + + split = layout.split() + + col = split.column() + col.label(text="Attraction Force:") + sub = col.column(align=True) + sub.prop(fluid, "attraction_strength", text="Strength") + sub.prop(fluid, "attraction_radius", text="Radius") + + col = split.column() + col.label(text="Velocity Force:") + sub = col.column(align=True) + sub.prop(fluid, "velocity_strength", text="Strength") + sub.prop(fluid, "velocity_radius", text="Radius") class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index e270b53d6bb..4c413647210 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -20,7 +20,7 @@ import bpy from bpy.types import Panel -from bl_ui.properties_physics_common import ( +from .properties_physics_common import ( point_cache_ui, effector_weights_ui, ) @@ -47,60 +47,59 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): md = context.smoke ob = context.object - if md: - layout.prop(md, "smoke_type", expand=True) + layout.prop(md, "smoke_type", expand=True) - if md.smoke_type == 'DOMAIN': - domain = md.domain_settings + if md.smoke_type == 'DOMAIN': + domain = md.domain_settings - split = layout.split() + split = layout.split() - split.enabled = not domain.point_cache.is_baked + split.enabled = not domain.point_cache.is_baked - col = split.column() - col.label(text="Resolution:") - col.prop(domain, "resolution_max", text="Divisions") - col.label(text="Time:") - col.prop(domain, "time_scale", text="Scale") - col.label(text="Border Collisions:") - col.prop(domain, "collision_extents", text="") + col = split.column() + col.label(text="Resolution:") + col.prop(domain, "resolution_max", text="Divisions") + col.label(text="Time:") + col.prop(domain, "time_scale", text="Scale") + col.label(text="Border Collisions:") + col.prop(domain, "collision_extents", text="") - col = split.column() - col.label(text="Behavior:") - col.prop(domain, "alpha") - col.prop(domain, "beta", text="Temp. Diff.") - col.prop(domain, "vorticity") - col.prop(domain, "use_dissolve_smoke", text="Dissolve") - sub = col.column() - sub.active = domain.use_dissolve_smoke - sub.prop(domain, "dissolve_speed", text="Time") - sub.prop(domain, "use_dissolve_smoke_log", text="Slow") + col = split.column() + col.label(text="Behavior:") + col.prop(domain, "alpha") + col.prop(domain, "beta", text="Temp. Diff.") + col.prop(domain, "vorticity") + col.prop(domain, "use_dissolve_smoke", text="Dissolve") + sub = col.column() + sub.active = domain.use_dissolve_smoke + sub.prop(domain, "dissolve_speed", text="Time") + sub.prop(domain, "use_dissolve_smoke_log", text="Slow") - elif md.smoke_type == 'FLOW': + elif md.smoke_type == 'FLOW': - flow = md.flow_settings + flow = md.flow_settings - split = layout.split() + split = layout.split() - col = split.column() - col.prop(flow, "use_outflow") - col.label(text="Particle System:") - col.prop_search(flow, "particle_system", ob, "particle_systems", text="") + col = split.column() + col.prop(flow, "use_outflow") + col.label(text="Particle System:") + col.prop_search(flow, "particle_system", ob, "particle_systems", text="") - sub = col.column() - sub.active = not md.flow_settings.use_outflow + sub = col.column() + sub.active = not md.flow_settings.use_outflow - sub.prop(flow, "initial_velocity", text="Initial Velocity") - sub = sub.column() - sub.active = flow.initial_velocity - sub.prop(flow, "velocity_factor", text="Multiplier") + sub.prop(flow, "initial_velocity", text="Initial Velocity") + sub = sub.column() + sub.active = flow.initial_velocity + sub.prop(flow, "velocity_factor", text="Multiplier") - sub = split.column() - sub.active = not md.flow_settings.use_outflow - sub.label(text="Initial Values:") - sub.prop(flow, "use_absolute") - sub.prop(flow, "density") - sub.prop(flow, "temperature") + sub = split.column() + sub.active = not md.flow_settings.use_outflow + sub.label(text="Initial Values:") + sub.prop(flow, "use_absolute") + sub.prop(flow, "density") + sub.prop(flow, "temperature") class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index b9f8910fa59..78c74a7e1d3 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -20,7 +20,7 @@ import bpy from bpy.types import Panel -from bl_ui.properties_physics_common import ( +from .properties_physics_common import ( point_cache_ui, effector_weights_ui, ) @@ -39,8 +39,6 @@ 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) -# i really hate touching things i do not understand completely .. but i think this should read (bjornmose) return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body) @@ -53,22 +51,21 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): md = context.soft_body ob = context.object - if md: - softbody = md.settings + softbody = md.settings - # General - split = layout.split() - split.enabled = softbody_panel_enabled(md) + # General + split = layout.split() + split.enabled = softbody_panel_enabled(md) - col = split.column() - col.label(text="Object:") - col.prop(softbody, "friction") - col.prop(softbody, "mass") - col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:") + col = split.column() + col.label(text="Object:") + col.prop(softbody, "friction") + col.prop(softbody, "mass") + col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:") - col = split.column() - col.label(text="Simulation:") - col.prop(softbody, "speed") + col = split.column() + col.label(text="Simulation:") + col.prop(softbody, "speed") class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 73947c21a80..9ba0309aacd 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -44,7 +44,7 @@ class TEXTURE_MT_envmap_specials(Menu): layout.operator("texture.envmap_clear", icon='FILE_REFRESH') layout.operator("texture.envmap_clear_all", icon='FILE_REFRESH') -from bl_ui.properties_material import active_node_mat +from .properties_material import active_node_mat def context_tex_datablock(context): @@ -726,7 +726,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel): col.prop(pd, "falloff", text="") if pd.falloff == 'SOFT': col.prop(pd, "falloff_soft") - if pd.falloff == "PARTICLE_VELOCITY": + if pd.falloff == 'PARTICLE_VELOCITY': col.prop(pd, "falloff_speed_scale") col.prop(pd, "use_falloff_curve") diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 3148c0dd51a..55fc641f5ae 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -757,8 +757,8 @@ class CLIP_MT_reconstruction(Menu): layout.operator("clip.set_origin") layout.operator("clip.set_floor") - layout.operator("clip.set_axis", text="Set X Asix").axis = "X" - layout.operator("clip.set_axis", text="Set Y Asix").axis = "Y" + layout.operator("clip.set_axis", text="Set X Axis").axis = "X" + layout.operator("clip.set_axis", text="Set Y Axis").axis = "Y" layout.operator("clip.set_scale") diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index b57d421dfaf..5f7462ce44e 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -26,7 +26,7 @@ class GRAPH_HT_header(Header): bl_space_type = 'GRAPH_EDITOR' def draw(self, context): - from bl_ui.space_dopesheet import dopesheet_filter + from .space_dopesheet import dopesheet_filter layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 170ba3ccd0e..81526797109 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -312,19 +312,19 @@ class IMAGE_MT_uvs_select_mode(Menu): else: prop = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL') - prop.value = "VERTEX" + prop.value = 'VERTEX' prop.data_path = "tool_settings.uv_select_mode" prop = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL') - prop.value = "EDGE" + prop.value = 'EDGE' prop.data_path = "tool_settings.uv_select_mode" prop = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL') - prop.value = "FACE" + prop.value = 'FACE' prop.data_path = "tool_settings.uv_select_mode" prop = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL') - prop.value = "ISLAND" + prop.value = 'ISLAND' prop.data_path = "tool_settings.uv_select_mode" diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index c878c20c8a7..59057166ec4 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -26,7 +26,7 @@ class NLA_HT_header(Header): bl_space_type = 'NLA_EDITOR' def draw(self, context): - from bl_ui.space_dopesheet import dopesheet_filter + from .space_dopesheet import dopesheet_filter layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index a4dcf64b679..c1c9bc12b2d 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -456,7 +456,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): elif strip.type == 'TRANSFORM': self.draw_panel_transform(strip) - elif strip.type == "MULTICAM": + elif strip.type == 'MULTICAM': layout.prop(strip, "multicam_source") row = layout.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 5209e8be597..72818dfc642 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -92,7 +92,7 @@ class TIME_HT_header(Header): row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT') -class TIME_MT_marker(bpy.types.Menu): +class TIME_MT_marker(Menu): bl_label = "Marker" def draw(self, context): @@ -144,6 +144,7 @@ class TIME_MT_cache(Menu): col.prop(st, "cache_particles") col.prop(st, "cache_cloth") col.prop(st, "cache_smoke") + col.prop(st, "cache_dynamicpaint") class TIME_MT_frame(Menu): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index a2ede26ecc6..51f55fe019c 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -743,7 +743,7 @@ class USERPREF_PT_file(Panel): sub.active = paths.use_auto_save_temporary_files sub.prop(paths, "auto_save_time", text="Timer (mins)") -from bl_ui.space_userpref_keymap import InputKeyMapPanel +from .space_userpref_keymap import InputKeyMapPanel class USERPREF_MT_ndof_settings(Menu): diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e5eccb4d940..1314401a1ef 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1537,10 +1537,10 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): bl_label = "Extrude" _extrude_funcs = { - "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"), - "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"), - "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"), - "REGION": lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"), + 'VERT': lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"), + 'EDGE': lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"), + 'FACE': lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"), + 'REGION': lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"), } @staticmethod @@ -1550,11 +1550,11 @@ class VIEW3D_MT_edit_mesh_extrude(Menu): menu = [] if mesh.total_face_sel: - menu += ["REGION", "FACE"] + menu += ['REGION', 'FACE'] if mesh.total_edge_sel and (select_mode[0] or select_mode[1]): - menu += ["EDGE"] + menu += ['EDGE'] if mesh.total_vert_sel and select_mode[0]: - menu += ["VERT"] + menu += ['VERT'] # should never get here return menu |