Merge remote-tracking branch 'origin/master' into blender2.8
authorDalai Felinto <dfelinto@gmail.com>
Wed, 9 Nov 2016 13:36:59 +0000 (14:36 +0100)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 9 Nov 2016 13:36:59 +0000 (14:36 +0100)
391 files changed:
build_files/build_environment/install_deps.sh
intern/cycles/blender/CMakeLists.txt
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_particles.cpp [deleted file]
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/blender/blender_util.h
intern/elbeem/extern/elbeem.h
intern/ghost/intern/GHOST_ContextCGL.h
intern/ghost/intern/GHOST_ContextCGL.mm
intern/ghost/intern/GHOST_ContextGLX.cpp
intern/ghost/intern/GHOST_ContextWGL.cpp
intern/ghost/intern/GHOST_ContextWGL.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/intern/GHOST_WindowX11.cpp
release/darwin/blender.app/Contents/Info.plist
release/scripts/presets/hair_dynamics/default.py [deleted file]
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/view3d.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_paint_common.py
release/scripts/startup/bl_ui/properties_particle.py [deleted file]
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/CMakeLists.txt
source/blender/alembic/intern/abc_exporter.cc
source/blender/alembic/intern/abc_hair.cc
source/blender/alembic/intern/abc_hair.h
source/blender/alembic/intern/abc_mesh.cc
source/blender/alembic/intern/abc_points.cc
source/blender/alembic/intern/abc_points.h
source/blender/blenfont/BLF_api.h
source/blender/blenfont/intern/blf.c
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenfont/intern/blf_internal.h
source/blender/blenfont/intern/blf_internal_types.h
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_boids.h [deleted file]
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_effect.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_particle.h [deleted file]
source/blender/blenkernel/BKE_pointcache.h [deleted file]
source/blender/blenkernel/BKE_rigidbody.h
source/blender/blenkernel/BKE_sca.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/BKE_softbody.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/boids.c [deleted file]
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/object_update.c
source/blender/blenkernel/intern/particle.c [deleted file]
source/blender/blenkernel/intern/particle_child.c [deleted file]
source/blender/blenkernel/intern/particle_distribute.c [deleted file]
source/blender/blenkernel/intern/particle_system.c [deleted file]
source/blender/blenkernel/intern/pointcache.c [deleted file]
source/blender/blenkernel/intern/rigidbody.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/texture.c
source/blender/blenlib/BLI_math_matrix.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/math_vector.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_250.c
source/blender/blenloader/intern/versioning_260.c
source/blender/blenloader/intern/versioning_270.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/blentranslation/BLT_translation.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/depsgraph/intern/depsgraph_tag.cc
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_brush.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/BIF_glutil.h
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_buttons.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_particle.h [deleted file]
source/blender/editors/include/ED_physics.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/physics/particle_boids.c [deleted file]
source/blender/editors/physics/particle_edit.c [deleted file]
source/blender/editors/physics/particle_object.c [deleted file]
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c
source/blender/editors/physics/physics_pointcache.c [deleted file]
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.c
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_draw_legacy.c [new file with mode: 0644]
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_walk.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/transform/transform_snap_object.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_batch.h [new file with mode: 0644]
source/blender/gpu/GPU_debug.h
source/blender/gpu/GPU_draw.h
source/blender/gpu/GPU_framebuffer.h
source/blender/gpu/GPU_immediate.h [new file with mode: 0644]
source/blender/gpu/GPU_material.h
source/blender/gpu/GPU_matrix.h [new file with mode: 0644]
source/blender/gpu/GPU_shader.h
source/blender/gpu/GPU_viewport.h [new file with mode: 0644]
source/blender/gpu/gawain/attrib_binding.c [new file with mode: 0644]
source/blender/gpu/gawain/attrib_binding.h [new file with mode: 0644]
source/blender/gpu/gawain/batch.c [new file with mode: 0644]
source/blender/gpu/gawain/batch.h [new file with mode: 0644]
source/blender/gpu/gawain/common.h [new file with mode: 0644]
source/blender/gpu/gawain/element.c [new file with mode: 0644]
source/blender/gpu/gawain/element.h [new file with mode: 0644]
source/blender/gpu/gawain/imm_util.c [new file with mode: 0644]
source/blender/gpu/gawain/imm_util.h [new file with mode: 0644]
source/blender/gpu/gawain/immediate.c [new file with mode: 0644]
source/blender/gpu/gawain/immediate.h [new file with mode: 0644]
source/blender/gpu/gawain/vertex_buffer.c [new file with mode: 0644]
source/blender/gpu/gawain/vertex_buffer.h [new file with mode: 0644]
source/blender/gpu/gawain/vertex_format.c [new file with mode: 0644]
source/blender/gpu/gawain/vertex_format.h [new file with mode: 0644]
source/blender/gpu/intern/gpu_basic_shader.c
source/blender/gpu/intern/gpu_batch.c [new file with mode: 0644]
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_compositing.c
source/blender/gpu/intern/gpu_debug.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_framebuffer.c
source/blender/gpu/intern/gpu_immediate.c [new file with mode: 0644]
source/blender/gpu/intern/gpu_init_exit.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/intern/gpu_matrix.c [new file with mode: 0644]
source/blender/gpu/intern/gpu_shader.c
source/blender/gpu/intern/gpu_shader_private.h [new file with mode: 0644]
source/blender/gpu/intern/gpu_texture.c
source/blender/gpu/intern/gpu_viewport.c [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_outline_smooth_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_smooth_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_smooth_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_smooth_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_2D_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_image_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_outline_smooth_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_point_uniform_size_smooth_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_smooth_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_3D_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_basic_frag.glsl
source/blender/gpu/shaders/gpu_shader_basic_geom.glsl
source/blender/gpu/shaders/gpu_shader_depth_only_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_front_back_ortho_vert.glsl [new file with mode: 0755]
source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_geom.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_front_back_persp_vert.glsl [new file with mode: 0755]
source/blender/gpu/shaders/gpu_shader_edges_overlay_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_overlay_geom.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_overlay_simple_geom.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_edges_overlay_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_flat_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_image_depth_linear_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_image_mask_uniform_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_image_modulate_alpha_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_image_rect_modulate_alpha_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_point_uniform_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_point_uniform_color_outline_smooth_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_point_uniform_color_smooth_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_point_varying_color_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_point_varying_color_outline_smooth_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_text_frag.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_text_vert.glsl [new file with mode: 0644]
source/blender/gpu/shaders/gpu_shader_uniform_color_frag.glsl [new file with mode: 0644]
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_boid_types.h [deleted file]
source/blender/makesdna/DNA_dynamicpaint_types.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesdna/DNA_ipo_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_object_fluidsim.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_outliner_types.h
source/blender/makesdna/DNA_particle_types.h [deleted file]
source/blender/makesdna/DNA_rigidbody_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_smoke_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_boid.c [deleted file]
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c [deleted file]
source/blender/makesrna/intern/rna_rigidbody.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_cloth.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_laplaciandeform.c
source/blender/modifiers/intern/MOD_particleinstance.c [deleted file]
source/blender/modifiers/intern/MOD_particlesystem.c [deleted file]
source/blender/modifiers/intern/MOD_shapekey.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_softbody.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_util.c
source/blender/nodes/shader/nodes/node_shader_particle_info.c
source/blender/python/generic/blf_py_api.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/voxeldata.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_stereo.c
source/blender/windowmanager/intern/wm_window.c
source/blender/windowmanager/manipulators/WM_manipulator_api.h [new file with mode: 0644]
source/blender/windowmanager/manipulators/WM_manipulator_types.h [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/manipulator_library/manipulator_library_intern.h [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/manipulator_library/manipulator_library_utils.c [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/wm_manipulator.c [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/wm_manipulatorgroup.c [new file with mode: 0644]
source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c [new file with mode: 0644]
source/blender/windowmanager/manipulators/wm_manipulator_wmapi.h [new file with mode: 0644]
source/blender/windowmanager/wm.h
source/blender/windowmanager/wm_event_system.h
source/blender/windowmanager/wm_event_types.h
source/blenderplayer/bad_level_call_stubs/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c
source/creator/creator_args.c
source/gameengine/Ketsji/BL_BlenderShader.cpp

index 7844ff5ffda942bc4fbc0df974c0ef62390463b4..e1f5922272fc72b90d88dcc3de5d3bdbf43de826 100755 (executable)
@@ -25,7 +25,7 @@
 ARGS=$( \
 getopt \
 -o s:i:t:h \
---long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
+--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,\
 with-all,with-opencollada,\
 ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
 force-all,force-python,force-numpy,force-boost,\
@@ -104,11 +104,6 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
     --no-confirm
         Disable any interaction with user (suitable for automated run).
 
-    --use-cxx11
-        Build all libraries in cpp11 'mode' (will be mandatory soon in blender2.8 branch).
-        NOTE: If your compiler is gcc-6.0 or above, you probably *want* to enable this option (since it's default
-              standard starting from this version).
-
     --with-all
         By default, a number of optional and not-so-often needed libraries are not installed.
         This option will try to install them, at the cost of potential conflicts (depending on
@@ -287,7 +282,7 @@ SUDO="sudo"
 
 NO_BUILD=false
 NO_CONFIRM=false
-USE_CXX11=false
+USE_CXX11=true  # Mandatory in blender2.8
 
 PYTHON_VERSION="3.5.1"
 PYTHON_VERSION_MIN="3.5"
@@ -499,9 +494,6 @@ while true; do
     --no-confirm)
       NO_CONFIRM=true; shift; continue
     ;;
-    --use-cxx11)
-      USE_CXX11=true; shift; continue
-    ;;
     --with-all)
       WITH_ALL=true; shift; continue
     ;;
@@ -778,7 +770,7 @@ FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
 
 CXXFLAGS_BACK=$CXXFLAGS
 if [ "$USE_CXX11" = true ]; then
-  WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution
+  WARNING "C++11 is now mandatory for blender2.8, this *should* go smoothly with any very recent distribution.
 However, if you are experiencing linking errors (also when building Blender itself), please try the following:
     * Re-run this script with `--build-all --force-all` options.
     * Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
index a79deca53e186e6ea87d30a9c1313a14de4b561e..5cf482cfad3e948a909449b76dfaec798007ad4d 100644 (file)
@@ -25,7 +25,6 @@ set(SRC
        blender_camera.cpp
        blender_mesh.cpp
        blender_object.cpp
-       blender_particles.cpp
        blender_curves.cpp
        blender_logging.cpp
        blender_python.cpp
index 27c9b9220420335c4a197dd54e50c420790668e3..3888cdef70e5cf755ba46ab295f899aa1dacc2e0 100644 (file)
@@ -1094,49 +1094,6 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
         del bpy.types.Scene.cycles_curves
 
 
-class CyclesCurveSettings(bpy.types.PropertyGroup):
-    @classmethod
-    def register(cls):
-        bpy.types.ParticleSettings.cycles = PointerProperty(
-                name="Cycles Hair Settings",
-                description="Cycles hair settings",
-                type=cls,
-                )
-        cls.radius_scale = FloatProperty(
-                name="Radius Scaling",
-                description="Multiplier of width properties",
-                min=0.0, max=1000.0,
-                default=0.01,
-                )
-        cls.root_width = FloatProperty(
-                name="Root Size",
-                description="Strand's width at root",
-                min=0.0, max=1000.0,
-                default=1.0,
-                )
-        cls.tip_width = FloatProperty(
-                name="Tip Multiplier",
-                description="Strand's width at tip",
-                min=0.0, max=1000.0,
-                default=0.0,
-                )
-        cls.shape = FloatProperty(
-                name="Strand Shape",
-                description="Strand shape parameter",
-                min=-1.0, max=1.0,
-                default=0.0,
-                )
-        cls.use_closetip = BoolProperty(
-                name="Close tip",
-                description="Set tip radius to zero",
-                default=True,
-                )
-
-    @classmethod
-    def unregister(cls):
-        del bpy.types.ParticleSettings.cycles
-
-
 class CyclesDeviceSettings(bpy.types.PropertyGroup):
     @classmethod
     def register(cls):
@@ -1244,7 +1201,6 @@ def register():
     bpy.utils.register_class(CyclesMeshSettings)
     bpy.utils.register_class(CyclesObjectSettings)
     bpy.utils.register_class(CyclesCurveRenderSettings)
-    bpy.utils.register_class(CyclesCurveSettings)
     bpy.utils.register_class(CyclesDeviceSettings)
     bpy.utils.register_class(CyclesPreferences)
 
@@ -1259,6 +1215,5 @@ def unregister():
     bpy.utils.unregister_class(CyclesObjectSettings)
     bpy.utils.unregister_class(CyclesVisibilitySettings)
     bpy.utils.unregister_class(CyclesCurveRenderSettings)
-    bpy.utils.unregister_class(CyclesCurveSettings)
     bpy.utils.unregister_class(CyclesDeviceSettings)
     bpy.utils.unregister_class(CyclesPreferences)
index f28fa0d52ba8b0705244c0772220c35af7bbdc3e..2d9785b94d08bece25dbaf87c229b2ae54ccab3a 100644 (file)
@@ -1358,37 +1358,6 @@ class CyclesTexture_PT_colors(CyclesButtonsPanel, Panel):
             layout.template_color_ramp(mapping, "color_ramp", expand=True)
 
 
-class CyclesParticle_PT_textures(CyclesButtonsPanel, Panel):
-    bl_label = "Textures"
-    bl_context = "particle"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        psys = context.particle_system
-        return psys and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = psys.settings
-
-        row = layout.row()
-        row.template_list("TEXTURE_UL_texslots", "", part, "texture_slots", part, "active_texture_index", rows=2)
-
-        col = row.column(align=True)
-        col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
-        col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
-        col.menu("TEXTURE_MT_specials", icon='DOWNARROW_HLT', text="")
-
-        if not part.active_texture:
-            layout.template_ID(part, "active_texture", new="texture.new")
-        else:
-            slot = part.texture_slots[part.active_texture_index]
-            layout.template_ID(slot, "texture", new="texture.new")
-
-
 class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
     bl_label = "Cycles Hair Rendering"
     bl_context = "particle"
@@ -1537,37 +1506,6 @@ class CyclesRender_PT_debug(CyclesButtonsPanel, Panel):
         col.prop(cscene, "debug_use_opencl_debug", text="Debug")
 
 
-class CyclesParticle_PT_CurveSettings(CyclesButtonsPanel, Panel):
-    bl_label = "Cycles Hair Settings"
-    bl_context = "particle"
-
-    @classmethod
-    def poll(cls, context):
-        scene = context.scene
-        ccscene = scene.cycles_curves
-        psys = context.particle_system
-        use_curves = ccscene.use_curves and psys
-        return CyclesButtonsPanel.poll(context) and use_curves and psys.settings.type == 'HAIR'
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_settings
-        cpsys = psys.cycles
-
-        row = layout.row()
-        row.prop(cpsys, "shape", text="Shape")
-
-        layout.label(text="Thickness:")
-        row = layout.row()
-        row.prop(cpsys, "root_width", text="Root")
-        row.prop(cpsys, "tip_width", text="Tip")
-
-        row = layout.row()
-        row.prop(cpsys, "radius_scale", text="Scaling")
-        row.prop(cpsys, "use_closetip", text="Close tip")
-
-
 class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
     bl_label = "Simplify"
     bl_context = "scene"
@@ -1590,12 +1528,10 @@ class CyclesScene_PT_simplify(CyclesButtonsPanel, Panel):
         col = split.column()
         col.label(text="Viewport:")
         col.prop(rd, "simplify_subdivision", text="Subdivision")
-        col.prop(rd, "simplify_child_particles", text="Child Particles")
 
         col = split.column()
         col.label(text="Render:")
         col.prop(rd, "simplify_subdivision_render", text="Subdivision")
-        col.prop(rd, "simplify_child_particles_render", text="Child Particles")
 
         col = layout.column()
         col.prop(cscene, "use_camera_cull")
index 378ae67f0c74173da45d623a36ca0ebf0d393f8c..7b9d4f2ecdfe88e1d9cd721a88f1301df816d2fe 100644 (file)
@@ -37,9 +37,6 @@ void curveinterp_v3_v3v3v3v3(float3 *p, float3 *v1, float3 *v2, float3 *v3, floa
 void interp_weights(float t, float data[4]);
 float shaperadius(float shape, float root, float tip, float time);
 void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyloc, float *time, ParticleCurveData *CData);
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num);
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num);
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background);
 void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData);
 void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
                                float3 RotCam, bool is_ortho);
@@ -119,220 +116,6 @@ void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyl
                curveinterp_v3_v3v3v3v3(keyloc, &ckey_loc1, &ckey_loc2, &ckey_loc3, &ckey_loc4, t);
 }
 
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background)
-{
-       int curvenum = 0;
-       int keyno = 0;
-
-       if(!(mesh && b_mesh && b_ob && CData))
-               return false;
-
-       Transform tfm = get_transform(b_ob->matrix_world());
-       Transform itfm = transform_quick_inverse(tfm);
-
-       BL::Object::modifiers_iterator b_mod;
-       for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
-               if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && (background ? b_mod->show_render() : b_mod->show_viewport())) {
-                       BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr);
-                       BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr);
-                       BL::ParticleSettings b_part((const PointerRNA)b_psys.settings().ptr);
-
-                       if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
-                               int shader = clamp(b_part.material()-1, 0, mesh->used_shaders.size()-1);
-                               int draw_step = background ? b_part.render_step() : b_part.draw_step();
-                               int totparts = b_psys.particles.length();
-                               int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
-                               int totcurves = totchild;
-                               
-                               if(b_part.child_type() == 0 || totchild == 0)
-                                       totcurves += totparts;
-
-                               if(totcurves == 0)
-                                       continue;
-
-                               int ren_step = (1 << draw_step) + 1;
-                               if(b_part.kink() == BL::ParticleSettings::kink_SPIRAL)
-                                       ren_step += b_part.kink_extra_steps();
-
-                               PointerRNA cpsys = RNA_pointer_get(&b_part.ptr, "cycles");
-
-                               CData->psys_firstcurve.push_back_slow(curvenum);
-                               CData->psys_curvenum.push_back_slow(totcurves);
-                               CData->psys_shader.push_back_slow(shader);
-
-                               float radius = get_float(cpsys, "radius_scale") * 0.5f;
-       
-                               CData->psys_rootradius.push_back_slow(radius * get_float(cpsys, "root_width"));
-                               CData->psys_tipradius.push_back_slow(radius * get_float(cpsys, "tip_width"));
-                               CData->psys_shape.push_back_slow(get_float(cpsys, "shape"));
-                               CData->psys_closetip.push_back_slow(get_boolean(cpsys, "use_closetip"));
-
-                               int pa_no = 0;
-                               if(!(b_part.child_type() == 0) && totchild != 0)
-                                       pa_no = totparts;
-
-                               int num_add = (totparts+totchild - pa_no);
-                               CData->curve_firstkey.reserve(CData->curve_firstkey.size() + num_add);
-                               CData->curve_keynum.reserve(CData->curve_keynum.size() + num_add);
-                               CData->curve_length.reserve(CData->curve_length.size() + num_add);
-                               CData->curvekey_co.reserve(CData->curvekey_co.size() + num_add*ren_step);
-                               CData->curvekey_time.reserve(CData->curvekey_time.size() + num_add*ren_step);
-
-                               for(; pa_no < totparts+totchild; pa_no++) {
-                                       int keynum = 0;
-                                       CData->curve_firstkey.push_back_slow(keyno);
-                                       
-                                       float curve_length = 0.0f;
-                                       float3 pcKey;
-                                       for(int step_no = 0; step_no < ren_step; step_no++) {
-                                               float nco[3];
-                                               b_psys.co_hair(*b_ob, pa_no, step_no, nco);
-                                               float3 cKey = make_float3(nco[0], nco[1], nco[2]);
-                                               cKey = transform_point(&itfm, cKey);
-                                               if(step_no > 0) {
-                                                       float step_length = len(cKey - pcKey);
-                                                       if(step_length == 0.0f)
-                                                               continue;
-                                                       curve_length += step_length;
-                                               }
-                                               CData->curvekey_co.push_back_slow(cKey);
-                                               CData->curvekey_time.push_back_slow(curve_length);
-                                               pcKey = cKey;
-                                               keynum++;
-                                       }
-                                       keyno += keynum;
-
-                                       CData->curve_keynum.push_back_slow(keynum);
-                                       CData->curve_length.push_back_slow(curve_length);
-                                       curvenum++;
-                               }
-                       }
-               }
-       }
-
-       return true;
-}
-
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num)
-{
-       if(!(mesh && b_mesh && b_ob && CData))
-               return false;
-
-       CData->curve_uv.clear();
-
-       BL::Object::modifiers_iterator b_mod;
-       for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
-               if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && (background ? b_mod->show_render() : b_mod->show_viewport())) {
-                       BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr);
-                       BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr);
-                       BL::ParticleSettings b_part((const PointerRNA)b_psys.settings().ptr);
-
-                       if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
-                               int totparts = b_psys.particles.length();
-                               int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
-                               int totcurves = totchild;
-                               
-                               if(b_part.child_type() == 0 || totchild == 0)
-                                       totcurves += totparts;
-
-                               if(totcurves == 0)
-                                       continue;
-
-                               int pa_no = 0;
-                               if(!(b_part.child_type() == 0) && totchild != 0)
-                                       pa_no = totparts;
-
-                               int num_add = (totparts+totchild - pa_no);
-                               CData->curve_uv.reserve(CData->curve_uv.size() + num_add);
-
-                               BL::ParticleSystem::particles_iterator b_pa;
-                               b_psys.particles.begin(b_pa);
-                               for(; pa_no < totparts+totchild; pa_no++) {
-                                       /* Add UVs */
-                                       BL::Mesh::tessface_uv_textures_iterator l;
-                                       b_mesh->tessface_uv_textures.begin(l);
-
-                                       float3 uv = make_float3(0.0f, 0.0f, 0.0f);
-                                       if(b_mesh->tessface_uv_textures.length())
-                                               b_psys.uv_on_emitter(psmd, *b_pa, pa_no, uv_num, &uv.x);
-                                       CData->curve_uv.push_back_slow(uv);
-
-                                       if(pa_no < totparts && b_pa != b_psys.particles.end())
-                                               ++b_pa;
-                               }
-                       }
-               }
-       }
-
-       return true;
-}
-
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num)
-{
-       if(!(mesh && b_mesh && b_ob && CData))
-               return false;
-
-       CData->curve_vcol.clear();
-
-       BL::Object::modifiers_iterator b_mod;
-       for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
-               if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && (background ? b_mod->show_render() : b_mod->show_viewport())) {
-                       BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr);
-                       BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr);
-                       BL::ParticleSettings b_part((const PointerRNA)b_psys.settings().ptr);
-
-                       if((b_part.render_type() == BL::ParticleSettings::render_type_PATH) && (b_part.type() == BL::ParticleSettings::type_HAIR)) {
-                               int totparts = b_psys.particles.length();
-                               int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f);
-                               int totcurves = totchild;
-                               
-                               if(b_part.child_type() == 0 || totchild == 0)
-                                       totcurves += totparts;
-
-                               if(totcurves == 0)
-                                       continue;
-
-                               int pa_no = 0;
-                               if(!(b_part.child_type() == 0) && totchild != 0)
-                                       pa_no = totparts;
-
-                               int num_add = (totparts+totchild - pa_no);
-                               CData->curve_vcol.reserve(CData->curve_vcol.size() + num_add);
-
-                               BL::ParticleSystem::particles_iterator b_pa;
-                               b_psys.particles.begin(b_pa);
-                               for(; pa_no < totparts+totchild; pa_no++) {
-                                       /* Add vertex colors */
-                                       BL::Mesh::tessface_vertex_colors_iterator l;
-                                       b_mesh->tessface_vertex_colors.begin(l);
-
-                                       float3 vcol = make_float3(0.0f, 0.0f, 0.0f);
-                                       if(b_mesh->tessface_vertex_colors.length())
-                                               b_psys.mcol_on_emitter(psmd, *b_pa, pa_no, vcol_num, &vcol.x);
-                                       CData->curve_vcol.push_back_slow(vcol);
-
-                                       if(pa_no < totparts && b_pa != b_psys.particles.end())
-                                               ++b_pa;
-                               }
-                       }
-               }
-       }
-
-       return true;
-}
-
-static void set_resolution(BL::Object *b_ob, BL::Scene *scene, bool render)
-{
-       BL::Object::modifiers_iterator b_mod;
-       for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) {
-               if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && ((b_mod->show_viewport()) || (b_mod->show_render()))) {
-                       BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr);
-                       BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr);
-                       b_psys.set_resolution(*scene, *b_ob, (render)? 2: 1);
-               }
-       }
-}
-
 void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
                                float3 RotCam, bool is_ortho)
 {
@@ -837,20 +620,6 @@ void BlenderSync::sync_curve_settings()
        }
 
        if(curve_system_manager->modified_mesh(prev_curve_system_manager)) {
-               BL::BlendData::objects_iterator b_ob;
-
-               for(b_data.objects.begin(b_ob); b_ob != b_data.objects.end(); ++b_ob) {
-                       if(object_is_mesh(*b_ob)) {
-                               BL::Object::particle_systems_iterator b_psys;
-                               for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys) {
-                                       if((b_psys->settings().render_type()==BL::ParticleSettings::render_type_PATH)&&(b_psys->settings().type()==BL::ParticleSettings::type_HAIR)) {
-                                               BL::ID key = BKE_object_is_modified(*b_ob)? *b_ob: b_ob->data();
-                                               mesh_map.set_recalc(key);
-                                               object_map.set_recalc(*b_ob);
-                                       }
-                               }
-                       }
-               }
        }
 
        if(curve_system_manager->modified(prev_curve_system_manager))
@@ -875,7 +644,7 @@ void BlenderSync::sync_curves(Mesh *mesh,
        /* obtain general settings */
        bool use_curves = scene->curve_system_manager->use_curves;
 
-       if(!(use_curves && b_ob.mode() != b_ob.mode_PARTICLE_EDIT)) {
+       if(!use_curves) {
                if(!motion)
                        mesh->compute_bounds();
                return;
@@ -892,11 +661,6 @@ void BlenderSync::sync_curves(Mesh *mesh,
 
        ParticleCurveData CData;
 
-       if(!preview)
-               set_resolution(&b_ob, &b_scene, true);
-
-       ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
-
        /* add hair geometry to mesh */
        if(primitive == CURVE_TRIANGLES) {
                if(triangle_method == CURVE_CAMERA_TRIANGLES) {
@@ -964,8 +728,6 @@ void BlenderSync::sync_curves(Mesh *mesh,
                        if(!mesh->need_attribute(scene, ustring(l->name().c_str())))
                                continue;
 
-                       ObtainCacheParticleVcol(mesh, &b_mesh, &b_ob, &CData, !preview, vcol_num);
-
                        if(primitive == CURVE_TRIANGLES) {
                                Attribute *attr_vcol = mesh->attributes.add(
                                        ustring(l->name().c_str()), TypeDesc::TypeColor, ATTR_ELEMENT_CORNER_BYTE);
@@ -1005,8 +767,6 @@ void BlenderSync::sync_curves(Mesh *mesh,
                        if(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)) {
                                Attribute *attr_uv;
 
-                               ObtainCacheParticleUV(mesh, &b_mesh, &b_ob, &CData, !preview, uv_num);
-
                                if(primitive == CURVE_TRIANGLES) {
                                        if(active_render)
                                                attr_uv = mesh->attributes.add(std, name);
@@ -1037,9 +797,6 @@ void BlenderSync::sync_curves(Mesh *mesh,
                }
        }
 
-       if(!preview)
-               set_resolution(&b_ob, &b_scene, false);
-
        mesh->compute_bounds();
 }
 
index 0d961c5bf88c8f3bfb4dd7ed531ae92775e3b811..16e32cb47e0825385da1b8e1cdc0a2ffbc2e4f74 100644 (file)
@@ -466,29 +466,9 @@ static bool object_render_hide(BL::Object& b_ob,
                                bool parent_hide,
                                bool& hide_triangles)
 {
-       /* check if we should render or hide particle emitter */
-       BL::Object::particle_systems_iterator b_psys;
-
-       bool hair_present = false;
-       bool show_emitter = false;
-       bool hide_emitter = false;
        bool hide_as_dupli_parent = false;
        bool hide_as_dupli_child_original = false;
 
-       for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
-               if((b_psys->settings().render_type() == BL::ParticleSettings::render_type_PATH) &&
-                  (b_psys->settings().type()==BL::ParticleSettings::type_HAIR))
-                       hair_present = true;
-
-               if(b_psys->settings().use_render_emitter())
-                       show_emitter = true;
-               else
-                       hide_emitter = true;
-       }
-
-       if(show_emitter)
-               hide_emitter = false;
-
        /* duplicators hidden by default, except dupliframes which duplicate self */
        if(b_ob.is_duplicator())
                if(top_level || b_ob.dupli_type() != BL::Object::dupli_type_FRAMES)
@@ -508,17 +488,9 @@ static bool object_render_hide(BL::Object& b_ob,
                parent = parent.parent();
        }
        
-       hide_triangles = hide_emitter;
+       hide_triangles = false;
 
-       if(show_emitter) {
-               return false;
-       }
-       else if(hair_present) {
-               return hide_as_dupli_child_original;
-       }
-       else {
-               return (hide_as_dupli_parent || hide_as_dupli_child_original);
-       }
+       return (hide_as_dupli_parent || hide_as_dupli_child_original);
 }
 
 static bool object_render_hide_duplis(BL::Object& b_ob)
@@ -541,7 +513,6 @@ void BlenderSync::sync_objects(BL::SpaceView3D& b_v3d, float motion_time)
                light_map.pre_sync();
                mesh_map.pre_sync();
                object_map.pre_sync();
-               particle_system_map.pre_sync();
                motion_times.clear();
        }
        else {
@@ -615,23 +586,16 @@ void BlenderSync::sync_objects(BL::SpaceView3D& b_v3d, float motion_time)
                                                        BL::Array<int, OBJECT_PERSISTENT_ID_SIZE> persistent_id = b_dup->persistent_id();
 
                                                        /* sync object and mesh or light data */
-                                                       Object *object = sync_object(b_ob,
-                                                                                    persistent_id.data,
-                                                                                    *b_dup,
-                                                                                    tfm,
-                                                                                    ob_layer,
-                                                                                    motion_time,
-                                                                                    hide_tris,
-                                                                                    use_camera_cull,
-                                                                                    camera_cull_margin,
-                                                                                    &use_portal);
-
-                                                       /* sync possible particle data, note particle_id
-                                                        * starts counting at 1, first is dummy particle */
-                                                       if(!motion && object) {
-                                                               sync_dupli_particle(b_ob, *b_dup, object);
-                                                       }
-
+                                                       sync_object(b_ob,
+                                                                   persistent_id.data,
+                                                                   *b_dup,
+                                                                   tfm,
+                                                                   ob_layer,
+                                                                   motion_time,
+                                                                   hide_tris,
+                                                                   use_camera_cull,
+                                                                   camera_cull_margin,
+                                                                   &use_portal);
                                                }
                                        }
 
@@ -674,8 +638,6 @@ void BlenderSync::sync_objects(BL::SpaceView3D& b_v3d, float motion_time)
                        scene->mesh_manager->tag_update(scene);
                if(object_map.post_sync())
                        scene->object_manager->tag_update(scene);
-               if(particle_system_map.post_sync())
-                       scene->particle_system_manager->tag_update(scene);
        }
 
        if(motion)
diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp
deleted file mode 100644 (file)
index dd2900a..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2011-2013 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "mesh.h"
-#include "object.h"
-#include "particles.h"
-
-#include "blender_sync.h"
-#include "blender_util.h"
-
-#include "util_foreach.h"
-
-CCL_NAMESPACE_BEGIN
-
-/* Utilities */
-
-bool BlenderSync::sync_dupli_particle(BL::Object& b_ob,
-                                      BL::DupliObject& b_dup,
-                                      Object *object)
-{
-       /* test if this dupli was generated from a particle sytem */
-       BL::ParticleSystem b_psys = b_dup.particle_system();
-       if(!b_psys)
-               return false;
-
-       object->hide_on_missing_motion = true;
-
-       /* test if we need particle data */
-       if(!object->mesh->need_attribute(scene, ATTR_STD_PARTICLE))
-               return false;
-
-       /* don't handle child particles yet */
-       BL::Array<int, OBJECT_PERSISTENT_ID_SIZE> persistent_id = b_dup.persistent_id();
-
-       if(persistent_id[0] >= b_psys.particles.length())
-               return false;
-
-       /* find particle system */
-       ParticleSystemKey key(b_ob, persistent_id);
-       ParticleSystem *psys;
-
-       bool first_use = !particle_system_map.is_used(key);
-       bool need_update = particle_system_map.sync(&psys, b_ob, b_dup.object(), key);
-
-       /* no update needed? */
-       if(!need_update && !object->mesh->need_update && !scene->object_manager->need_update)
-               return true;
-
-       /* first time used in this sync loop? clear and tag update */
-       if(first_use) {
-               psys->particles.clear();
-               psys->tag_update(scene);
-       }
-
-       /* add particle */
-       BL::Particle b_pa = b_psys.particles[persistent_id[0]];
-       Particle pa;
-       
-       pa.index = persistent_id[0];
-       pa.age = b_scene.frame_current() - b_pa.birth_time();
-       pa.lifetime = b_pa.lifetime();
-       pa.location = get_float3(b_pa.location());
-       pa.rotation = get_float4(b_pa.rotation());
-       pa.size = b_pa.size();
-       pa.velocity = get_float3(b_pa.velocity());
-       pa.angular_velocity = get_float3(b_pa.angular_velocity());
-
-       psys->particles.push_back_slow(pa);
-
-       if(object->particle_index != psys->particles.size() - 1)
-               scene->object_manager->tag_update(scene);
-       object->particle_system = psys;
-       object->particle_index = psys->particles.size() - 1;
-
-       /* return that this object has particle data */
-       return true;
-}
-
-CCL_NAMESPACE_END
index 8ec9ecfd8613bb175918bb91d8099a09d1617969..62b9fa3c92b852c8fc947f6116387e767874755a 100644 (file)
@@ -56,7 +56,6 @@ BlenderSync::BlenderSync(BL::RenderEngine& b_engine,
   object_map(&scene->objects),
   mesh_map(&scene->meshes),
   light_map(&scene->lights),
-  particle_system_map(&scene->particle_systems),
   world_map(NULL),
   world_recalc(false),
   scene(scene),
@@ -144,12 +143,6 @@ bool BlenderSync::sync_recalc()
                        if(b_ob->is_updated_data() || b_ob->data().is_updated())
                                light_map.set_recalc(*b_ob);
                }
-               
-               if(b_ob->is_updated_data()) {
-                       BL::Object::particle_systems_iterator b_psys;
-                       for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys)
-                               particle_system_map.set_recalc(*b_ob);
-               }
        }
 
        BL::BlendData::meshes_iterator b_mesh;
@@ -183,7 +176,6 @@ bool BlenderSync::sync_recalc()
                object_map.has_recalc() ||
                light_map.has_recalc() ||
                mesh_map.has_recalc() ||
-               particle_system_map.has_recalc() ||
                BlendDataObjects_is_updated_get(&b_data.ptr) ||
                world_recalc;
 
index 9a01b4f2b6eea9c7c724b2fcb41c9de9ad22da30..2fad7d5fe717840b31d67f008c04635da153a944 100644 (file)
@@ -139,11 +139,6 @@ private:
                                int width, int height,
                                float motion_time);
 
-       /* particles */
-       bool sync_dupli_particle(BL::Object& b_ob,
-                                BL::DupliObject& b_dup,
-                                Object *object);
-
        /* Images. */
        void sync_images();
 
@@ -162,7 +157,6 @@ private:
        id_map<ObjectKey, Object> object_map;
        id_map<void*, Mesh> mesh_map;
        id_map<ObjectKey, Light> light_map;
-       id_map<ParticleSystemKey, ParticleSystem> particle_system_map;
        set<Mesh*> mesh_synced;
        set<Mesh*> mesh_motion_synced;
        set<float> motion_times;
index f17a61f0ac88c74f99d72d4f6643c22117734c22..ba696a83867ef0a842b5cd0e6120e1dd02c3f7fa 100644 (file)
@@ -754,33 +754,6 @@ struct ObjectKey {
        }
 };
 
-/* Particle System Key */
-
-struct ParticleSystemKey {
-       void *ob;
-       int id[OBJECT_PERSISTENT_ID_SIZE];
-
-       ParticleSystemKey(void *ob_, int id_[OBJECT_PERSISTENT_ID_SIZE])
-       : ob(ob_)
-       {
-               if(id_)
-                       memcpy(id, id_, sizeof(id));
-               else
-                       memset(id, 0, sizeof(id));
-       }
-
-       bool operator<(const ParticleSystemKey& k) const
-       {
-               /* first id is particle index, we don't compare that */
-               if(ob < k.ob)
-                       return true;
-               else if(ob == k.ob)
-                       return memcmp(id+1, k.id+1, sizeof(int)*(OBJECT_PERSISTENT_ID_SIZE-1)) < 0;
-
-               return false;
-       }
-};
-
 CCL_NAMESPACE_END
 
 #endif /* __BLENDER_UTIL_H__ */
index bd50b6f08dcc0251ee9db11e3ecd609619a81d53..3a4c18ab1893b845c119b5fb6d4185b1dc984a72 100644 (file)
@@ -111,7 +111,7 @@ typedef struct elbeemSimulationSettings {
 #define OB_FLUIDSIM_OBSTACLE    8
 #define OB_FLUIDSIM_INFLOW      16
 #define OB_FLUIDSIM_OUTFLOW     32
-#define OB_FLUIDSIM_PARTICLE    64
+#define OB_FLUIDSIM_PARTICLE    64 /* DEPRECATED */
 #define OB_FLUIDSIM_CONTROL    128
 
 // defines for elbeemMesh->obstacleType below (low bits) high bits (>=64) are reserved for mFsSurfGenSetting flags which are defined in solver_class.h
index dd49b81b561ee04acf910b8923e83d83ef716240..8186eaa759d54ea6fc667a85f4816e23b596bab5 100644 (file)
@@ -134,6 +134,8 @@ private:
        /** The OpenGL drawing context */
        NSOpenGLContext *m_openGLContext;
 
+       bool m_coreProfile;
+
        //static CGLEWContext *s_cglewContext;
 
        const bool m_debug;
index 03c45f9945bc8ff3f803ac10e073bb1b084af07e..64db70197bbe3686e45685bc93999ccf6e9a0c32 100644 (file)
@@ -63,6 +63,23 @@ GHOST_ContextCGL::GHOST_ContextCGL(
       m_debug(contextFlags)
 {
        assert(openGLView != nil);
+
+       // for now be very strict about OpenGL version requested
+       switch (contextMajorVersion) {
+               case 2:
+                       assert(contextMinorVersion == 1);
+                       assert(contextProfileMask == 0);
+                       m_coreProfile = false;
+                       break;
+               case 3:
+                       // Apple didn't implement 3.0 or 3.1
+                       assert(contextMinorVersion == 2);
+                       assert(contextProfileMask == GL_CONTEXT_CORE_PROFILE_BIT);
+                       m_coreProfile = true;
+                       break;
+               default:
+                       assert(false);
+       }
 }
 
 
@@ -170,6 +187,7 @@ GHOST_TSuccess GHOST_ContextCGL::updateDrawingContext()
 
 static void makeAttribList(
         std::vector<NSOpenGLPixelFormatAttribute>& attribs,
+        bool coreProfile, 
         bool stereoVisual,
         int numOfAASamples,
         bool needAlpha,
@@ -178,6 +196,9 @@ static void makeAttribList(
 {
        attribs.clear();
 
+       attribs.push_back(NSOpenGLPFAOpenGLProfile);
+       attribs.push_back(coreProfile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy);
+       
        // Pixel Format Attributes for the windowed NSOpenGLContext
        attribs.push_back(NSOpenGLPFADoubleBuffer);
 
@@ -190,8 +211,7 @@ static void makeAttribList(
                attribs.push_back(NSOpenGLPFANoRecovery);
        }
 
-       /* Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway */
-       //attribs.push_back(NSOpenGLPFAAllowOfflineRenderers);
+       attribs.push_back(NSOpenGLPFAAllowOfflineRenderers); // for automatic GPU switching
 
        attribs.push_back(NSOpenGLPFADepthSize);
        attribs.push_back((NSOpenGLPixelFormatAttribute) 32);
@@ -263,7 +283,7 @@ GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
        NSOpenGLPixelFormat *pixelFormat;
        // TODO: keep pixel format for subsequent windows/contexts instead of recreating each time
 
-       makeAttribList(attribs, m_stereoVisual, m_numOfAASamples, needAlpha, needStencil, softwareGL);
+       makeAttribList(attribs, m_coreProfile, m_stereoVisual, m_numOfAASamples, needAlpha, needStencil, softwareGL);
 
        pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]];
 
@@ -274,7 +294,7 @@ GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
                // (Now that I think about it, does WGL really require the code that it has for finding a lesser match?)
 
                attribs.clear();
-               makeAttribList(attribs, m_stereoVisual, 0, needAlpha, needStencil, softwareGL);
+               makeAttribList(attribs, m_coreProfile, m_stereoVisual, 0, needAlpha, needStencil, softwareGL);
                pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]];
        }
 
@@ -316,7 +336,7 @@ GHOST_TSuccess GHOST_ContextCGL::initializeDrawingContext()
                [m_openGLContext release];
 
                // create software GL context
-               makeAttribList(attribs, m_stereoVisual, m_numOfAASamples, needAlpha, needStencil, softwareGL);
+               makeAttribList(attribs, m_coreProfile, m_stereoVisual, m_numOfAASamples, needAlpha, needStencil, softwareGL);
                pixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:&attribs[0]];
                m_openGLContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:s_sharedOpenGLContext];
                [pixelFormat release];
index 9ac61db40412dde946ac8e5c691e38f08aa0436f..60cdce83602d910993f7c1aa22726ce4f898a6f7 100644 (file)
@@ -255,9 +255,6 @@ const bool GLXEW_ARB_create_context_robustness =
                if (m_contextMajorVersion != 0) {
                        attribs[i++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
                        attribs[i++] = m_contextMajorVersion;
-               }
-
-               if (m_contextMinorVersion != 0) {
                        attribs[i++] = GLX_CONTEXT_MINOR_VERSION_ARB;
                        attribs[i++] = m_contextMinorVersion;
                }
@@ -300,8 +297,8 @@ const bool GLXEW_ARB_create_context_robustness =
                }
        }
        else {
-               /* Create legacy context */
-               m_context = glXCreateContext(m_display, m_visualInfo, s_sharedContext, True);
+               /* Don't create legacy context */
+               fprintf(stderr, "Warning! GLX_ARB_create_context not available.\n");
        }
 
        GHOST_TSuccess success;
@@ -328,8 +325,14 @@ const bool GLXEW_ARB_create_context_robustness =
 
                version = glGetString(GL_VERSION);
 
-               if (!version || version[0] < '2' || ((version[0] == '2') &&  (version[2] < '1'))) {
-                       fprintf(stderr, "Error! Blender requires OpenGL 2.1 to run. Try updating your drivers.\n");
+#if 0 // enable this when Blender switches to 3.3 core profile
+               if (!version || version[0] < '3' || ((version[0] == '3') && (version[2] < '3'))) {
+                       fprintf(stderr, "Error! Blender requires OpenGL 3.3 to run. Try updating your drivers.\n");
+#else
+               // with Mesa, the closest thing to 3.3 compatibility profile is 3.0
+               if (!version || version[0] < '3') {
+                       fprintf(stderr, "Error! Blender requires OpenGL 3.0 (soon 3.3) to run. Try updating your drivers.\n");
+#endif
                        fflush(stderr);
                        /* ugly, but we get crashes unless a whole bunch of systems are patched. */
                        exit(0);
index 64ee692797b5ee87c861a77bd3a5de837ffa3d5d..39ef63fa723054a030ec154717a0352843c94457 100644 (file)
@@ -962,7 +962,7 @@ GHOST_TSuccess GHOST_ContextWGL::initializeDrawingContext()
             strcmp(renderer, "GDI Generic") == 0) && version[0] == '1' && version[2] == '1')
        {
                MessageBox(m_hWnd, "Your system does not use 3D hardware acceleration.\n"
-                                  "Blender requires a graphics driver with OpenGL 2.1 support.\n\n"
+                                  "Blender requires a graphics driver with OpenGL 3.3 support.\n\n"
                                   "This may be caused by:\n"
                                   "* A missing or faulty graphics driver installation.\n"
                                   "  Blender needs a graphics card driver to work correctly.\n"
@@ -973,8 +973,8 @@ GHOST_TSuccess GHOST_ContextWGL::initializeDrawingContext()
                           MB_OK | MB_ICONERROR);
                exit(0);
        }
-       else if (version[0] < '2' || (version[0] == '2' && version[2] < '1')) {
-               MessageBox(m_hWnd, "Blender requires a graphics driver with OpenGL 2.1 support.\n\n"
+       else if (version[0] < '3' || (version[0] == '3' && version[2] < '3')) {
+               MessageBox(m_hWnd, "Blender requires a graphics driver with OpenGL 3.3 support.\n\n"
                                   "The program will now close.",
                           "Blender - Unsupported Graphics Driver!",
                           MB_OK | MB_ICONERROR);
index 580b4dcb82f1e29087b40206c0ba05dae7e1989e..99efcc5ebd7d5721d12e28b126fdc81a72be6169 100644 (file)
 extern "C" WGLEWContext *wglewContext;
 #endif
 
-#ifndef GHOST_OPENGL_WGL_CONTEXT_FLAGS
-#  ifdef WITH_GPU_DEBUG
-#    define GHOST_OPENGL_WGL_CONTEXT_FLAGS WGL_CONTEXT_DEBUG_BIT_ARB
-#  else
-#    define GHOST_OPENGL_WGL_CONTEXT_FLAGS 0
-#  endif
-#endif
-
 #ifndef GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY
 #define GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY 0
 #endif
index 97615dcea96b32af675c48154449572d95aba5c8..b0feb11a6afc079a1076cf40542043891d169d25 100644 (file)
@@ -1086,82 +1086,23 @@ GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
 GHOST_Context *GHOST_WindowCocoa::newDrawingContext(GHOST_TDrawingContextType type)
 {
        if (type == GHOST_kDrawingContextTypeOpenGL) {
-#if !defined(WITH_GL_EGL)
 
-#if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextCGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       GL_CONTEXT_CORE_PROFILE_BIT,
-                       3, 2,
-                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_ES20)
                GHOST_Context *context = new GHOST_ContextCGL(
                        m_wantStereoVisual,
                        m_wantNumOfAASamples,
                        m_window,
                        m_openGLView,
-                       CGL_CONTEXT_ES2_PROFILE_BIT_EXT,
-                       2, 0,
-                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextCGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       0, 0,
-                       m_debug_context,
-                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
-#else
-#  error
-#endif
-
-#else
 
 #if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
+                       GL_CONTEXT_CORE_PROFILE_BIT,
                        3, 2,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       2, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_ES_API);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_openGLView,
-                       0, // profile bit
-                       0, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
 #else
-#  error
+                       0, // no profile bit
+                       2, 1,
 #endif
+                       GHOST_OPENGL_CGL_CONTEXT_FLAGS,
+                       GHOST_OPENGL_CGL_RESET_NOTIFICATION_STRATEGY);
 
-#endif
                if (context->initializeDrawingContext())
                        return context;
                else
index 2aa950f82781e9efa95e3622945d293f10ae2281..1f49adecdefcf88dc4b7a67353e055ffb9fe329b 100644 (file)
@@ -610,97 +610,37 @@ GHOST_TSuccess GHOST_WindowWin32::invalidate()
 GHOST_Context *GHOST_WindowWin32::newDrawingContext(GHOST_TDrawingContextType type)
 {
        if (type == GHOST_kDrawingContextTypeOpenGL) {
-#if !defined(WITH_GL_EGL)
 
+               const int profile_mask =
 #if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextWGL(
-                       m_wantStereoVisual,
-                       m_wantAlphaBackground,
-                       m_wantNumOfAASamples,
-                       m_hWnd,
-                       m_hDC,
-                       WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
-                       3, 2,
-                       GHOST_OPENGL_WGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextWGL(
-                       m_wantStereoVisual,
-                       m_wantAlphaBackground,
-                       m_wantNumOfAASamples,
-                       m_hWnd,
-                       m_hDC,
-                       WGL_CONTEXT_ES2_PROFILE_BIT_EXT,
-                       2, 0,
-                       GHOST_OPENGL_WGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
+                       WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
 #elif defined(WITH_GL_PROFILE_COMPAT)
+                       WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+#else
+#  error // must specify either core or compat at build time
+#endif
+
                GHOST_Context *context = new GHOST_ContextWGL(
                        m_wantStereoVisual,
                        m_wantAlphaBackground,
                        m_wantNumOfAASamples,
                        m_hWnd,
                        m_hDC,
-#if 1
-                       0, // profile bit
-                       2, 1, // GL version requested
+                       profile_mask,
+#if 0
+                       3, 3, // specific GL version requested
+                             // AMD gives us exactly this version
+                             // NVIDIA gives at least this version <-- desired behavior
 #else
-                       // switch to this for Blender 2.8 development
-                       WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB,
-                       3, 2,
+                       2, 1, // any GL version >= 2.1 (hopefully the latest)
+                             // we check later to ensure it's >= 3.3 on Windows
+                             // TODO(merwin): fix properly!
+                             //               2.1 ignores the profile bit & is incompatible with core profile
+                             //               query version of initial dummy context, request that + profile + debug
 #endif
                        (m_debug_context ? WGL_CONTEXT_DEBUG_BIT_ARB : 0),
                        GHOST_OPENGL_WGL_RESET_NOTIFICATION_STRATEGY);
-#else
-#  error
-#endif
-
-#else
 
-#if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_hWnd,
-                       m_hDC,
-                       EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
-                       3, 2,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_hWnd,
-                       m_hDC,
-                       0, // profile bit
-                       2, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_ES_API);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_hWnd,
-                       m_hDC,
-#if 1
-                       0, // profile bit
-                       2, 1, // GL version requested
-#else
-                       // switch to this for Blender 2.8 development
-                       EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT,
-                       3, 2,
-#endif
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#else
-#  error
-#endif
-
-#endif
                if (context->initializeDrawingContext())
                        return context;
                else
index ec2b65e67d0d9ce1b948fb9323fa6d4bfe9598e7..a02117d517e2b7554968669d5ada1c2ca683fcc3 100644 (file)
@@ -1306,33 +1306,24 @@ GHOST_WindowX11::
 GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type)
 {
        if (type == GHOST_kDrawingContextTypeOpenGL) {
-#if !defined(WITH_GL_EGL)
 
+               // During development:
+               //   try 3.3 compatibility profile
+               //   fall back to 3.0 if needed
+               //
+               // Final Blender 2.8:
+               //   try 3.3 core profile
+               //   no fallbacks
+
+               const int profile_mask =
 #if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextGLX(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_display,
-                       m_visualInfo,
-                       (GLXFBConfig)m_fbconfig,
-                       GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
-                       3, 2,
-                       GHOST_OPENGL_GLX_CONTEXT_FLAGS | (m_is_debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
-                       GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextGLX(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_display,
-                       m_visualInfo,
-                       (GLXFBConfig)m_fbconfig,
-                       GLX_CONTEXT_ES2_PROFILE_BIT_EXT,
-                       2, 0,
-                       GHOST_OPENGL_GLX_CONTEXT_FLAGS | (m_is_debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
-                       GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
+                       GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
 #elif defined(WITH_GL_PROFILE_COMPAT)
+                       GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB;
+#else
+#  error // must specify either core or compat at build time
+#endif
+
                GHOST_Context *context = new GHOST_ContextGLX(
                        m_wantStereoVisual,
                        m_wantNumOfAASamples,
@@ -1340,58 +1331,34 @@ GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type
                        m_display,
                        m_visualInfo,
                        (GLXFBConfig)m_fbconfig,
-                       0, // profile bit
-                       0, 0,
+                       profile_mask,
+                       3, 3,
                        GHOST_OPENGL_GLX_CONTEXT_FLAGS | (m_is_debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
                        GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
-#else
-#  error
-#endif
 
-#else
-
-#if defined(WITH_GL_PROFILE_CORE)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_display,
-                       EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT,
-                       3, 2,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#elif defined(WITH_GL_PROFILE_ES20)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_display,
-                       0, // profile bit
-                       2, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_ES_API);
-#elif defined(WITH_GL_PROFILE_COMPAT)
-               GHOST_Context *context = new GHOST_ContextEGL(
-                       m_wantStereoVisual,
-                       m_wantNumOfAASamples,
-                       m_window,
-                       m_display,
-                       0, // profile bit
-                       0, 0,
-                       GHOST_OPENGL_EGL_CONTEXT_FLAGS,
-                       GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY,
-                       EGL_OPENGL_API);
-#else
-#  error
-#endif
-
-#endif
                if (context->initializeDrawingContext())
                        return context;
-               else
+               else {
                        delete context;
+
+                       // since that failed try 3.0 (mostly for Mesa, which doesn't implement compatibility profile)
+                       context = new GHOST_ContextGLX(
+                               m_wantStereoVisual,
+                               m_wantNumOfAASamples,
+                               m_window,
+                               m_display,
+                               m_visualInfo,
+                               (GLXFBConfig)m_fbconfig,
+                               0, // no profile bit
+                               3, 0,
+                               GHOST_OPENGL_GLX_CONTEXT_FLAGS | (m_is_debug_context ? GLX_CONTEXT_DEBUG_BIT_ARB : 0),
+                               GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY);
+
+                       if (context->initializeDrawingContext())
+                               return context;
+                       else
+                               delete context;
+               }
        }
 
        return NULL;
index 0649a2075cd5e328b126f75ed7690a73ab5e844e..36cb5d2ccafcc2f19b8da7af24d4e3432c84efde 100644 (file)
@@ -2,6 +2,8 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+       <key>LSMinimumSystemVersion</key>
+       <string>10.7.0</string>
        <key>CFBundleDocumentTypes</key>
        <array>
                <dict>
@@ -47,5 +49,7 @@
        <string>NSApplication</string>
        <key>NSHighResolutionCapable</key>
        <true/>
+       <key>NSSupportsAutomaticGraphicsSwitching</key>
+       <true/>
 </dict>
 </plist>
diff --git a/release/scripts/presets/hair_dynamics/default.py b/release/scripts/presets/hair_dynamics/default.py
deleted file mode 100644 (file)
index 830d28a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-import bpy
-psys = bpy.context.particle_system
-cloth = bpy.context.particle_system.cloth
-settings = bpy.context.particle_system.cloth.settings
-collision = bpy.context.particle_system.cloth.collision_settings
-
-settings.quality = 5
-settings.mass = 0.30000001192092896
-settings.bending_stiffness = 0.5
-psys.settings.bending_random = 0.0
-settings.bending_damping = 0.5
-settings.air_damping = 1.0
-settings.internal_friction = 0.0
-settings.density_target = 0.0
-settings.density_strength = 0.0
-settings.voxel_cell_size = 0.10000000149011612
-settings.pin_stiffness = 0.0
index 414855c7e3578527d44012a0fabbba6d66b0252f..39a0ad31625553a7f9571a2f31d7e5dddcd4168b 100644 (file)
@@ -47,239 +47,6 @@ def object_ensure_material(obj, mat_name):
     return mat
 
 
-class QuickFur(Operator):
-    bl_idname = "object.quick_fur"
-    bl_label = "Quick Fur"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    density = EnumProperty(
-            name="Fur Density",
-            items=(('LIGHT', "Light", ""),
-                   ('MEDIUM', "Medium", ""),
-                   ('HEAVY', "Heavy", "")),
-            default='MEDIUM',
-            )
-    view_percentage = IntProperty(
-            name="View %",
-            min=1, max=100,
-            soft_min=1, soft_max=100,
-            default=10,
-            )
-    length = FloatProperty(
-            name="Length",
-            min=0.001, max=100,
-            soft_min=0.01, soft_max=10,
-            default=0.1,
-            )
-
-    def execute(self, context):
-        fake_context = context.copy()
-        mesh_objects = [obj for obj in context.selected_objects
-                        if obj.type == 'MESH' and obj.mode == 'OBJECT']
-
-        if not mesh_objects:
-            self.report({'ERROR'}, "Select at least one mesh object")
-            return {'CANCELLED'}
-
-        mat = bpy.data.materials.new("Fur Material")
-        mat.strand.tip_size = 0.25
-        mat.strand.blend_distance = 0.5
-
-        for obj in mesh_objects:
-            fake_context["object"] = obj
-            bpy.ops.object.particle_system_add(fake_context)
-
-            psys = obj.particle_systems[-1]
-            psys.settings.type = 'HAIR'
-
-            if self.density == 'LIGHT':
-                psys.settings.count = 100
-            elif self.density == 'MEDIUM':
-                psys.settings.count = 1000
-            elif self.density == 'HEAVY':
-                psys.settings.count = 10000
-
-            psys.settings.child_nbr = self.view_percentage
-            psys.settings.hair_length = self.length
-            psys.settings.use_strand_primitive = True
-            psys.settings.use_hair_bspline = True
-            psys.settings.child_type = 'INTERPOLATED'
-
-            obj.data.materials.append(mat)
-            psys.settings.material = len(obj.data.materials)
-
-        return {'FINISHED'}
-
-
-class QuickExplode(Operator):
-    bl_idname = "object.quick_explode"
-    bl_label = "Quick Explode"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    style = EnumProperty(
-            name="Explode Style",
-            items=(('EXPLODE', "Explode", ""),
-                   ('BLEND', "Blend", "")),
-            default='EXPLODE',
-            )
-    amount = IntProperty(
-            name="Amount of pieces",
-            min=2, max=10000,
-            soft_min=2, soft_max=10000,
-            default=100,
-            )
-    frame_duration = IntProperty(
-            name="Duration",
-            min=1, max=300000,
-            soft_min=1, soft_max=10000,
-            default=50,
-            )
-
-    frame_start = IntProperty(
-            name="Start Frame",
-            min=1, max=300000,
-            soft_min=1, soft_max=10000,
-            default=1,
-            )
-    frame_end = IntProperty(
-            name="End Frame",
-            min=1, max=300000,
-            soft_min=1, soft_max=10000,
-            default=10,
-            )
-
-    velocity = FloatProperty(
-            name="Outwards Velocity",
-            min=0, max=300000,
-            soft_min=0, soft_max=10,
-            default=1,
-            )
-
-    fade = BoolProperty(
-            name="Fade",
-            description="Fade the pieces over time",
-            default=True,
-            )
-
-    def execute(self, context):
-        fake_context = context.copy()
-        obj_act = context.active_object
-
-        if obj_act is None or obj_act.type != 'MESH':
-            self.report({'ERROR'}, "Active object is not a mesh")
-            return {'CANCELLED'}
-
-        mesh_objects = [obj for obj in context.selected_objects
-                        if obj.type == 'MESH' and obj != obj_act]
-        mesh_objects.insert(0, obj_act)
-
-        if self.style == 'BLEND' and len(mesh_objects) != 2:
-            self.report({'ERROR'}, "Select two mesh objects")
-            self.style = 'EXPLODE'
-            return {'CANCELLED'}
-        elif not mesh_objects:
-            self.report({'ERROR'}, "Select at least one mesh object")
-            return {'CANCELLED'}
-
-        for obj in mesh_objects:
-            if obj.particle_systems:
-                self.report({'ERROR'},
-                            "Object %r already has a "
-                            "particle system" % obj.name)
-
-                return {'CANCELLED'}
-
-        if self.fade:
-            tex = bpy.data.textures.new("Explode fade", 'BLEND')
-            tex.use_color_ramp = True
-
-            if self.style == 'BLEND':
-                tex.color_ramp.elements[0].position = 0.333
-                tex.color_ramp.elements[1].position = 0.666
-
-            tex.color_ramp.elements[0].color[3] = 1.0
-            tex.color_ramp.elements[1].color[3] = 0.0
-
-        if self.style == 'BLEND':
-            from_obj = mesh_objects[1]
-            to_obj = mesh_objects[0]
-
-        for obj in mesh_objects:
-            fake_context["object"] = obj
-            bpy.ops.object.particle_system_add(fake_context)
-
-            settings = obj.particle_systems[-1].settings
-            settings.count = self.amount
-            settings.frame_start = self.frame_start
-            settings.frame_end = self.frame_end - self.frame_duration
-            settings.lifetime = self.frame_duration
-            settings.normal_factor = self.velocity
-            settings.render_type = 'NONE'
-
-            explode = obj.modifiers.new(name='Explode', type='EXPLODE')
-            explode.use_edge_cut = True
-
-            if self.fade:
-                explode.show_dead = False
-                uv = obj.data.uv_textures.new("Explode fade")
-                explode.particle_uv = uv.name
-
-                mat = object_ensure_material(obj, "Explode Fade")
-
-                mat.use_transparency = True
-                mat.use_transparent_shadows = True
-                mat.alpha = 0.0
-                mat.specular_alpha = 0.0
-
-                tex_slot = mat.texture_slots.add()
-
-                tex_slot.texture = tex
-                tex_slot.texture_coords = 'UV'
-                tex_slot.uv_layer = uv.name
-
-                tex_slot.use_map_alpha = True
-
-                if self.style == 'BLEND':
-                    if obj == to_obj:
-                        tex_slot.alpha_factor = -1.0
-                        elem = tex.color_ramp.elements[1]
-                    else:
-                        elem = tex.color_ramp.elements[0]
-                    # Keep already defined alpha!
-                    elem.color[:3] = mat.diffuse_color
-                else:
-                    tex_slot.use_map_color_diffuse = False
-
-            if self.style == 'BLEND':
-                settings.physics_type = 'KEYED'
-                settings.use_emit_random = False
-                settings.rotation_mode = 'NOR'
-
-                psys = obj.particle_systems[-1]
-
-                fake_context["particle_system"] = obj.particle_systems[-1]
-                bpy.ops.particle.new_target(fake_context)
-                bpy.ops.particle.new_target(fake_context)
-
-                if obj == from_obj:
-                    psys.targets[1].object = to_obj
-                else:
-                    psys.targets[0].object = from_obj
-                    settings.normal_factor = -self.velocity
-                    explode.show_unborn = False
-                    explode.show_dead = True
-            else:
-                settings.factor_random = self.velocity
-                settings.angular_velocity_factor = self.velocity / 10.0
-
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        self.frame_start = context.scene.frame_current
-        self.frame_end = self.frame_start + self.frame_duration
-        return self.execute(context)
-
-
 def obj_bb_minmax(obj, min_co, max_co):
     for i in range(0, 8):
         bb_vec = obj.matrix_world * Vector(obj.bound_box[i])
index e01e509b2927db1c12c07a85b4a56351521a983c..ea2794195e3cda2e1c4e1f5bc8c9d9cff34ca23b 100644 (file)
@@ -384,36 +384,6 @@ class AddPresetFluid(AddPresetBase, Operator):
     preset_subdir = "fluid"
 
 
-class AddPresetHairDynamics(AddPresetBase, Operator):
-    """Add or remove a Hair Dynamics Preset"""
-    bl_idname = "particle.hair_dynamics_preset_add"
-    bl_label = "Add Hair Dynamics Preset"
-    preset_menu = "PARTICLE_MT_hair_dynamics_presets"
-
-    preset_defines = [
-        "psys = bpy.context.particle_system",
-        "cloth = bpy.context.particle_system.cloth",
-        "settings = bpy.context.particle_system.cloth.settings",
-        "collision = bpy.context.particle_system.cloth.collision_settings",
-    ]
-
-    preset_subdir = "hair_dynamics"
-
-    preset_values = [
-        "settings.quality",
-        "settings.mass",
-        "settings.bending_stiffness",
-        "psys.settings.bending_random",
-        "settings.bending_damping",
-        "settings.air_damping",
-        "settings.internal_friction",
-        "settings.density_target",
-        "settings.density_strength",
-        "settings.voxel_cell_size",
-        "settings.pin_stiffness",
-        ]
-
-
 class AddPresetSunSky(AddPresetBase, Operator):
     """Add or remove a Sky & Atmosphere Preset"""
     bl_idname = "lamp.sunsky_preset_add"
index df4a93bb87faefe88e8589bc34f3d5415e8f87a2..1ef9354ed0eca41015e8ac8ebda47a1a99710ee6 100644 (file)
@@ -199,8 +199,6 @@ class VIEW3D_OT_select_or_deselect_all(Operator):
                         bpy.ops.armature.select_all(action='DESELECT')
                 elif active_object.mode == 'POSE':
                     bpy.ops.pose.select_all(action='DESELECT')
-                elif active_object.mode == 'PARTICLE_EDIT':
-                    bpy.ops.particle.select_all(action='DESELECT')
                 else:
                     bpy.ops.object.select_all(action='DESELECT')
             else:
index 2389be6787d2dfc5cd7f213918e357b754a147f5..ac1503921095114e0582a3d3d063f83e90b22f51 100644 (file)
@@ -47,7 +47,6 @@ _modules = [
     "properties_object",
     "properties_paint_common",
     "properties_grease_pencil_common",
-    "properties_particle",
     "properties_physics_cloth",
     "properties_physics_common",
     "properties_physics_dynamicpaint",
index 540c29f31e4699c7b254d4e3fb62a65a1434b8c8..b99b5dceab0c1ac8bd2e5db504acc5de4a1078dd 100644 (file)
@@ -691,40 +691,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col = split.column()
 
-    def PARTICLE_INSTANCE(self, layout, ob, md):
-        layout.prop(md, "object")
-        layout.prop(md, "particle_system_index", text="Particle System")
-
-        split = layout.split()
-        col = split.column()
-        col.label(text="Create From:")
-        col.prop(md, "use_normal")
-        col.prop(md, "use_children")
-        col.prop(md, "use_size")
-
-        col = split.column()
-        col.label(text="Show Particles When:")
-        col.prop(md, "show_alive")
-        col.prop(md, "show_unborn")
-        col.prop(md, "show_dead")
-
-        layout.separator()
-
-        layout.prop(md, "use_path", text="Create Along Paths")
-
-        split = layout.split()
-        split.active = md.use_path
-        col = split.column()
-        col.row().prop(md, "axis", expand=True)
-        col.prop(md, "use_preserve_shape")
-
-        col = split.column()
-        col.prop(md, "position", slider=True)
-        col.prop(md, "random_position", text="Random", slider=True)
-
-    def PARTICLE_SYSTEM(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Particle context")
-
     def SCREW(self, layout, ob, md):
         split = layout.split()
 
index cca142b645cfe514eb79d2bd465d9abc081f7083..c18aa10e229ff0730d4e65e35fd840e4db9f5a7e 100644 (file)
@@ -40,8 +40,6 @@ class UnifiedPaintPanel:
                 return toolsettings.image_paint
 
             return None
-        elif context.particle_edit_object:
-            return toolsettings.particle_edit
 
         return None
 
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
deleted file mode 100644 (file)
index 4e2666d..0000000
+++ /dev/null
@@ -1,1408 +0,0 @@
-# ##### 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, Menu
-from rna_prop_ui import PropertyPanel
-from bpy.app.translations import pgettext_iface as iface_
-
-from bl_ui.properties_physics_common import (
-        point_cache_ui,
-        effector_weights_ui,
-        basic_force_field_settings_ui,
-        basic_force_field_falloff_ui,
-        )
-
-
-def particle_panel_enabled(context, psys):
-    if psys is None:
-        return True
-    phystype = psys.settings.physics_type
-    if psys.settings.type in {'EMITTER', 'REACTOR'} and phystype in {'NO', 'KEYED'}:
-        return True
-    else:
-        return (psys.point_cache.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable)
-
-
-def particle_panel_poll(cls, context):
-    psys = context.particle_system
-    engine = context.scene.render.engine
-    settings = 0
-
-    if psys:
-        settings = psys.settings
-    elif isinstance(context.space_data.pin_id, bpy.types.ParticleSettings):
-        settings = context.space_data.pin_id
-
-    if not settings:
-        return False
-
-    return settings.is_fluid is False and (engine in cls.COMPAT_ENGINES)
-
-
-def particle_get_settings(context):
-    if context.particle_system:
-        return context.particle_system.settings
-    elif isinstance(context.space_data.pin_id, bpy.types.ParticleSettings):
-        return context.space_data.pin_id
-    return None
-
-
-class PARTICLE_MT_specials(Menu):
-    bl_label = "Particle Specials"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        props = layout.operator("particle.copy_particle_systems", text="Copy Active to Selected Objects")
-        props.use_active = True
-        props.remove_target_particles = False
-
-        props = layout.operator("particle.copy_particle_systems", text="Copy All to Selected Objects")
-        props.use_active = False
-        props.remove_target_particles = True
-
-        layout.operator("particle.duplicate_particle_system")
-
-
-class PARTICLE_MT_hair_dynamics_presets(Menu):
-    bl_label = "Hair Dynamics Presets"
-    preset_subdir = "hair_dynamics"
-    preset_operator = "script.execute_preset"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-    draw = Menu.draw_preset
-
-
-class ParticleButtonsPanel:
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "particle"
-
-    @classmethod
-    def poll(cls, context):
-        return particle_panel_poll(cls, context)
-
-
-def find_modifier(ob, psys):
-    for md in ob.modifiers:
-        if md.type == 'PARTICLE_SYSTEM':
-            if md.particle_system == psys:
-                return md
-
-
-class PARTICLE_UL_particle_systems(bpy.types.UIList):
-    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):
-        ob = data
-        psys = item
-
-        if self.layout_type in {'DEFAULT', 'COMPACT'}:
-            md = find_modifier(ob, psys)
-
-            layout.prop(psys, "name", text="", emboss=False, icon_value=icon)
-            if md:
-                layout.prop(md, "show_render", emboss=False, icon_only=True, icon='RESTRICT_RENDER_OFF' if md.show_render else 'RESTRICT_RENDER_ON')
-                layout.prop(md, "show_viewport", emboss=False, icon_only=True, icon='RESTRICT_VIEW_OFF' if md.show_viewport else 'RESTRICT_VIEW_ON')
-
-        elif self.layout_type == 'GRID':
-            layout.alignment = 'CENTER'
-            layout.label(text="", icon_value=icon)
-
-
-class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
-    bl_label = ""
-    bl_options = {'HIDE_HEADER'}
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-
-    @classmethod
-    def poll(cls, context):
-        engine = context.scene.render.engine
-        return (context.particle_system or context.object or context.space_data.pin_id) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        if context.scene.render.engine == 'BLENDER_GAME':
-            layout.label("Not available in the Game Engine")
-            return
-
-        ob = context.object
-        psys = context.particle_system
-        part = 0
-
-        if ob:
-            row = layout.row()
-
-            row.template_list("PARTICLE_UL_particle_systems", "particle_systems", ob, "particle_systems",
-                              ob.particle_systems, "active_index", rows=1)
-
-            col = row.column(align=True)
-            col.operator("object.particle_system_add", icon='ZOOMIN', text="")
-            col.operator("object.particle_system_remove", icon='ZOOMOUT', text="")
-            col.menu("PARTICLE_MT_specials", icon='DOWNARROW_HLT', text="")
-
-        if psys is None:
-            part = particle_get_settings(context)
-
-            layout.operator("object.particle_system_add", icon='ZOOMIN', text="New")
-
-            if part is None:
-                return
-
-            layout.template_ID(context.space_data, "pin_id")
-
-            if part.is_fluid:
-                layout.label(text="Settings used for fluid")
-                return
-
-            layout.prop(part, "type", text="Type")
-
-        elif not psys.settings:
-            split = layout.split(percentage=0.32)
-
-            col = split.column()
-            col.label(text="Settings:")
-
-            col = split.column()
-            col.template_ID(psys, "settings", new="particle.new")
-        else:
-            part = psys.settings
-
-            split = layout.split(percentage=0.32)
-            col = split.column()
-            if part.is_fluid is False:
-                col.label(text="Settings:")
-                col.label(text="Type:")
-
-            col = split.column()
-            if part.is_fluid is False:
-                row = col.row()
-                row.enabled = particle_panel_enabled(context, psys)
-                row.template_ID(psys, "settings", new="particle.new")
-
-            if part.is_fluid:
-                layout.label(text=iface_("%d fluid particles for this frame") % part.count, translate=False)
-                return
-
-            row = col.row()
-            row.enabled = particle_panel_enabled(context, psys)
-            row.prop(part, "type", text="")
-            row.prop(psys, "seed")
-
-        if part:
-            split = layout.split(percentage=0.65)
-            if part.type == 'HAIR':
-                if psys is not None and psys.is_edited:
-                    split.operator("particle.edited_clear", text="Free Edit")
-                else:
-                    row = split.row()
-                    row.enabled = particle_panel_enabled(context, psys)
-                    row.prop(part, "regrow_hair")
-                    row.prop(part, "use_advanced_hair")
-                row = split.row()
-                row.enabled = particle_panel_enabled(context, psys)
-                row.prop(part, "hair_step")
-                if psys is not None and psys.is_edited:
-                    if psys.is_global_hair:
-                        row = layout.row(align=True)
-                        row.operator("particle.connect_hair").all = False
-                        row.operator("particle.connect_hair", text="Connect All").all = True
-                    else:
-                        row = layout.row(align=True)
-                        row.operator("particle.disconnect_hair").all = False
-                        row.operator("particle.disconnect_hair", text="Disconnect All").all = True
-            elif psys is not None and part.type == 'REACTOR':
-                split.enabled = particle_panel_enabled(context, psys)
-                split.prop(psys, "reactor_target_object")
-                split.prop(psys, "reactor_target_particle_system", text="Particle System")
-
-
-class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
-    bl_label = "Emission"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        psys = context.particle_system
-        settings = particle_get_settings(context)
-
-        if settings is None:
-            return False
-        if settings.is_fluid:
-            return False
-        if particle_panel_poll(PARTICLE_PT_emission, context):
-            return psys is None or not context.particle_system.point_cache.use_external
-        return False
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        layout.enabled = particle_panel_enabled(context, psys) and (psys is None or not psys.has_multiple_caches)
-
-        row = layout.row()
-        row.active = part.emit_from == 'VERT' or part.distribution != 'GRID'
-        row.prop(part, "count")
-
-        if part.type == 'HAIR':
-            row.prop(part, "hair_length")
-            if not part.use_advanced_hair:
-                row = layout.row()
-                row.prop(part, "use_modifier_stack")
-                return
-
-        if part.type != 'HAIR':
-            split = layout.split()
-
-            col = split.column(align=True)
-            col.prop(part, "frame_start")
-            col.prop(part, "frame_end")
-
-            col = split.column(align=True)
-            col.prop(part, "lifetime")
-            col.prop(part, "lifetime_random", slider=True)
-
-        layout.label(text="Emit From:")
-        layout.prop(part, "emit_from", expand=True)
-
-        row = layout.row()
-        if part.emit_from == 'VERT':
-            row.prop(part, "use_emit_random")
-        elif part.distribution == 'GRID':
-            row.prop(part, "invert_grid")
-            row.prop(part, "hexagonal_grid")
-        else:
-            row.prop(part, "use_emit_random")
-            row.prop(part, "use_even_distribution")
-
-        if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
-            layout.prop(part, "distribution", expand=True)
-
-            row = layout.row()
-            if part.distribution == 'JIT':
-                row.prop(part, "userjit", text="Particles/Face")
-                row.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
-            elif part.distribution == 'GRID':
-                row.prop(part, "grid_resolution")
-                row.prop(part, "grid_random", text="Random", slider=True)
-
-        row = layout.row()
-        row.prop(part, "use_modifier_stack")
-
-
-class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
-    bl_label = "Hair dynamics"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        psys = context.particle_system
-        engine = context.scene.render.engine
-        if psys is None:
-            return False
-        if psys.settings is None:
-            return False
-        return psys.settings.type == 'HAIR' and (engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        psys = context.particle_system
-        self.layout.prop(psys, "use_hair_dynamics", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-
-        if not psys.cloth:
-            return
-
-        cloth_md = psys.cloth
-        cloth = cloth_md.settings
-        result = cloth_md.solver_result
-
-        layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked is False
-
-        row = layout.row(align=True)
-        row.menu("PARTICLE_MT_hair_dynamics_presets", text=bpy.types.PARTICLE_MT_hair_dynamics_presets.bl_label)
-        row.operator("particle.hair_dynamics_preset_add", text="", icon='ZOOMIN')
-        row.operator("particle.hair_dynamics_preset_add", text="", icon='ZOOMOUT').remove_active = True
-
-        split = layout.column()
-
-        col = split.column()
-        col.label(text="Structure")
-        col.prop(cloth, "mass")
-        sub = col.column(align=True)
-        subsub = sub.row(align=True)
-        subsub.prop(cloth, "bending_stiffness", text="Stiffness")
-        subsub.prop(psys.settings, "bending_random", text="Random")
-        sub.prop(cloth, "bending_damping", text="Damping")
-        # XXX has no noticeable effect with stiff hair structure springs
-        #col.prop(cloth, "spring_damping", text="Damping")
-
-        split.separator()
-
-        col = split.column()
-        col.label(text="Volume")
-        col.prop(cloth, "air_damping", text="Air Drag")
-        col.prop(cloth, "internal_friction", slider=True)
-        sub = col.column(align=True)
-        sub.prop(cloth, "density_target", text="Density Target")
-        sub.prop(cloth, "density_strength", slider=True, text="Strength")
-        col.prop(cloth, "voxel_cell_size")
-
-        split.separator()
-
-        col = split.column()
-        col.label(text="Pinning")
-        col.prop(cloth, "pin_stiffness", text="Goal Strength")
-
-        split.separator()
-
-        col = split.column()
-        col.label(text="Quality:")
-        col.prop(cloth, "quality", text="Steps", slider=True)
-
-        row = col.row()
-        row.prop(psys.settings, "show_hair_grid", text="HairGrid")
-
-        if result:
-            box = layout.box()
-
-            if not result.status:
-                label = " "
-                icon = 'NONE'
-            elif result.status == {'SUCCESS'}:
-                label = "Success"
-                icon = 'NONE'
-            elif result.status - {'SUCCESS'} == {'NO_CONVERGENCE'}:
-                label = "No Convergence"
-                icon = 'ERROR'
-            else:
-                label = "ERROR"
-                icon = 'ERROR'
-            box.label(label, icon=icon)
-            box.label("Iterations: %d .. %d (avg. %d)" % (result.min_iterations, result.max_iterations, result.avg_iterations))
-            box.label("Error: %.5f .. %.5f (avg. %.5f)" % (result.min_error, result.max_error, result.avg_error))
-
-
-class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
-    bl_label = "Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        psys = context.particle_system
-        engine = context.scene.render.engine
-        if psys is None:
-            return False
-        if psys.settings is None:
-            return False
-        if psys.settings.is_fluid:
-            return False
-        phystype = psys.settings.physics_type
-        if phystype == 'NO' or phystype == 'KEYED':
-            return False
-        return (psys.settings.type in {'EMITTER', 'REACTOR'} or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES
-
-    def draw(self, context):
-        psys = context.particle_system
-
-        point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS')
-
-
-class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
-    bl_label = "Velocity"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        if particle_panel_poll(PARTICLE_PT_velocity, context):
-            psys = context.particle_system
-            settings = particle_get_settings(context)
-
-            if settings.type == 'HAIR' and not settings.use_advanced_hair:
-                return False
-            return settings.physics_type != 'BOIDS' and (psys is None or not psys.point_cache.use_external)
-        else:
-            return False
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        layout.enabled = particle_panel_enabled(context, psys)
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Emitter Geometry:")
-        col.prop(part, "normal_factor")
-        sub = col.column(align=True)
-        sub.prop(part, "tangent_factor")
-        sub.prop(part, "tangent_phase", slider=True)
-
-        col = split.column()
-        col.label(text="Emitter Object:")
-        col.prop(part, "object_align_factor", text="")
-
-        layout.label(text="Other:")
-        row = layout.row()
-        if part.emit_from == 'PARTICLE':
-            row.prop(part, "particle_factor")
-        else:
-            row.prop(part, "object_factor", slider=True)
-        row.prop(part, "factor_random")
-
-        #if part.type=='REACTOR':
-        #    sub.prop(part, "reactor_factor")
-        #    sub.prop(part, "reaction_shape", slider=True)
-
-
-class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
-    bl_label = "Rotation"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        if particle_panel_poll(PARTICLE_PT_rotation, context):
-            psys = context.particle_system
-            settings = particle_get_settings(context)
-
-            if settings.type == 'HAIR' and not settings.use_advanced_hair:
-                return False
-            return settings.physics_type != 'BOIDS' and (psys is None or not psys.point_cache.use_external)
-        else:
-            return False
-
-    def draw_header(self, context):
-        psys = context.particle_system
-        if psys:
-            part = psys.settings
-        else:
-            part = context.space_data.pin_id
-
-        self.layout.prop(part, "use_rotations", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        if psys:
-            part = psys.settings
-        else:
-            part = context.space_data.pin_id
-
-        layout.enabled = particle_panel_enabled(context, psys) and part.use_rotations
-
-        layout.label(text="Initial Orientation:")
-
-        split = layout.split()
-
-        col = split.column(align=True)
-        col.prop(part, "rotation_mode", text="")
-        col.prop(part, "rotation_factor_random", slider=True, text="Random")
-
-        col = split.column(align=True)
-        col.prop(part, "phase_factor", slider=True)
-        col.prop(part, "phase_factor_random", text="Random", slider=True)
-
-        if part.type != 'HAIR':
-            layout.label(text="Angular Velocity:")
-
-            split = layout.split()
-
-            col = split.column(align=True)
-            col.prop(part, "angular_velocity_mode", text="")
-            sub = col.column(align=True)
-            sub.active = part.angular_velocity_mode != 'NONE'
-            sub.prop(part, "angular_velocity_factor", text="")
-
-            col = split.column()
-            col.prop(part, "use_dynamic_rotation")
-
-
-class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
-    bl_label = "Physics"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        if particle_panel_poll(PARTICLE_PT_physics, context):
-            psys = context.particle_system
-            settings = particle_get_settings(context)
-
-            if settings.type == 'HAIR' and not settings.use_advanced_hair:
-                return False
-            return psys is None or not psys.point_cache.use_external
-        else:
-            return False
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        layout.enabled = particle_panel_enabled(context, psys)
-
-        layout.prop(part, "physics_type", expand=True)
-
-        row = layout.row()
-        col = row.column(align=True)
-        col.prop(part, "particle_size")
-        col.prop(part, "size_random", slider=True)
-
-        if part.physics_type != 'NO':
-            col = row.column(align=True)
-            col.prop(part, "mass")
-            col.prop(part, "use_multiply_size_mass", text="Multiply mass with size")
-
-        if part.physics_type in {'NEWTON', 'FLUID'}:
-            split = layout.split()
-
-            col = split.column()
-            col.label(text="Forces:")
-            col.prop(part, "brownian_factor")
-            col.prop(part, "drag_factor", slider=True)
-            col.prop(part, "damping", slider=True)
-
-            col = split.column()
-            col.label(text="Integration:")
-            col.prop(part, "integrator", text="")
-            col.prop(part, "timestep")
-            sub = col.row()
-            sub.prop(part, "subframes")
-            supports_courant = part.physics_type == 'FLUID'
-            subsub = sub.row()
-            subsub.enabled = supports_courant
-            subsub.prop(part, "use_adaptive_subframes", text="")
-            if supports_courant and part.use_adaptive_subframes:
-                col.prop(part, "courant_target", text="Threshold")
-
-            row = layout.row()
-            row.prop(part, "use_size_deflect")
-            row.prop(part, "use_die_on_collision")
-
-            layout.prop(part, "collision_group")
-
-            if part.physics_type == 'FLUID':
-                fluid = part.fluid
-
-                split = layout.split()
-                sub = split.row()
-                sub.prop(fluid, "solver", expand=True)
-
-                split = layout.split()
-
-                col = split.column()
-                col.label(text="Fluid properties:")
-                col.prop(fluid, "stiffness", text="Stiffness")
-                col.prop(fluid, "linear_viscosity", text="Viscosity")
-                col.prop(fluid, "buoyancy", text="Buoyancy", slider=True)
-
-                col = split.column()
-                col.label(text="Advanced:")
-
-                if fluid.solver == 'DDR':
-                    sub = col.row()
-                    sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion)
-                    sub.prop(fluid, "factor_repulsion", text="")
-
-                    sub = col.row()
-                    sub.prop(fluid, "stiff_viscosity", slider=fluid.factor_stiff_viscosity)
-                    sub.prop(fluid, "factor_stiff_viscosity", text="")
-
-                sub = col.row()
-                sub.prop(fluid, "fluid_radius", slider=fluid.factor_radius)
-                sub.prop(fluid, "factor_radius", text="")
-
-                sub = col.row()
-                sub.prop(fluid, "rest_density", slider=fluid.use_factor_density)
-                sub.prop(fluid, "use_factor_density", text="")
-
-                if fluid.solver == 'CLASSICAL':
-                    # With the classical solver, it is possible to calculate the
-                    # spacing between particles when the fluid is at rest. This
-                    # makes it easier to set stable initial conditions.
-                    particle_volume = part.mass / fluid.rest_density
-                    spacing = pow(particle_volume, 1.0 / 3.0)
-                    sub = col.row()
-                    sub.label(text="Spacing: %g" % spacing)
-
-                elif fluid.solver == 'DDR':
-                    split = layout.split()
-
-                    col = split.column()
-                    col.label(text="Springs:")
-                    col.prop(fluid, "spring_force", text="Force")
-                    col.prop(fluid, "use_viscoelastic_springs")
-                    sub = col.column(align=True)
-                    sub.active = fluid.use_viscoelastic_springs
-                    sub.prop(fluid, "yield_ratio", slider=True)
-                    sub.prop(fluid, "plasticity", slider=True)
-
-                    col = split.column()
-                    col.label(text="Advanced:")
-                    sub = col.row()
-                    sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length)
-                    sub.prop(fluid, "factor_rest_length", text="")
-                    col.label(text="")
-                    sub = col.column()
-                    sub.active = fluid.use_viscoelastic_springs
-                    sub.prop(fluid, "use_initial_rest_length")
-                    sub.prop(fluid, "spring_frames", text="Frames")
-
-        elif part.physics_type == 'KEYED':
-            split = layout.split()
-            sub = split.column()
-
-            row = layout.row()
-            col = row.column()
-            col.active = not psys.use_keyed_timing
-            col.prop(part, "keyed_loops", text="Loops")
-            if psys:
-                row.prop(psys, "use_keyed_timing", text="Use Timing")
-
-            layout.label(text="Keys:")
-        elif part.physics_type == 'BOIDS':
-            boids = part.boids
-
-            row = layout.row()
-            row.prop(boids, "use_flight")
-            row.prop(boids, "use_land")
-            row.prop(boids, "use_climb")
-
-            split = layout.split()
-
-            col = split.column(align=True)
-            col.active = boids.use_flight
-            col.prop(boids, "air_speed_max")
-            col.prop(boids, "air_speed_min", slider=True)
-            col.prop(boids, "air_acc_max", slider=True)
-            col.prop(boids, "air_ave_max", slider=True)
-            col.prop(boids, "air_personal_space")
-            row = col.row(align=True)
-            row.active = (boids.use_land or boids.use_climb) and boids.use_flight
-            row.prop(boids, "land_smooth")
-
-            col = split.column(align=True)
-            col.active = boids.use_land or boids.use_climb
-            col.prop(boids, "land_speed_max")
-            col.prop(boids, "land_jump_speed")
-            col.prop(boids, "land_acc_max", slider=True)
-            col.prop(boids, "land_ave_max", slider=True)
-            col.prop(boids, "land_personal_space")
-            col.prop(boids, "land_stick_force")
-
-            layout.prop(part, "collision_group")
-
-            split = layout.split()
-
-            col = split.column(align=True)
-            col.label(text="Battle:")
-            col.prop(boids, "health")
-            col.prop(boids, "strength")
-            col.prop(boids, "aggression")
-            col.prop(boids, "accuracy")
-            col.prop(boids, "range")
-
-            col = split.column()
-            col.label(text="Misc:")
-            col.prop(boids, "bank", slider=True)
-            col.prop(boids, "pitch", slider=True)
-            col.prop(boids, "height", slider=True)
-
-        if psys and part.physics_type in {'KEYED', 'BOIDS', 'FLUID'}:
-            if part.physics_type == 'BOIDS':
-                layout.label(text="Relations:")
-            elif part.physics_type == 'FLUID':
-                layout.label(text="Fluid interaction:")
-
-            row = layout.row()
-            row.template_list("UI_UL_list", "particle_targets", psys, "targets", psys, "active_particle_target_index", rows=4)
-
-            col = row.column()
-            sub = col.row()
-            subsub = sub.column(align=True)
-            subsub.operator("particle.new_target", icon='ZOOMIN', text="")
-            subsub.operator("particle.target_remove", icon='ZOOMOUT', text="")
-            sub = col.row()
-            subsub = sub.column(align=True)
-            subsub.operator("particle.target_move_up", icon='MOVE_UP_VEC', text="")
-            subsub.operator("particle.target_move_down", icon='MOVE_DOWN_VEC', text="")
-
-            key = psys.active_particle_target
-            if key:
-                row = layout.row()
-                if part.physics_type == 'KEYED':
-                    col = row.column()
-                    #doesn't work yet
-                    #col.alert = key.valid
-                    col.prop(key, "object", text="")
-                    col.prop(key, "system", text="System")
-                    col = row.column()
-                    col.active = psys.use_keyed_timing
-                    col.prop(key, "time")
-                    col.prop(key, "duration")
-                elif part.physics_type == 'BOIDS':
-                    sub = row.row()
-                    #doesn't work yet
-                    #sub.alert = key.valid
-                    sub.prop(key, "object", text="")
-                    sub.prop(key, "system", text="System")
-
-                    layout.prop(key, "alliance", expand=True)
-                elif part.physics_type == 'FLUID':
-                    sub = row.row()
-                    #doesn't work yet
-                    #sub.alert = key.valid
-                    sub.prop(key, "object", text="")
-                    sub.prop(key, "system", text="System")
-
-
-class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
-    bl_label = "Boid Brain"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        psys = context.particle_system
-        settings = particle_get_settings(context)
-        engine = context.scene.render.engine
-
-        if settings is None:
-            return False
-        if psys is not None and psys.point_cache.use_external:
-            return False
-        return settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES
-
-    def draw(self, context):
-        layout = self.layout
-
-        boids = particle_get_settings(context).boids
-
-        layout.enabled = particle_panel_enabled(context, context.particle_system)
-
-        # Currently boids can only use the first state so these are commented out for now.
-        #row = layout.row()
-        #row.template_list("UI_UL_list", "particle_boids", boids, "states",
-        #                  boids, "active_boid_state_index", compact="True")
-        #col = row.row()
-        #sub = col.row(align=True)
-        #sub.operator("boid.state_add", icon='ZOOMIN', text="")
-        #sub.operator("boid.state_del", icon='ZOOMOUT', text="")
-        #sub = row.row(align=True)
-        #sub.operator("boid.state_move_up", icon='MOVE_UP_VEC', text="")
-        #sub.operator("boid.state_move_down", icon='MOVE_DOWN_VEC', text="")
-
-        state = boids.active_boid_state
-
-        #layout.prop(state, "name", text="State name")
-
-        row = layout.row()
-        row.prop(state, "ruleset_type")
-        if state.ruleset_type == 'FUZZY':
-            row.prop(state, "rule_fuzzy", slider=True)
-        else:
-            row.label(text="")
-
-        row = layout.row()
-        row.template_list("UI_UL_list", "particle_boids_rules", state, "rules", state, "active_boid_rule_index", rows=4)
-
-        col = row.column()
-        sub = col.row()
-        subsub = sub.column(align=True)
-        subsub.operator_menu_enum("boid.rule_add", "type", icon='ZOOMIN', text="")
-        subsub.operator("boid.rule_del", icon='ZOOMOUT', text="")
-        sub = col.row()
-        subsub = sub.column(align=True)
-        subsub.operator("boid.rule_move_up", icon='MOVE_UP_VEC', text="")
-        subsub.operator("boid.rule_move_down", icon='MOVE_DOWN_VEC', text="")
-
-        rule = state.active_boid_rule
-
-        if rule:
-            row = layout.row()
-            row.prop(rule, "name", text="")
-            #somebody make nice icons for boids here please! -jahka
-            row.prop(rule, "use_in_air", icon='MOVE_UP_VEC', text="")
-            row.prop(rule, "use_on_land", icon='MOVE_DOWN_VEC', text="")
-
-            row = layout.row()
-
-            if rule.type == 'GOAL':
-                row.prop(rule, "object")
-                row = layout.row()
-                row.prop(rule, "use_predict")
-            elif rule.type == 'AVOID':
-                row.prop(rule, "object")
-                row = layout.row()
-                row.prop(rule, "use_predict")
-                row.prop(rule, "fear_factor")
-            elif rule.type == 'FOLLOW_PATH':
-                row.label(text="Not yet functional")
-            elif rule.type == 'AVOID_COLLISION':
-                row.prop(rule, "use_avoid")
-                row.prop(rule, "use_avoid_collision")
-                row.prop(rule, "look_ahead")
-            elif rule.type == 'FOLLOW_LEADER':
-                row.prop(rule, "object", text="")
-                row.prop(rule, "distance")
-                row = layout.row()
-                row.prop(rule, "use_line")
-                sub = row.row()
-                sub.active = rule.line
-                sub.prop(rule, "queue_count")
-            elif rule.type == 'AVERAGE_SPEED':
-                row.prop(rule, "speed", slider=True)
-                row.prop(rule, "wander", slider=True)
-                row.prop(rule, "level", slider=True)
-            elif rule.type == 'FIGHT':
-                row.prop(rule, "distance")
-                row.prop(rule, "flee_distance")
-
-
-class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
-    bl_label = "Render"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        settings = particle_get_settings(context)
-        engine = context.scene.render.engine
-        if settings is None:
-            return False
-
-        return engine in cls.COMPAT_ENGINES
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        if psys:
-            row = layout.row()
-            if part.render_type in {'OBJECT', 'GROUP'}:
-                row.enabled = False
-            row.prop(part, "material_slot", text="")
-            row.prop(psys, "parent")
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(part, "use_render_emitter")
-        col.prop(part, "use_parent_particles")
-
-        col = split.column()
-        col.prop(part, "show_unborn")
-        col.prop(part, "use_dead")
-
-        layout.prop(part, "render_type", expand=True)
-
-        split = layout.split()
-
-        col = split.column()
-
-        if part.render_type == 'LINE':
-            col.prop(part, "line_length_tail")
-            col.prop(part, "line_length_head")
-
-            split.prop(part, "use_velocity_length")
-        elif part.render_type == 'PATH':
-            col.prop(part, "use_strand_primitive")
-            sub = col.column()
-            sub.active = (part.use_strand_primitive is False)
-            sub.prop(part, "use_render_adaptive")
-            sub = col.column()
-            sub.active = part.use_render_adaptive or part.use_strand_primitive is True
-            sub.prop(part, "adaptive_angle")
-            sub = col.column()
-            sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False)
-            sub.prop(part, "adaptive_pixel")
-            col.prop(part, "use_hair_bspline")
-            col.prop(part, "render_step", text="Steps")
-
-            col = split.column()
-            col.label(text="Timing:")
-            col.prop(part, "use_absolute_path_time")
-
-            if part.type == 'HAIR' or psys.point_cache.is_baked:
-                col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
-            else:
-                col.prop(part, "trail_count")
-
-            col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time)
-            col.prop(part, "length_random", text="Random", slider=True)
-
-            row = layout.row()
-            col = row.column()
-
-            if part.type == 'HAIR' and part.use_strand_primitive is True and part.child_type == 'INTERPOLATED':
-                layout.prop(part, "use_simplify")
-                if part.use_simplify is True:
-                    row = layout.row()
-                    row.prop(part, "simplify_refsize")
-                    row.prop(part, "simplify_rate")
-                    row.prop(part, "simplify_transition")
-                    row = layout.row()
-                    row.prop(part, "use_simplify_viewport")
-                    sub = row.row()
-                    sub.active = part.use_simplify_viewport is True
-                    sub.prop(part, "simplify_viewport")
-
-        elif part.render_type == 'OBJECT':
-            col.prop(part, "dupli_object")
-            sub = col.row()
-            sub.prop(part, "use_global_dupli")
-            sub.prop(part, "use_rotation_dupli")
-            sub.prop(part, "use_scale_dupli")
-        elif part.render_type == 'GROUP':
-            col.prop(part, "dupli_group")
-            split = layout.split()
-
-            col = split.column()
-            col.prop(part, "use_whole_group")
-            sub = col.column()
-            sub.active = (part.use_whole_group is False)
-            sub.prop(part, "use_group_pick_random")
-            sub.prop(part, "use_group_count")
-
-            col = split.column()
-            sub = col.column()
-            sub.active = (part.use_whole_group is False)
-            sub.prop(part, "use_global_dupli")
-            sub.prop(part, "use_rotation_dupli")
-            sub.prop(part, "use_scale_dupli")
-
-            if part.use_group_count and not part.use_whole_group:
-                row = layout.row()
-                row.template_list("UI_UL_list", "particle_dupli_weights", part, "dupli_weights",
-                                  part, "active_dupliweight_index")
-
-                col = row.column()
-                sub = col.row()
-                subsub = sub.column(align=True)
-                subsub.operator("particle.dupliob_copy", icon='ZOOMIN', text="")
-                subsub.operator("particle.dupliob_remove", icon='ZOOMOUT', text="")
-                subsub.operator("particle.dupliob_move_up", icon='MOVE_UP_VEC', text="")
-                subsub.operator("particle.dupliob_move_down", icon='MOVE_DOWN_VEC', text="")
-
-                weight = part.active_dupliweight
-                if weight:
-                    row = layout.row()
-                    row.prop(weight, "count")
-
-        elif part.render_type == 'BILLBOARD':
-            ob = context.object
-
-            col.label(text="Align:")
-
-            row = layout.row()
-            row.prop(part, "billboard_align", expand=True)
-            row.prop(part, "lock_billboard", text="Lock")
-            row = layout.row()
-            row.prop(part, "billboard_object")
-
-            row = layout.row()
-            col = row.column(align=True)
-            col.label(text="Tilt:")
-            col.prop(part, "billboard_tilt", text="Angle", slider=True)
-            col.prop(part, "billboard_tilt_random", text="Random", slider=True)
-            col = row.column()
-            col.prop(part, "billboard_offset")
-
-            row = layout.row()
-            col = row.column()
-            col.prop(part, "billboard_size", text="Scale")
-            if part.billboard_align == 'VEL':
-                col = row.column(align=True)
-                col.label("Velocity Scale:")
-                col.prop(part, "billboard_velocity_head", text="Head")
-                col.prop(part, "billboard_velocity_tail", text="Tail")
-
-            if psys:
-                col = layout.column()
-                col.prop_search(psys, "billboard_normal_uv", ob.data, "uv_textures")
-                col.prop_search(psys, "billboard_time_index_uv", ob.data, "uv_textures")
-
-            split = layout.split(percentage=0.33)
-            split.label(text="Split UVs:")
-            split.prop(part, "billboard_uv_split", text="Number of splits")
-
-            if psys:
-                col = layout.column()
-                col.active = part.billboard_uv_split > 1
-                col.prop_search(psys, "billboard_split_uv", ob.data, "uv_textures")
-
-            row = col.row()
-            row.label(text="Animate:")
-            row.prop(part, "billboard_animation", text="")
-            row.label(text="Offset:")
-            row.prop(part, "billboard_offset_split", text="")
-
-        if part.render_type == 'HALO' or part.render_type == 'LINE' or part.render_type == 'BILLBOARD':
-            row = layout.row()
-            col = row.column()
-            col.prop(part, "trail_count")
-            if part.trail_count > 1:
-                col.prop(part, "use_absolute_path_time", text="Length in frames")
-                col = row.column()
-                col.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time)
-                col.prop(part, "length_random", text="Random", slider=True)
-            else:
-                col = row.column()
-                col.label(text="")
-
-        if part.render_type in {'OBJECT', 'GROUP'} and not part.use_advanced_hair:
-            row = layout.row(align=True)
-            row.prop(part, "particle_size")
-            row.prop(part, "size_random", slider=True)
-
-
-class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
-    bl_label = "Display"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        settings = particle_get_settings(context)
-        engine = context.scene.render.engine
-        if settings is None:
-            return False
-        return engine in cls.COMPAT_ENGINES
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        row = layout.row()
-        row.prop(part, "draw_method", expand=True)
-        row.prop(part, "show_guide_hairs")
-
-        if part.draw_method == 'NONE' or (part.render_type == 'NONE' and part.draw_method == 'RENDER'):
-            return
-
-        path = (part.render_type == 'PATH' and part.draw_method == 'RENDER') or part.draw_method == 'PATH'
-
-        row = layout.row()
-        row.prop(part, "draw_percentage", slider=True)
-        if part.draw_method != 'RENDER' or part.render_type == 'HALO':
-            row.prop(part, "draw_size")
-        else:
-            row.label(text="")
-
-        if part.draw_percentage != 100 and psys is not None:
-            if part.type == 'HAIR':
-                if psys.use_hair_dynamics and psys.point_cache.is_baked is False:
-                    layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
-            else:
-                phystype = part.physics_type
-                if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked is False:
-                    layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
-
-        row = layout.row()
-        col = row.column()
-        col.prop(part, "show_size")
-        col.prop(part, "show_velocity")
-        col.prop(part, "show_number")
-        if part.physics_type == 'BOIDS':
-            col.prop(part, "show_health")
-
-        col = row.column(align=True)
-        col.label(text="Color:")
-        col.prop(part, "draw_color", text="")
-        sub = col.row(align=True)
-        sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'})
-        sub.prop(part, "color_maximum", text="Max")
-
-        if path:
-            col.prop(part, "draw_step")
-
-
-class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
-    bl_label = "Children"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        return particle_panel_poll(cls, context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        psys = context.particle_system
-        part = particle_get_settings(context)
-
-        layout.row().prop(part, "child_type", expand=True)
-
-        if part.child_type == 'NONE':
-            return
-
-        row = layout.row()
-
-        col = row.column(align=True)
-        col.prop(part, "child_nbr", text="Display")
-        col.prop(part, "rendered_child_count", text="Render")
-
-        if part.child_type == 'INTERPOLATED':
-            col = row.column()
-            if psys:
-                col.prop(psys, "child_seed", text="Seed")
-            col.prop(part, "virtual_parents", slider=True)
-            col.prop(part, "create_long_hair_children")
-        else:
-            col = row.column(align=True)
-            col.prop(part, "child_size", text="Size")
-            col.prop(part, "child_size_random", text="Random")
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Effects:")
-
-        sub = col.column(align=True)
-        sub.prop(part, "use_clump_curve")
-        if part.use_clump_curve:
-            sub.template_curve_mapping(part, "clump_curve")
-        else:
-            sub.prop(part, "clump_factor", slider=True)
-            sub.prop(part, "clump_shape", slider=True)
-        sub = col.column(align=True)
-        sub.prop(part, "use_clump_noise")
-        subsub = sub.column()
-        subsub.enabled = part.use_clump_noise
-        subsub.prop(part, "clump_noise_size")
-
-        sub = col.column(align=True)
-        sub.prop(part, "child_length", slider=True)
-        sub.prop(part, "child_length_threshold", slider=True)
-
-        if part.child_type == 'SIMPLE':
-            sub = col.column(align=True)
-            sub.prop(part, "child_radius", text="Radius")
-            sub.prop(part, "child_roundness", text="Roundness", slider=True)
-            if psys:
-                sub.prop(psys, "child_seed", text="Seed")
-        elif part.virtual_parents > 0.0:
-            sub = col.column(align=True)
-            sub.label(text="Parting not")
-            sub.label(text="available with")
-            sub.label(text="virtual parents")
-        else:
-            sub = col.column(align=True)
-            sub.prop(part, "child_parting_factor", text="Parting", slider=True)
-            sub.prop(part, "child_parting_min", text="Min")
-            sub.prop(part, "child_parting_max", text="Max")
-
-        col = split.column()
-
-        col.prop(part, "use_roughness_curve")
-        if part.use_roughness_curve:
-            sub = col.column()
-            sub.template_curve_mapping(part, "roughness_curve")
-            sub.prop(part, "roughness_1", text="Roughness")
-            sub.prop(part, "roughness_1_size", text="Size")
-        else:
-            col.label(text="Roughness:")
-
-            sub = col.column(align=True)
-            sub.prop(part, "roughness_1", text="Uniform")
-            sub.prop(part, "roughness_1_size", text="Size")
-
-            sub = col.column(align=True)
-            sub.prop(part, "roughness_endpoint", "Endpoint")
-            sub.prop(part, "roughness_end_shape")
-
-            sub = col.column(align=True)
-            sub.prop(part, "roughness_2", text="Random")
-            sub.prop(part, "roughness_2_size", text="Size")
-            sub.prop(part, "roughness_2_threshold", slider=True)
-
-        layout.row().label(text="Kink:")
-        layout.row().prop(part, "kink", expand=True)
-
-        split = layout.split()
-        split.active = part.kink != 'NO'
-
-        if part.kink == 'SPIRAL':
-            col = split.column()
-            sub = col.column(align=True)
-            sub.prop(part, "kink_amplitude", text="Radius")
-            sub.prop(part, "kink_amplitude_random", text="Random", slider=True)
-            sub = col.column(align=True)
-            sub.prop(part, "kink_axis")
-            sub.prop(part, "kink_axis_random", text="Random", slider=True)
-            col = split.column(align=True)
-            col.prop(part, "kink_frequency", text="Frequency")
-            col.prop(part, "kink_shape", text="Shape", slider=True)
-            col.prop(part, "kink_extra_steps", text="Steps")
-        else:
-            col = split.column()
-            sub = col.column(align=True)
-            sub.prop(part, "kink_amplitude")
-            sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True)
-            col.prop(part, "kink_flat", slider=True)
-            col = split.column(align=True)
-            col.prop(part, "kink_frequency")
-            col.prop(part, "kink_shape", slider=True)
-
-
-class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
-    bl_label = "Field Weights"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        return particle_panel_poll(cls, context)
-
-    def draw(self, context):
-        part = particle_get_settings(context)
-        effector_weights_ui(self, context, part.effector_weights, 'PSYS')
-
-        if part.type == 'HAIR':
-            row = self.layout.row()
-            row.prop(part.effector_weights, "apply_to_hair_growing")
-            row.prop(part, "apply_effector_to_children")
-            row = self.layout.row()
-            row.prop(part, "effect_hair", slider=True)
-
-
-class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
-    bl_label = "Force Field Settings"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        part = particle_get_settings(context)
-
-        row = layout.row()
-        row.prop(part, "use_self_effect")
-        row.prop(part, "effector_amount", text="Amount")
-
-        split = layout.split(percentage=0.2)
-        split.label(text="Type 1:")
-        split.prop(part.force_field_1, "type", text="")
-        basic_force_field_settings_ui(self, context, part.force_field_1)
-        if part.force_field_1.type != 'NONE':
-            layout.label(text="Falloff:")
-        basic_force_field_falloff_ui(self, context, part.force_field_1)
-
-        if part.force_field_1.type != 'NONE':
-            layout.label(text="")
-
-        split = layout.split(percentage=0.2)
-        split.label(text="Type 2:")
-        split.prop(part.force_field_2, "type", text="")
-        basic_force_field_settings_ui(self, context, part.force_field_2)
-        if part.force_field_2.type != 'NONE':
-            layout.label(text="Falloff:")
-        basic_force_field_falloff_ui(self, context, part.force_field_2)
-
-
-class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
-    bl_label = "Vertex Groups"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        if context.particle_system is None:
-            return False
-        return particle_panel_poll(cls, context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        psys = context.particle_system
-
-        col = layout.column()
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
-        row.prop(psys, "invert_vertex_group_density", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
-        row.prop(psys, "invert_vertex_group_length", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
-        row.prop(psys, "invert_vertex_group_clump", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
-        row.prop(psys, "invert_vertex_group_kink", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
-        row.prop(psys, "invert_vertex_group_roughness_1", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
-        row.prop(psys, "invert_vertex_group_roughness_2", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        row = col.row(align=True)
-        row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
-        row.prop(psys, "invert_vertex_group_roughness_end", text="", toggle=True, icon='ARROW_LEFTRIGHT')
-
-        # Commented out vertex groups don't work and are still waiting for better implementation
-        # row = layout.row()
-        # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity")
-        # row.prop(psys, "invert_vertex_group_velocity", text="")
-
-        # row = layout.row()
-        # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text="Size")
-        # row.prop(psys, "invert_vertex_group_size", text="")
-
-        # row = layout.row()
-        # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text="Tangent")
-        # row.prop(psys, "invert_vertex_group_tangent", text="")
-
-        # row = layout.row()
-        # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text="Rotation")
-        # row.prop(psys, "invert_vertex_group_rotation", text="")
-
-        # row = layout.row()
-        # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field")
-        # row.prop(psys, "invert_vertex_group_field", text="")
-
-
-class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-    _context_path = "particle_system.settings"
-    _property_type = bpy.types.ParticleSettings
-
-if __name__ == "__main__":  # only for live edit.
-    bpy.utils.register_module(__name__)
index 3ebf2691b4c6c41935b37363d64ec8b8d795d185..0362cc42371ef97a26e7378525cf66ca20eb42fe 100644 (file)
@@ -21,13 +21,13 @@ import bpy
 from bpy.types import Menu, Panel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
 
 def cloth_panel_enabled(md):
-    return md.point_cache.is_baked is False
+    return True
+    #return md.point_cache.is_baked is False
 
 
 class CLOTH_MT_presets(Menu):
@@ -64,6 +64,8 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
 
         split = layout.split(percentage=0.25)
 
+        col = split.column()
+
         split.label(text="Presets:")
         sub = split.row(align=True)
         sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
@@ -130,16 +132,6 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
             sub.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
 
 
-class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
-    bl_label = "Cloth Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        md = context.cloth
-        point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
-
-
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Collision"
     bl_options = {'DEFAULT_CLOSED'}
index 277b59d187de1734c71ff5f67b7422baec4b1bfc..ea4bbc76f4321b1449138c2255df11dc2ca2ec37 100644 (file)
@@ -98,113 +98,6 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
                             'CONSTRAINT')  # RB_TODO needs better icon
 
 
-# cache-type can be 'PSYS' 'HAIR' 'SMOKE' etc
-
-def point_cache_ui(self, context, cache, enabled, cachetype):
-    layout = self.layout
-
-    layout.context_pointer_set("point_cache", cache)
-
-    if not cachetype == 'RIGID_BODY':
-        row = layout.row()
-        row.template_list("UI_UL_list", "point_caches", cache, "point_caches",
-                          cache.point_caches, "active_index", rows=1)
-        col = row.column(align=True)
-        col.operator("ptcache.add", icon='ZOOMIN', text="")
-        col.operator("ptcache.remove", icon='ZOOMOUT', text="")
-
-    row = layout.row()
-    if cachetype in {'PSYS', 'HAIR', 'SMOKE'}:
-        row.prop(cache, "use_external")
-
-        if cachetype == 'SMOKE':
-            row.prop(cache, "use_library_path", "Use Lib Path")
-
-    if cache.use_external:
-        split = layout.split(percentage=0.35)
-        col = split.column()
-        col.label(text="Index Number:")
-        col.label(text="File Path:")
-
-        col = split.column()
-        col.prop(cache, "index", text="")
-        col.prop(cache, "filepath", text="")
-
-        cache_info = cache.info
-        if cache_info:
-            layout.label(text=cache_info)
-    else:
-        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
-
-    if not cache.use_external or cachetype == 'SMOKE':
-        row = layout.row(align=True)
-
-        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', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
-            row.prop(cache, "frame_step")
-
-        if cachetype != 'SMOKE':
-            layout.label(text=cache.info)
-
-        can_bake = True
-
-        if cachetype not in {'SMOKE', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
-            split = layout.split()
-            split.enabled = enabled and bpy.data.is_saved
-
-            col = split.column()
-            col.prop(cache, "use_disk_cache")
-
-            col = split.column()
-            col.active = cache.use_disk_cache
-            col.prop(cache, "use_library_path", "Use Lib Path")
-
-            row = layout.row()
-            row.enabled = enabled and bpy.data.is_saved
-            row.active = cache.use_disk_cache
-            row.label(text="Compression:")
-            row.prop(cache, "compression", expand=True)
-
-            layout.separator()
-
-            if cache.id_data.library and not cache.use_disk_cache:
-                can_bake = False
-
-                col = layout.column(align=True)
-                col.label(text="Linked object baking requires Disk Cache to be enabled", icon='INFO')
-        else:
-            layout.separator()
-
-        split = layout.split()
-        split.active = can_bake
-
-        col = split.column()
-
-        if cache.is_baked is True:
-            col.operator("ptcache.free_bake", text="Free Bake")
-        else:
-            col.operator("ptcache.bake", text="Bake").bake = True
-
-        sub = col.row()
-        sub.enabled = (cache.is_frame_skip or cache.is_outdated) and enabled
-        sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
-
-        sub = col.column()
-        sub.enabled = enabled
-        sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
-
-        col = split.column()
-        col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
-        col.operator("ptcache.free_bake_all", text="Free All Bakes")
-        col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
-
-
 def effector_weights_ui(self, context, weights, weight_type):
     layout = self.layout
 
index 6c3a3246cf6988216df9800e3fab03ffc47deca8..b36404632242193a4507d36e77d4d97059209715 100644 (file)
@@ -21,7 +21,6 @@ import bpy
 from bpy.types import Panel, UIList
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
@@ -125,10 +124,8 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
 
                 col = split.column()
                 if not use_shading_nodes:
-                    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 not use_shading_nodes:
+                    col.prop(brush, "use_material")
+                if brush.use_material and not use_shading_nodes:
                     col.prop(brush, "material", text="")
                     col.prop(brush, "paint_alpha", text="Alpha Factor")
                 else:
@@ -393,29 +390,6 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
             row.prop(surface, "shrink_speed")
 
 
-class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
-    bl_label = "Dynamic Paint Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        md = context.dynamic_paint
-        rd = context.scene.render
-        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.is_cache_user and
-                (rd.engine in cls.COMPAT_ENGINES))
-
-    def draw(self, context):
-        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"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -436,16 +410,6 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
         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)
index 0374d0321419a35005ca96929eb2c1a77704d48f..dfb40b84b317a6838e430afb4cb14fc5bde9884d 100644 (file)
@@ -21,7 +21,6 @@ import bpy
 from bpy.types import Panel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
@@ -55,8 +54,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
 
             split = layout.split()
 
-            split.enabled = not domain.point_cache.is_baked
-
             col = split.column()
             col.label(text="Resolution:")
             col.prop(domain, "resolution_max", text="Divisions")
@@ -87,14 +84,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
                 col = split.column()
                 col.label(text="Flow Source:")
                 col.prop(flow, "smoke_flow_source", expand=False, text="")
-                if flow.smoke_flow_source == 'PARTICLES':
-                    col.label(text="Particle System:")
-                    col.prop_search(flow, "particle_system", ob, "particle_systems", text="")
-                    col.prop(flow, "use_particle_size", text="Set Size")
-                    sub = col.column()
-                    sub.active = flow.use_particle_size
-                    sub.prop(flow, "particle_size")
-                else:
+                if flow.smoke_flow_source == 'MESH':
                     col.prop(flow, "surface_distance")
                     col.prop(flow, "volume_density")
 
@@ -179,7 +169,6 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel):
         domain = context.smoke.domain_settings
 
         split = layout.split()
-        split.enabled = not domain.point_cache.is_baked
 
         col = split.column(align=True)
         col.label(text="Reaction:")
@@ -216,7 +205,6 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel):
         layout.active = domain.use_adaptive_domain
 
         split = layout.split()
-        split.enabled = (not domain.point_cache.is_baked)
 
         col = split.column(align=True)
         col.label(text="Resolution:")
@@ -252,7 +240,6 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
         layout.active = md.use_high_resolution
 
         split = layout.split()
-        split.enabled = not md.point_cache.is_baked
 
         col = split.column()
         col.label(text="Resolution:")
@@ -311,27 +298,17 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
     def draw(self, context):
         layout = self.layout
 
+        if not bpy.app.build_options.openvdb:
+            layout.label("Built without OpenVDB support")
+            return
+
         domain = context.smoke.domain_settings
-        cache_file_format = domain.cache_file_format
-
-        layout.prop(domain, "cache_file_format")
-
-        if cache_file_format == 'POINTCACHE':
-            layout.label(text="Compression:")
-            layout.prop(domain, "point_cache_compress_type", expand=True)
-        elif cache_file_format == 'OPENVDB':
-            if not bpy.app.build_options.openvdb:
-                layout.label("Built without OpenVDB support")
-                return
-
-            layout.label(text="Compression:")
-            layout.prop(domain, "openvdb_cache_compress_type", expand=True)
-            row = layout.row()
-            row.label("Data Depth:")
-            row.prop(domain, "data_depth", expand=True, text="Data Depth")
-
-        cache = domain.point_cache
-        point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
+
+        layout.label(text="Compression:")
+        layout.prop(domain, "openvdb_cache_compress_type", expand=True)
+        row = layout.row()
+        row.label("Data Depth:")
+        row.prop(domain, "data_depth", expand=True, text="Data Depth")
 
 
 class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
index a458af739f2abe2c84eb35dc84dc1bdcbf81ed43..e873bb40013cd916cb311d7c444bf874eecc9451 100644 (file)
@@ -21,13 +21,13 @@ import bpy
 from bpy.types import Panel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
 
 def softbody_panel_enabled(md):
-    return (md.point_cache.is_baked is False)
+    return True
+    #return (md.point_cache.is_baked is False)
 
 
 class PhysicButtonsPanel:
@@ -71,16 +71,6 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
         layout.prop(softbody, "collision_group")
 
 
-class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
-    bl_label = "Soft Body Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        md = context.soft_body
-        point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
-
-
 class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Goal"
     bl_options = {'DEFAULT_CLOSED'}
index d6253ec7fbc743bc8af7699aee5f3c52b10e74d0..7b7e2367a42493be1ddb7521f639a34e5012ffb6 100644 (file)
@@ -27,7 +27,6 @@ from bpy.types import (
 from rna_prop_ui import PropertyPanel
 
 from bl_ui.properties_physics_common import (
-        point_cache_ui,
         effector_weights_ui,
         )
 
@@ -371,24 +370,6 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
             col.prop(rbw, "solver_iterations", text="Solver Iterations")
 
 
-class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):
-    bl_label = "Rigid Body Cache"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        scene = context.scene
-        return scene and scene.rigidbody_world and (rd.engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        scene = context.scene
-        rbw = scene.rigidbody_world
-
-        point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY')
-
-
 class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
     bl_label = "Rigid Body Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
@@ -427,12 +408,10 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
         col = split.column()
         col.label(text="Viewport:")
         col.prop(rd, "simplify_subdivision", text="Subdivision")
-        col.prop(rd, "simplify_child_particles", text="Child Particles")
 
         col = split.column()
         col.label(text="Render:")
         col.prop(rd, "simplify_subdivision_render", text="Subdivision")
-        col.prop(rd, "simplify_child_particles_render", text="Child Particles")
         col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")
         col.prop(rd, "simplify_ao_sss", text="AO and SSS")
         col.prop(rd, "use_simplify_triangulate")
index caf19a9e46909c912993fddb05a8f531f4de7287..9bbef2ebdaf8b2a145bdf0d2fec28321a16cb334 100644 (file)
@@ -26,7 +26,6 @@ from bpy.types import (
         Lamp,
         Material,
         Object,
-        ParticleSettings,
         Texture,
         World,
         )
@@ -101,9 +100,6 @@ def context_tex_datablock(context):
     if idblock:
         return idblock
 
-    if context.particle_system:
-        idblock = context.particle_system.settings
-
     return idblock
 
 
@@ -142,8 +138,6 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
                  context.lamp or
                  context.texture or
                  context.line_style or
-                 context.particle_system or
-                 isinstance(context.space_data.pin_id, ParticleSettings) or
                  context.texture_user) and
                 (engine in cls.COMPAT_ENGINES))
 
@@ -811,18 +805,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
         split = layout.split()
 
         col = split.column()
-        if pd.point_source == 'PARTICLE_SYSTEM':
-            col.label(text="Object:")
-            col.prop(pd, "object", text="")
-
-            sub = col.column()
-            sub.enabled = bool(pd.object)
-            if pd.object:
-                sub.label(text="System:")
-                sub.prop_search(pd, "particle_system", pd.object, "particle_systems", text="")
-            sub.label(text="Cache:")
-            sub.prop(pd, "particle_cache_space", text="")
-        else:
+        if pd.point_source == 'OBJECT':
             col.label(text="Object:")
             col.prop(pd, "object", text="")
             col.label(text="Cache:")
@@ -831,13 +814,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
         col.separator()
 
         col.label(text="Color Source:")
-        if pd.point_source == 'PARTICLE_SYSTEM':
-            col.prop(pd, "particle_color_source", text="")
-            if pd.particle_color_source in {'PARTICLE_SPEED', 'PARTICLE_VELOCITY'}:
-                col.prop(pd, "speed_scale")
-            if pd.particle_color_source in {'PARTICLE_SPEED', 'PARTICLE_AGE'}:
-                layout.template_color_ramp(pd, "color_ramp", expand=True)
-        else:
+        if pd.point_source == 'OBJECT':
             col.prop(pd, "vertex_color_source", text="")
             if pd.vertex_color_source == 'VERTEX_COLOR':
                 if pd.object and pd.object.data:
@@ -854,8 +831,6 @@ 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':
-            col.prop(pd, "falloff_speed_scale")
 
         col.prop(pd, "use_falloff_curve")
 
@@ -1147,35 +1122,6 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
             col = split.column()
             factor_but(col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up")
             factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down")
-        elif isinstance(idblock, ParticleSettings):
-            split = layout.split()
-
-            col = split.column()
-            col.label(text="General:")
-            factor_but(col, "use_map_time", "time_factor", "Time")
-            factor_but(col, "use_map_life", "life_factor", "Lifetime")
-            factor_but(col, "use_map_density", "density_factor", "Density")
-            factor_but(col, "use_map_size", "size_factor", "Size")
-
-            col = split.column()
-            col.label(text="Physics:")
-            factor_but(col, "use_map_velocity", "velocity_factor", "Velocity")
-            factor_but(col, "use_map_damp", "damp_factor", "Damp")
-            factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
-            factor_but(col, "use_map_field", "field_factor", "Force Fields")
-
-            layout.label(text="Hair:")
-
-            split = layout.split()
-
-            col = split.column()
-            factor_but(col, "use_map_length", "length_factor", "Length")
-            factor_but(col, "use_map_clump", "clump_factor", "Clump")
-
-            col = split.column()
-            factor_but(col, "use_map_kink_amp", "kink_amp_factor", "Kink Amplitude")
-            factor_but(col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency")
-            factor_but(col, "use_map_rough", "rough_factor", "Rough")
 
         elif isinstance(idblock, FreestyleLineStyle):
             split = layout.split()
@@ -1187,18 +1133,17 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
 
         layout.separator()
 
-        if not isinstance(idblock, ParticleSettings):
-            split = layout.split()
+        split = layout.split()
 
-            col = split.column()
-            col.prop(tex, "blend_type", text="Blend")
-            col.prop(tex, "use_rgb_to_intensity")
-            # color is used on gray-scale textures even when use_rgb_to_intensity is disabled.
-            col.prop(tex, "color", text="")
+        col = split.column()
+        col.prop(tex, "blend_type", text="Blend")
+        col.prop(tex, "use_rgb_to_intensity")
+        # color is used on gray-scale textures even when use_rgb_to_intensity is disabled.
+        col.prop(tex, "color", text="")
 
-            col = split.column()
-            col.prop(tex, "invert", text="Negative")
-            col.prop(tex, "use_stencil")
+        col = split.column()
+        col.prop(tex, "invert", text="Negative")
+        col.prop(tex, "use_stencil")
 
         if isinstance(idblock, Material) or isinstance(idblock, World):
             col.prop(tex, "default_value", text="DVar", slider=True)
index 4d365c8dc08e4b5ede08069ebc037e6676de1659..be9752a463e05fbfd886e4da32ae54f035883e10 100644 (file)
@@ -92,8 +92,6 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
                 row.prop(dopesheet, "show_lattices", text="")
             if bpy.data.armatures:
                 row.prop(dopesheet, "show_armatures", text="")
-            if bpy.data.particles:
-                row.prop(dopesheet, "show_particles", text="")
             if bpy.data.speakers:
                 row.prop(dopesheet, "show_speakers", text="")
             if bpy.data.linestyles:
index 508e62e4f56d5562e7eee390cd1a10849a35ced2..894be977822952646f2ad35af19e5a30e141ce2c 100644 (file)
@@ -171,7 +171,6 @@ class TIME_MT_cache(Menu):
         col = layout.column()
         col.enabled = st.show_cache
         col.prop(st, "cache_softbody")
-        col.prop(st, "cache_particles")
         col.prop(st, "cache_cloth")
         col.prop(st, "cache_smoke")
         col.prop(st, "cache_dynamicpaint")
index ab3ec3559e551ca08cefee879afcdea103ad6c0a..1cbc04108298e519b173503dcd34321dcb811899 100644 (file)
@@ -371,7 +371,6 @@ class USERPREF_PT_edit(Panel):
         col.prop(edit, "use_duplicate_texture", text="Texture")
         #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
         col.prop(edit, "use_duplicate_action", text="Action")
-        col.prop(edit, "use_duplicate_particle", text="Particle")
 
 
 class USERPREF_PT_system(Panel):
index 8a3a5d3b7e8f886241908bf91207c35e530684b5..43188c2b9faa0da6515af44c147807102246ac72 100644 (file)
@@ -49,12 +49,9 @@ class VIEW3D_HT_header(Header):
 
         if obj:
             mode = obj.mode
-            # Particle edit
-            if mode == 'PARTICLE_EDIT':
-                row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
 
             # Occlude geometry
-            if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
+            if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'EDIT' and obj.type == 'MESH')) or
                     (mode == 'WEIGHT_PAINT')):
                 row.prop(view, "use_occlude_geometry", text="")
 
@@ -64,7 +61,7 @@ class VIEW3D_HT_header(Header):
                 row.prop(toolsettings, "proportional_edit", icon_only=True)
                 if toolsettings.proportional_edit != 'DISABLED':
                     row.prop(toolsettings, "proportional_edit_falloff", icon_only=True)
-            elif mode in {'EDIT', 'PARTICLE_EDIT'}:
+            elif mode == 'EDIT':
                 row = layout.row(align=True)
                 row.prop(toolsettings, "proportional_edit", icon_only=True)
                 if toolsettings.proportional_edit != 'DISABLED':
@@ -703,35 +700,6 @@ class VIEW3D_MT_select_pose(Menu):
         layout.operator("object.select_pattern", text="Select Pattern...")
 
 
-class VIEW3D_MT_select_particle(Menu):
-    bl_label = "Select"
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.operator("view3d.select_border")
-
-        layout.separator()
-
-        layout.operator("particle.select_all").action = 'TOGGLE'
-        layout.operator("particle.select_linked")
-        layout.operator("particle.select_all", text="Inverse").action = 'INVERT'
-
-        layout.separator()
-
-        layout.operator("particle.select_more")
-        layout.operator("particle.select_less")
-
-        layout.separator()
-
-        layout.operator("particle.select_random")
-
-        layout.separator()
-
-        layout.operator("particle.select_roots", text="Roots")
-        layout.operator("particle.select_tips", text="Tips")
-
-
 class VIEW3D_MT_edit_mesh_select_similar(Menu):
     bl_label = "Select Similar"
 
@@ -1922,87 +1890,8 @@ class VIEW3D_MT_hide_mask(Menu):
         props = layout.operator("paint.mask_lasso_gesture", text="Lasso Mask")
 
 
-# ********** Particle menu **********
-
-
-class VIEW3D_MT_particle(Menu):
-    bl_label = "Particle"
-
-    def draw(self, context):
-        layout = self.layout
-
-        particle_edit = context.tool_settings.particle_edit
-
-        layout.operator("ed.undo")
-        layout.operator("ed.redo")
-        layout.operator("ed.undo_history")
-
-        layout.separator()
-
-        layout.operator("particle.mirror")
-
-        layout.separator()
-
-        layout.operator("particle.remove_doubles")
-        layout.operator("particle.delete")
-
-        if particle_edit.select_mode == 'POINT':
-            layout.operator("particle.subdivide")
-
         layout.operator("particle.unify_length")
-        layout.operator("particle.rekey")
-        layout.operator("particle.weight_set")
-
-        layout.separator()
-
-        layout.menu("VIEW3D_MT_particle_showhide")
-
-
-class VIEW3D_MT_particle_specials(Menu):
-    bl_label = "Specials"
-
-    def draw(self, context):
-        layout = self.layout
-
-        particle_edit = context.tool_settings.particle_edit
-
-        layout.operator("particle.rekey")
-        layout.operator("particle.delete")
-        layout.operator("particle.remove_doubles")
         layout.operator("particle.unify_length")
-
-        if particle_edit.select_mode == 'POINT':
-            layout.operator("particle.subdivide")
-
-        layout.operator("particle.weight_set")
-        layout.separator()
-
-        layout.operator("particle.mirror")
-
-        if particle_edit.select_mode == 'POINT':
-            layout.separator()
-            layout.operator("particle.select_roots")
-            layout.operator("particle.select_tips")
-
-            layout.separator()
-
-            layout.operator("particle.select_random")
-
-            layout.separator()
-
-            layout.operator("particle.select_more")
-            layout.operator("particle.select_less")
-
-            layout.separator()
-
-            layout.operator("particle.select_all").action = 'TOGGLE'
-            layout.operator("particle.select_linked")
-            layout.operator("particle.select_all", text="Inverse").action = 'INVERT'
-
-
-class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu):
-    _operator_name = "particle"
-
 # ********** Pose Menu **********
 
 
@@ -3088,6 +2977,47 @@ class VIEW3D_MT_edit_gpencil_transform(Menu):
 # ********** Panel **********
 
 
+class VIEW3D_PT_viewport_debug(Panel):
+    bl_space_type = 'VIEW_3D'
+    bl_region_type = 'UI'
+    bl_label = "Modern Viewport"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    @classmethod
+    def poll(cls, context):
+        view = context.space_data
+        return (view)
+
+    def draw_header(self, context):
+        view = context.space_data
+        self.layout.prop(view, "use_modern_viewport", text="")
+
+    def draw(self, context):
+        layout = self.layout
+        view = context.space_data
+
+        layout.active = view.use_modern_viewport
+
+        col = layout.column()
+        col.label(text="Placeholder for debugging options")
+        col.separator()
+
+        row = col.row()
+        row.active = not view.show_combined_depth
+        row.prop(view, "show_scene_depth")
+        row = col.row()
+        row.active = not view.show_scene_depth
+        row.prop(view, "show_combined_depth")
+
+        row = col.row(align=True)
+        row.active = view.show_scene_depth or view.show_combined_depth
+        row.prop(view, "debug_near")
+        row.prop(view, "debug_far")
+
+        col.label(text="Background:")
+        col.row(align=True).prop(view, "debug_background", expand=True)
+
+
 class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
@@ -3201,7 +3131,7 @@ class VIEW3D_PT_view3d_display(Panel):
     @classmethod
     def poll(cls, context):
         view = context.space_data
-        return (view)
+        return (view) and not view.use_modern_viewport
 
     def draw(self, context):
         layout = self.layout
@@ -3301,6 +3231,11 @@ class VIEW3D_PT_view3d_shading(Panel):
     bl_region_type = 'UI'
     bl_label = "Shading"
 
+    @classmethod
+    def poll(cls, context):
+        view = context.space_data
+        return (view) and not view.use_modern_viewport
+
     def draw(self, context):
         layout = self.layout
 
index f97e2d5b2d1e18a5038317dc96d0751a7b4b9271..9d66ab55a0ddf9299aca4a04ce2b824cd71e3497 100644 (file)
@@ -943,37 +943,12 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
         settings = self.paint_settings(context)
         brush = settings.brush
 
-        if not context.particle_edit_object:
-            col = layout.split().column()
-            col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
-
-        # Particle Mode #
-        if context.particle_edit_object:
-            tool = settings.tool
-
-            layout.column().prop(settings, "tool", expand=True)
-
-            if tool != 'NONE':
-                col = layout.column()
-                col.prop(brush, "size", slider=True)
-                if tool != 'ADD':
-                    col.prop(brush, "strength", slider=True)
-
-            if tool == 'ADD':
-                col.prop(brush, "count")
-                col = layout.column()
-                col.prop(settings, "use_default_interpolate")
-                col.prop(brush, "steps", slider=True)
-                col.prop(settings, "default_key_count", slider=True)
-            elif tool == 'LENGTH':
-                layout.prop(brush, "length_mode", expand=True)
-            elif tool == 'PUFF':
-                layout.prop(brush, "puff_mode", expand=True)
-                layout.prop(brush, "use_puff_volume")
+        col = layout.split().column()
+        col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
 
         # Sculpt Mode #
 
-        elif context.sculpt_object and brush:
+        if context.sculpt_object and brush:
             capabilities = brush.sculpt_capabilities
 
             col = layout.column()
@@ -1658,7 +1633,7 @@ class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
     @classmethod
     def poll(cls, context):
         settings = cls.paint_settings(context)
-        return (settings is not None) and (not isinstance(settings, bpy.types.ParticleEdit))
+        return (settings is not None)
 
     def draw(self, context):
         layout = self.layout
@@ -1881,78 +1856,6 @@ class VIEW3D_MT_tools_projectpaint_stencil(Menu):
             props.value = i
 
 
-class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
-    """Default tools for particle mode"""
-    bl_context = "particlemode"
-    bl_label = "Options"
-    bl_category = "Tools"
-
-    def draw(self, context):
-        layout = self.layout
-
-        pe = context.tool_settings.particle_edit
-        ob = pe.object
-
-        layout.prop(pe, "type", text="")
-
-        ptcache = None
-
-        if pe.type == 'PARTICLES':
-            if ob.particle_systems:
-                if len(ob.particle_systems) > 1:
-                    layout.template_list("UI_UL_list", "particle_systems", ob, "particle_systems",
-                                         ob.particle_systems, "active_index", rows=2, maxrows=3)
-
-                ptcache = ob.particle_systems.active.point_cache
-        else:
-            for md in ob.modifiers:
-                if md.type == pe.type:
-                    ptcache = md.point_cache
-
-        if ptcache and len(ptcache.point_caches) > 1:
-            layout.template_list("UI_UL_list", "particles_point_caches", ptcache, "point_caches",
-                                 ptcache.point_caches, "active_index", rows=2, maxrows=3)
-
-        if not pe.is_editable:
-            layout.label(text="Point cache must be baked")
-            layout.label(text="in memory to enable editing!")
-
-        col = layout.column(align=True)
-        if pe.is_hair:
-            col.active = pe.is_editable
-            col.prop(pe, "use_emitter_deflect", text="Deflect emitter")
-            sub = col.row(align=True)
-            sub.active = pe.use_emitter_deflect
-            sub.prop(pe, "emitter_distance", text="Distance")
-
-        col = layout.column(align=True)
-        col.active = pe.is_editable
-        col.label(text="Keep:")
-        col.prop(pe, "use_preserve_length", text="Lengths")
-        col.prop(pe, "use_preserve_root", text="Root")
-        if not pe.is_hair:
-            col.label(text="Correct:")
-            col.prop(pe, "use_auto_velocity", text="Velocity")
-        col.prop(ob.data, "use_mirror_x")
-
-        col.prop(pe, "shape_object")
-        col.operator("particle.shape_cut")
-
-        col = layout.column(align=True)
-        col.active = pe.is_editable
-        col.label(text="Draw:")
-        col.prop(pe, "draw_step", text="Path Steps")
-        if pe.is_hair:
-            col.prop(pe, "show_particles", text="Children")
-        else:
-            if pe.type == 'PARTICLES':
-                col.prop(pe, "show_particles", text="Particles")
-            col.prop(pe, "use_fade_time")
-            sub = col.row(align=True)
-            sub.active = pe.use_fade_time
-            sub.prop(pe, "fade_frames", slider=True)
-
-
 # Grease Pencil drawing tools
 class VIEW3D_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel):
     bl_space_type = 'VIEW_3D'
index 6f2b78e084529a69af4bef6dc81f39a06ed00e40..d49ceb1636b4bf3979e1638d61e4a1831bd161bb 100644 (file)
@@ -29,7 +29,6 @@ set(SRC_DNA_INC
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_actuator_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_anim_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_armature_types.h
-       ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_boid_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_brush_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_cachefile_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_camera_types.h
@@ -68,7 +67,6 @@ set(SRC_DNA_INC
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_object_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_outliner_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_packedFile_types.h
-       ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_particle_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_property_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_rigidbody_types.h
        ${CMAKE_CURRENT_SOURCE_DIR}/makesdna/DNA_scene_types.h
index d259721e19227ce37f9d0f516f05e8b50a9f1ead..5e66d6c2dc71e17d9050d4cd5f45486993c8506f 100644 (file)
@@ -55,7 +55,6 @@ extern "C" {
 #include "BKE_idprop.h"
 #include "BKE_main.h"
 #include "BKE_modifier.h"
-#include "BKE_particle.h"
 #include "BKE_scene.h"
 }
 
@@ -502,22 +501,6 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent)
                return;
        }
 
-       ParticleSystem *psys = static_cast<ParticleSystem *>(ob->particlesystem.first);
-
-       for (; psys; psys = psys->next) {
-               if (!psys_check_enabled(ob, psys, G.is_rendering) || !psys->part) {
-                       continue;
-               }
-
-               if (psys->part->type == PART_HAIR) {
-                       m_settings.export_child_hairs = true;
-                       m_shapes.push_back(new AbcHairWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings, psys));
-               }
-               else if (psys->part->type == PART_EMITTER) {
-                       m_shapes.push_back(new AbcPointsWriter(m_scene, ob, xform, m_shape_sampling_index, m_settings, psys));
-               }
-       }
-
        switch(ob->type) {
                case OB_MESH:
                {
index 14bcf6731ea51cb5d7e001c9e05c7b13eb955bc6..f10cfbadda8347efc02c79e667b6d151b818dbb6 100644 (file)
@@ -37,7 +37,6 @@ extern "C" {
 
 #include "BKE_DerivedMesh.h"
 #include "BKE_object.h"
-#include "BKE_particle.h"
 }
 
 using Alembic::Abc::P3fArraySamplePtr;
@@ -54,13 +53,15 @@ AbcHairWriter::AbcHairWriter(Scene *scene,
                              AbcTransformWriter *parent,
                              uint32_t time_sampling,
                              ExportSettings &settings,
-                             ParticleSystem *psys)
+                             void *UNUSED(psys))
     : AbcObjectWriter(scene, ob, time_sampling, settings, parent)
 {
-       m_psys = psys;
+       m_psys = NULL; // = psys;
 
+#if 0
        OCurves curves(parent->alembicXform(), psys->name, m_time_sampling);
        m_schema = curves.getSchema();
+#endif
 }
 
 void AbcHairWriter::do_write()
@@ -68,7 +69,7 @@ void AbcHairWriter::do_write()
        if (!m_psys) {
                return;
        }
-
+#if 0
        ParticleSystemModifierData *psmd = psys_get_modifier(m_object, m_psys);
 
        if (!psmd->dm_final) {
@@ -116,15 +117,17 @@ void AbcHairWriter::do_write()
 
        m_sample.setSelfBounds(bounds());
        m_schema.set(m_sample);
+#endif
 }
 
 void AbcHairWriter::write_hair_sample(DerivedMesh *dm,
-                                      ParticleSettings *part,
+                                      void *part,
                                       std::vector<Imath::V3f> &verts,
                                       std::vector<Imath::V3f> &norm_values,
                                       std::vector<Imath::V2f> &uv_values,
                                       std::vector<int32_t> &hvertices)
 {
+#if 0
        /* Get untransformed vertices, there's a xform under the hair. */
        float inv_mat[4][4];
        invert_m4_m4_safe(inv_mat, m_object->obmat);
@@ -225,15 +228,17 @@ void AbcHairWriter::write_hair_sample(DerivedMesh *dm,
                        ++path;
                }
        }
+#endif
 }
 
 void AbcHairWriter::write_hair_child_sample(DerivedMesh *dm,
-                                            ParticleSettings *part,
+                                            void *part,
                                             std::vector<Imath::V3f> &verts,
                                             std::vector<Imath::V3f> &norm_values,
                                             std::vector<Imath::V2f> &uv_values,
                                             std::vector<int32_t> &hvertices)
 {
+#if 0
        /* Get untransformed vertices, there's a xform under the hair. */
        float inv_mat[4][4];
        invert_m4_m4_safe(inv_mat, m_object->obmat);
@@ -287,4 +292,5 @@ void AbcHairWriter::write_hair_child_sample(DerivedMesh *dm,
                        ++path;
                }
        }
+#endif
 }
index d132b60be12fcd6f180254b8e3f72f637d136950..bbd5f2c43616a09fc0e1bf5cb94ff0a4d8ea9649 100644 (file)
 #include "abc_object.h"
 
 struct DerivedMesh;
-struct ParticleSettings;
-struct ParticleSystem;
 
 /* ************************************************************************** */
 
 class AbcHairWriter : public AbcObjectWriter {
-       ParticleSystem *m_psys;
+       /*ParticleSystem*/ void *m_psys;
 
        Alembic::AbcGeom::OCurvesSchema m_schema;
        Alembic::AbcGeom::OCurvesSchema::Sample m_sample;
@@ -43,20 +41,20 @@ public:
                      AbcTransformWriter *parent,
                      uint32_t time_sampling,
                      ExportSettings &settings,
-                     ParticleSystem *psys);
+                     /*ParticleSystem*/void *psys);
 
 private:
        virtual void do_write();
 
        void write_hair_sample(DerivedMesh *dm,
-                              ParticleSettings *part,
+                              /*ParticleSettings*/ void *part,
                               std::vector<Imath::V3f> &verts,
                               std::vector<Imath::V3f> &norm_values,
                               std::vector<Imath::V2f> &uv_values,
                               std::vector<int32_t> &hvertices);
 
        void write_hair_child_sample(DerivedMesh *dm,
-                                    ParticleSettings *part,
+                                    /*ParticleSettings*/ void *part,
                                     std::vector<Imath::V3f> &verts,
                                     std::vector<Imath::V3f> &norm_values,
                                     std::vector<Imath::V2f> &uv_values,
index 5b282e3c5bb59ebf4620d0e93614f0a8e46a12b2..3d80756fcca3bc418d68025fbce4114f7736bcb0 100644 (file)
@@ -262,7 +262,7 @@ static ModifierData *get_subsurf_modifier(Scene *scene, Object *ob)
                }
 
                /* mesh is not a subsurf. break */
-               if ((md->type != eModifierType_Displace) && (md->type != eModifierType_ParticleSystem)) {
+               if ((md->type != eModifierType_Displace) /*&& (md->type != eModifierType_ParticleSystem)*/) {
                        return NULL;
                }
        }
index c16da621c779795eba1e0a91acaf22979f74a59c..291a19bd2d51cc2448eafeb2f2347dc43a905f06 100644 (file)
@@ -36,7 +36,6 @@ extern "C" {
 #include "BKE_lattice.h"
 #include "BKE_mesh.h"
 #include "BKE_object.h"
-#include "BKE_particle.h"
 #include "BKE_scene.h"
 
 #include "BLI_math.h"
@@ -63,13 +62,15 @@ AbcPointsWriter::AbcPointsWriter(Scene *scene,
                                     AbcTransformWriter *parent,
                                     uint32_t time_sampling,
                                     ExportSettings &settings,
-                                    ParticleSystem *psys)
+                                    void *UNUSED(psys))
     : AbcObjectWriter(scene, ob, time_sampling, settings, parent)
 {
-       m_psys = psys;
+       m_psys = NULL; // = psys;
 
+#if 0
        OPoints points(parent->alembicXform(), psys->name, m_time_sampling);
        m_schema = points.getSchema();
+#endif
 }
 
 void AbcPointsWriter::do_write()
@@ -77,7 +78,7 @@ void AbcPointsWriter::do_write()
        if (!m_psys) {
                return;
        }
-
+#if 0
        std::vector<Imath::V3f> points;
        std::vector<Imath::V3f> velocities;
        std::vector<float> widths;
@@ -134,6 +135,7 @@ void AbcPointsWriter::do_write()
        m_sample.setSelfBounds(bounds());
 
        m_schema.set(m_sample);
+#endif
 }
 
 /* ************************************************************************** */
index 54873eed34615c213641a7245c46571f77e5fac6..0e69639ad8e1c20909fc5027c335381a49048da0 100644 (file)
 #include "abc_object.h"
 #include "abc_customdata.h"
 
-class ParticleSystem;
-
 /* ************************************************************************** */
 
 class AbcPointsWriter : public AbcObjectWriter {
        Alembic::AbcGeom::OPointsSchema m_schema;
        Alembic::AbcGeom::OPointsSchema::Sample m_sample;
-       ParticleSystem *m_psys;
+       /*ParticleSystem*/ void *m_psys;
 
 public:
        AbcPointsWriter(Scene *scene,
@@ -43,7 +41,7 @@ public:
                        AbcTransformWriter *parent,
                        uint32_t time_sampling,
                        ExportSettings &settings,
-                       ParticleSystem *psys);
+                       /*ParticleSystem*/ void *psys);
 
        void do_write();
 };
index 1f38d64924c88af54961c7141a70176506802993..3da0434687caceee658c505731725549718864ef 100644 (file)
@@ -34,6 +34,9 @@
 
 #include "BLI_compiler_attrs.h"
 
+/* enable this only if needed (unused circa 2016) */
+#define BLF_BLUR_ENABLE 0
+
 struct rctf;
 struct ColorManagedDisplay;
 struct ResultBLF;
@@ -144,7 +147,10 @@ void BLF_rotation(int fontid, float angle);
 void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax);
 void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax);
 void BLF_wordwrap(int fontid, int wrap_width);
+
+#if BLF_BLUR_ENABLE
 void BLF_blur(int fontid, int size);
+#endif
 
 void BLF_enable(int fontid, int option);
 void BLF_disable(int fontid, int option);
index 132a0ec38086178cecf6394dbb4ca260b1ec820b..1ce4753cc392b02a61ec7a826529641ae5dc5fee 100644 (file)
@@ -56,7 +56,9 @@
 #include "IMB_colormanagement.h"
 
 #ifndef BLF_STANDALONE
-#include "GPU_basic_shader.h"
+#include "GPU_shader.h"
+#include "GPU_matrix.h"
+#include "GPU_immediate.h"
 #endif
 
 #include "blf_internal_types.h"
@@ -453,6 +455,7 @@ void BLF_size(int fontid, int size, int dpi)
        }
 }
 
+#if BLF_BLUR_ENABLE
 void BLF_blur(int fontid, int size)
 {
        FontBLF *font = blf_get(fontid);
@@ -461,6 +464,7 @@ void BLF_blur(int fontid, int size)
                font->blur = size;
        }
 }
+#endif
 
 void BLF_draw_default(float x, float y, float z, const char *str, size_t len)
 {
@@ -490,7 +494,7 @@ void BLF_rotation_default(float angle)
        }
 }
 
-static void blf_draw_gl__start(FontBLF *font, GLint *mode)
+static void blf_draw_gl__start(FontBLF *font)
 {
        /*
         * The pixmap alignment hack is handle
@@ -500,52 +504,48 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode)
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
-#ifndef BLF_STANDALONE
-       GPU_basic_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR);
-#endif
-
-       /* Save the current matrix mode. */
-       glGetIntegerv(GL_MATRIX_MODE, mode);
-
-       glMatrixMode(GL_TEXTURE);
-       glPushMatrix();
-       glLoadIdentity();
-
-       glMatrixMode(GL_MODELVIEW);
-       glPushMatrix();
+       gpuMatrixBegin3D_legacy();
 
        if (font->flags & BLF_MATRIX)
-               glMultMatrixf(font->m);
+               gpuMultMatrix3D((float (*)[4])font->m);
 
-       glTranslate3fv(font->pos);
+       gpuTranslate3fv(font->pos);
 
        if (font->flags & BLF_ASPECT)
-               glScalef(font->aspect[0], font->aspect[1], font->aspect[2]);
+               gpuScale3fv(font->aspect);
 
        if (font->flags & BLF_ROTATION)  /* radians -> degrees */
-               glRotatef(font->angle * (float)(180.0 / M_PI), 0.0f, 0.0f, 1.0f);
+               gpuRotateAxis(RAD2DEG(font->angle), 'Z');
+
+       float temp_color[4];
+       glGetFloatv(GL_CURRENT_COLOR, temp_color); /* TODO(merwin): new BLF_color function? */
+       rgba_float_to_uchar(font->color, temp_color);
+
+#ifndef BLF_STANDALONE
+       VertexFormat *format = immVertexFormat();
+       unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT);
+       unsigned texCoord = add_attrib(format, "texCoord", GL_FLOAT, 2, KEEP_FLOAT);
+       unsigned color = add_attrib(format, "color", GL_UNSIGNED_BYTE, 4, NORMALIZE_INT_TO_FLOAT);
+
+       BLI_assert(pos == BLF_POS_ID);
+       BLI_assert(texCoord == BLF_COORD_ID);
+       BLI_assert(color == BLF_COLOR_ID);
 
-       if (font->shadow || font->blur)
-               glGetFloatv(GL_CURRENT_COLOR, font->orig_col);
+       immBindBuiltinProgram(GPU_SHADER_TEXT);
+#endif
 
        /* always bind the texture for the first glyph */
        font->tex_bind_state = -1;
 }
 
-static void blf_draw_gl__end(GLint mode)
+static void blf_draw_gl__end(void)
 {
-       glMatrixMode(GL_TEXTURE);
-       glPopMatrix();
-
-       glMatrixMode(GL_MODELVIEW);
-       glPopMatrix();
-
-       if (mode != GL_MODELVIEW)
-               glMatrixMode(mode);
+       gpuMatrixEnd();
 
 #ifndef BLF_STANDALONE
-       GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
+       immUnbindProgram();
 #endif
+
        glDisable(GL_BLEND);
 }
 
@@ -554,23 +554,26 @@ void BLF_draw_ex(
         struct ResultBLF *r_info)
 {
        FontBLF *font = blf_get(fontid);
-       GLint mode;
 
        BLF_RESULT_CHECK_INIT(r_info);
 
        if (font && font->glyph_cache) {
-               blf_draw_gl__start(font, &mode);
+               blf_draw_gl__start(font);
                if (font->flags & BLF_WORD_WRAP) {
                        blf_font_draw__wrap(font, str, len, r_info);
                }
                else {
                        blf_font_draw(font, str, len, r_info);
                }
-               blf_draw_gl__end(mode);
+               blf_draw_gl__end();
        }
 }
 void BLF_draw(int fontid, const char *str, size_t len)
 {
+       if (len == 0 || str[0] == '\0') {
+               return;
+       }
+
        BLF_draw_ex(fontid, str, len, NULL);
 }
 
@@ -579,12 +582,11 @@ void BLF_draw_ascii_ex(
         struct ResultBLF *r_info)
 {
        FontBLF *font = blf_get(fontid);
-       GLint mode;
 
        BLF_RESULT_CHECK_INIT(r_info);
 
        if (font && font->glyph_cache) {
-               blf_draw_gl__start(font, &mode);
+               blf_draw_gl__start(font);
                if (font->flags & BLF_WORD_WRAP) {
                        /* use non-ascii draw function for word-wrap */
                        blf_font_draw__wrap(font, str, len, r_info);
@@ -592,24 +594,31 @@ void BLF_draw_ascii_ex(
                else {
                        blf_font_draw_ascii(font, str, len, r_info);
                }
-               blf_draw_gl__end(mode);
+               blf_draw_gl__end();
        }
 }
 void BLF_draw_ascii(int fontid, const char *str, size_t len)
 {
+       if (len == 0 || str[0] == '\0') {
+               return;
+       }
+
        BLF_draw_ascii_ex(fontid, str, len, NULL);
 }
 
 int BLF_draw_mono(int fontid, const char *str, size_t len, int cwidth)
 {
+       if (len == 0 || str[0] == '\0') {
+               return 0;
+       }
+
        FontBLF *font = blf_get(fontid);
-       GLint mode;
        int columns = 0;
 
        if (font && font->glyph_cache) {
-               blf_draw_gl__start(font, &mode);
+               blf_draw_gl__start(font);
                columns = blf_font_draw_mono(font, str, len, cwidth);
-               blf_draw_gl__end(mode);
+               blf_draw_gl__end();
        }
 
        return columns;
@@ -855,7 +864,7 @@ void BLF_shadow(int fontid, int level, const float rgba[4])
 
        if (font) {
                font->shadow = level;
-               copy_v4_v4(font->shadow_col, rgba);
+               rgba_float_to_uchar(font->shadow_color, rgba);
        }
 }
 
index 44a1d08f1fdb642334b33e545eac1ebde9ec4647..71350a0f8dcbe2f298a2a3b3d5e50f07072047ec 100644 (file)
@@ -58,6 +58,8 @@
 #include "BIF_gl.h"
 #include "BLF_api.h"
 
+#include "GPU_immediate.h"
+
 #include "blf_internal_types.h"
 #include "blf_internal.h"
 
@@ -172,6 +174,23 @@ static void blf_font_ensure_ascii_table(FontBLF *font)
        }                                                                            \
 } (void)0
 
+static unsigned verts_needed(const FontBLF *font, const char *str, size_t len)
+{
+       unsigned length = (unsigned)((len == INT_MAX) ? strlen(str) : len);
+       unsigned quad_ct = 1;
+
+       if (font->flags & BLF_SHADOW) {
+               if (font->shadow == 0)
+                       quad_ct += 1;
+               if (font->shadow <= 4)
+                       quad_ct += 9; /* 3x3 kernel */
+               else
+                       quad_ct += 25; /* 5x5 kernel */
+       }
+
+       return length * quad_ct * 4;
+}
+
 static void blf_font_draw_ex(
         FontBLF *font, const char *str, size_t len, struct ResultBLF *r_info,
         int pen_y)
@@ -187,6 +206,9 @@ static void blf_font_draw_ex(
 
        blf_font_ensure_ascii_table(font);
 
+       immBeginAtMost(GL_QUADS, verts_needed(font, str, len));
+       /* at most because some glyphs might be clipped & not drawn */
+
        while ((i < len) && str[i]) {
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
@@ -204,6 +226,8 @@ static void blf_font_draw_ex(
                g_prev = g;
        }
 
+       immEnd();
+
        if (r_info) {
                r_info->lines = 1;
                r_info->width = pen_x;
@@ -229,6 +253,8 @@ static void blf_font_draw_ascii_ex(
 
        blf_font_ensure_ascii_table(font);
 
+       immBeginAtMost(GL_QUADS, verts_needed(font, str, len));
+
        while ((c = *(str++)) && len--) {
                BLI_assert(c < 128);
                if ((g = glyph_ascii_table[c]) == NULL)
@@ -243,6 +269,8 @@ static void blf_font_draw_ascii_ex(
                g_prev = g;
        }
 
+       immEnd();
+
        if (r_info) {
                r_info->lines = 1;
                r_info->width = pen_x;
@@ -265,6 +293,8 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth)
 
        blf_font_ensure_ascii_table(font);
 
+       immBeginAtMost(GL_QUADS, verts_needed(font, str, len));
+
        while ((i < len) && str[i]) {
                BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
 
@@ -284,6 +314,8 @@ int blf_font_draw_mono(FontBLF *font, const char *str, size_t len, int cwidth)
                pen_x += cwidth * col;
        }
 
+       immEnd();
+
        return columns;
 }
 
@@ -922,7 +954,9 @@ static void blf_font_fill(FontBLF *font)
        font->size = 0;
        BLI_listbase_clear(&font->cache);
        font->glyph_cache = NULL;
+#if BLF_BLUR_ENABLE
        font->blur = 0;
+#endif
        font->max_tex_size = -1;
 
        font->buf_info.fbuf = NULL;
index aa7d539538b0249c71c1656c0280414e8efa2628..b1bab13f3ae23b66a61c8e611e2ac1556cb52219 100644 (file)
@@ -56,7 +56,7 @@
 #include "BLF_api.h"
 
 #ifndef BLF_STANDALONE
-#include "GPU_basic_shader.h"
+#include "GPU_immediate.h"
 #endif
 
 #include "blf_internal_types.h"
@@ -182,17 +182,6 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc)
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-#ifndef BLF_STANDALONE
-       /* needed since basic shader doesn't support alpha-only textures,
-        * while we could add support this is only used in a few places
-        * (an alternative could be to have a simple shader for BLF). */
-       if (GLEW_ARB_texture_swizzle && GPU_basic_shader_use_glsl_get()) {
-               GLint swizzle_mask[] = {GL_ONE, GL_ONE, GL_ONE, GL_ALPHA};
-               glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle_mask);
-       }
-#endif
-
        glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA8, gc->p2_width, gc->p2_height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL);
 }
 
@@ -326,73 +315,73 @@ void blf_glyph_free(GlyphBLF *g)
        MEM_freeN(g);
 }
 
-static void blf_texture_draw(float uv[2][2], float dx, float y1, float dx1, float y2)
+static void blf_texture_draw(const unsigned char color[4], float uv[2][2], float dx, float y1, float dx1, float y2)
 {
-       glBegin(GL_QUADS);
-       glTexCoord2f(uv[0][0], uv[0][1]);
-       glVertex2f(dx, y1);
-       
-       glTexCoord2f(uv[0][0], uv[1][1]);
-       glVertex2f(dx, y2);
-       
-       glTexCoord2f(uv[1][0], uv[1][1]);
-       glVertex2f(dx1, y2);
-       
-       glTexCoord2f(uv[1][0], uv[0][1]);
-       glVertex2f(dx1, y1);
-       glEnd();
+       immAttrib2f(BLF_COORD_ID, uv[0][0], uv[0][1]);
+       immSkipAttrib(BLF_COLOR_ID); /* skip color of most vertices */
+       immVertex2f(BLF_POS_ID, dx, y1);
+
+       immAttrib2f(BLF_COORD_ID, uv[0][0], uv[1][1]);
+       immSkipAttrib(BLF_COLOR_ID);
+       immVertex2f(BLF_POS_ID, dx, y2);
+
+       immAttrib2f(BLF_COORD_ID, uv[1][0], uv[1][1]);
+       immSkipAttrib(BLF_COLOR_ID);
+       immVertex2f(BLF_POS_ID, dx1, y2);
+
+       immAttrib2f(BLF_COORD_ID, uv[1][0], uv[0][1]);
+       immAttrib4ubv(BLF_COLOR_ID, color); /* set color of provoking vertex */
+       immVertex2f(BLF_POS_ID, dx1, y1);
 }
 
-static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
+static void blf_texture5_draw(const unsigned char color_in[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
        const float soft[25] = {1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f,
                                1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
                                2 / 60.0f, 5 / 60.0f, 8 / 60.0f, 5 / 60.0f, 2 / 60.0f,
                                1 / 60.0f, 3 / 60.0f, 5 / 60.0f, 3 / 60.0f, 1 / 60.0f,
                                1 / 60.0f, 1 / 60.0f, 2 / 60.0f, 1 / 60.0f, 1 / 60.0f};
-       
+
        const float *fp = soft;
-       float color[4];
+       unsigned char color[4];
        float dx, dy;
 
-       color[0] = shadow_col[0];
-       color[1] = shadow_col[1];
-       color[2] = shadow_col[2];
-       
+       color[0] = color_in[0];
+       color[1] = color_in[1];
+       color[2] = color_in[2];
+
+       const float alpha_in = (1 / 255.0f) * color_in[3];
+
        for (dx = -2; dx < 3; dx++) {
                for (dy = -2; dy < 3; dy++, fp++) {
-                       color[3] = *(fp) * shadow_col[3];
-                       glColor4fv(color);
-                       blf_texture_draw(uv, x1 + dx, y1 + dy, x2 + dx, y2 + dy);
+                       color[3] = FTOCHAR(*fp * alpha_in);
+                       blf_texture_draw(color, uv, x1 + dx, y1 + dy, x2 + dx, y2 + dy);
                }
        }
-       
-       glColor4fv(color);
 }
 
-static void blf_texture3_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
+static void blf_texture3_draw(const unsigned char color_in[4], float uv[2][2], float x1, float y1, float x2, float y2)
 {
        const float soft[9] = {1 / 16.0f, 2 / 16.0f, 1 / 16.0f,
                               2 / 16.0f, 4 / 16.0f, 2 / 16.0f,
                               1 / 16.0f, 2 / 16.0f, 1 / 16.0f};
 
        const float *fp = soft;
-       float color[4];
+       unsigned char color[4];
        float dx, dy;
 
-       color[0] = shadow_col[0];
-       color[1] = shadow_col[1];
-       color[2] = shadow_col[2];
+       color[0] = color_in[0];
+       color[1] = color_in[1];
+       color[2] = color_in[2];
+
+       const float alpha_in = (1 / 255.0f) * color_in[3];
 
        for (dx = -1; dx < 2; dx++) {
                for (dy = -1; dy < 2; dy++, fp++) {
-                       color[3] = *(fp) * shadow_col[3];
-                       glColor4fv(color);
-                       blf_texture_draw(uv, x1 + dx, y1 + dy, x2 + dx, y2 + dy);
+                       color[3] = FTOCHAR(*fp * alpha_in);
+                       blf_texture_draw(color, uv, x1 + dx, y1 + dy, x2 + dx, y2 + dy);
                }
        }
-       
-       glColor4fv(color);
 }
 
 static void blf_glyph_calc_rect(rctf *rect, GlyphBLF *g, float x, float y)
@@ -486,39 +475,37 @@ void blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
                glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state = g->tex));
        }
 
+       /* TODO: blur & shadow in shader, single quad per glyph */
+
        if (font->flags & BLF_SHADOW) {
                rctf rect_ofs;
                blf_glyph_calc_rect(&rect_ofs, g,
                                    x + (float)font->shadow_x,
                                    y + (float)font->shadow_y);
 
-               switch (font->shadow) {
-                       case 3:
-                               blf_texture3_draw(font->shadow_col, g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
-                               break;
-                       case 5:
-                               blf_texture5_draw(font->shadow_col, g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
-                               break;
-                       default:
-                               glColor4fv(font->shadow_col);
-                               blf_texture_draw(g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
-                               break;
+               if (font->shadow == 0) {
+                       blf_texture_draw(font->shadow_color, g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
+               }
+               else if (font->shadow <= 4) {
+                       blf_texture3_draw(font->shadow_color, g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
+               }
+               else {
+                       blf_texture5_draw(font->shadow_color, g->uv, rect_ofs.xmin, rect_ofs.ymin, rect_ofs.xmax, rect_ofs.ymax);
                }
-
-               glColor4fv(font->orig_col);
        }
 
+#if BLF_BLUR_ENABLE
        switch (font->blur) {
                case 3:
-                       blf_texture3_draw(font->orig_col, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+                       blf_texture3_draw(font->color, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
                        break;
                case 5:
-                       blf_texture5_draw(font->orig_col, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+                       blf_texture5_draw(font->color, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
                        break;
                default:
-                       blf_texture_draw(g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
-                       break;
+                       blf_texture_draw(font->color, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
        }
-
-       return;
+#else
+       blf_texture_draw(font->color, g->uv, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+#endif
 }
index d9d758ce548b84c7b04183dca01bd1fd83400269..ba17e0503997a63b80aa2ceb54467bb1a851f9b6 100644 (file)
@@ -37,6 +37,11 @@ struct GlyphBLF;
 struct GlyphCacheBLF;
 struct rctf;
 
+/* vertex attribute IDs (fixed IDs so we don't have to pass them around) */
+#define BLF_POS_ID 0
+#define BLF_COORD_ID 1
+#define BLF_COLOR_ID 2
+
 unsigned int blf_next_p2(unsigned int x);
 unsigned int blf_hash(unsigned int val);
 
index 0fac576a8ccb399cb00050100bf26d6a9cfb2ad0..9164a02b2ccf5684cb3be4a73e7ba2528bcc09d0 100644 (file)
@@ -175,8 +175,10 @@ typedef struct FontBLF {
        /* angle in radians. */
        float angle;
        
+#if 0 /* BLF_BLUR_ENABLE */
        /* blur: 3 or 5&