Remove Blender Internal and legacy viewport from Blender 2.8.
authorTon Roosendaal <ton@blender.org>
Thu, 19 Apr 2018 15:34:44 +0000 (17:34 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 19 Apr 2018 15:35:25 +0000 (17:35 +0200)
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!

* Point density, voxel data, ocean, environment map textures were removed,
  as these only worked within BI rendering. Note that the ocean modifier
  and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
  with BI. If we ever wanted to support this again probably it should go
  through the baking API.
* GPU shader export through the Python API was removed. This only worked
  for the old BI GLSL shaders, which no longer exists. Doing something
  similar for Eevee would be significantly more complicated because it
  uses a lot of multiplass rendering and logic outside the shader, it's
  probably impractical.
* Collada material import / export code is mostly gone, as it only worked
  for BI materials. We need to add Cycles / Eevee material support at some
  point.
* The mesh noise operator was removed since it only worked with BI
  material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
  for BI material texture slots. Could be added back with node support.

* Not all legacy viewport features are supported in the new viewport, but
  their code was removed. If we need to bring anything back we can look at
  older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
  that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
  used anywhere now. We may eventually use this to replace the texture
  nodes with Cycles / Eevee shader nodes.

* The Cycles Bake panel now includes settings for baking multires normal
  and displacement maps. The underlying code needs to be merged properly,
  and we plan to add back support for multires AO baking and add support
  to Cycles baking for features like vertex color, displacement, and other
  missing baking features.

* This commit removes DNA and the Python API for BI material, lamp, world
  and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
  are reusing some old BI properties but the names are not really correct
  anymore.
* Texture slots for materials, lamps and world were removed. They remain
  for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
  other renderers use this to find all panels to show, minus a few panels
  that they have their own replacement for.

309 files changed:
doc/python_api/rst/gpu.rst
intern/cycles/blender/addon/ui.py
release/scripts/freestyle/modules/parameter_editor.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_freestyle.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_physics_rigidbody.py
release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/properties_world.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/startup/nodeitems_builtins.py
release/scripts/templates_py/ui_list_simple.py
source/blender/alembic/intern/abc_hair.cc
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_blender_version.h
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/bpath.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/lamp.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_dupli.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_child.c
source/blender/blenkernel/intern/particle_distribute.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenkernel/intern/writeffmpeg.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_280.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/DocumentImporter.h
source/blender/collada/EffectExporter.cpp
source/blender/collada/EffectExporter.h
source/blender/collada/ImageExporter.cpp
source/blender/collada/LightExporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/collada/MeshImporter.h
source/blender/collada/collada_utils.cpp
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/draw/intern/draw_manager_shader.c
source/blender/draw/modes/object_mode.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/include/ED_buttons.h
source/blender/editors/include/ED_render.h
source/blender/editors/include/ED_uvedit.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/io/io_collada.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/render/render_intern.h
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_intern.h
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_image/image_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_node/space_node.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_view3d/CMakeLists.txt
source/blender/editors/space_view3d/drawanimviz.c [deleted file]
source/blender/editors/space_view3d/drawarmature.c [deleted file]
source/blender/editors/space_view3d/drawmesh.c [deleted file]
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawsimdebug.c [deleted file]
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
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/undo/ed_undo.c
source/blender/editors/undo/memfile_undo.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp
source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
source/blender/freestyle/intern/stroke/Stroke.h
source/blender/gpu/CMakeLists.txt
source/blender/gpu/GPU_buffers.h
source/blender/gpu/GPU_draw.h
source/blender/gpu/GPU_lamp.h [deleted file]
source/blender/gpu/GPU_material.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_codegen.h
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_init_exit.c
source/blender/gpu/intern/gpu_lamp.c [deleted file]
source/blender/gpu/intern/gpu_lamp_private.h [deleted file]
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/intern/gpu_shader.c
source/blender/gpu/shaders/gpu_shader_geometry.glsl
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/gpu/shaders/gpu_shader_vertex.glsl
source/blender/gpu/shaders/gpu_shader_vertex_world.glsl
source/blender/makesdna/DNA_dynamicpaint_types.h
source/blender/makesdna/DNA_lamp_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_texture_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_world.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/nodes/CMakeLists.txt
source/blender/nodes/NOD_shader.h
source/blender/nodes/NOD_static_types.h
source/blender/nodes/intern/node_exec.c
source/blender/nodes/shader/node_shader_tree.c
source/blender/nodes/shader/node_shader_util.c
source/blender/nodes/shader/node_shader_util.h
source/blender/nodes/shader/nodes/node_shader_camera.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_geom.c [deleted file]
source/blender/nodes/shader/nodes/node_shader_lamp.c [deleted file]
source/blender/nodes/shader/nodes/node_shader_layer_weight.c
source/blender/nodes/shader/nodes/node_shader_material.c [deleted file]
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_normal_map.c
source/blender/nodes/shader/nodes/node_shader_object_info.c
source/blender/nodes/shader/nodes/node_shader_output.c [deleted file]
source/blender/nodes/shader/nodes/node_shader_particle_info.c
source/blender/nodes/shader/nodes/node_shader_texture.c [deleted file]
source/blender/nodes/shader/nodes/node_shader_vectTransform.c
source/blender/nodes/texture/node_texture_tree.c
source/blender/nodes/texture/node_texture_util.c
source/blender/nodes/texture/node_texture_util.h
source/blender/nodes/texture/nodes/node_texture_proc.c
source/blender/nodes/texture/nodes/node_texture_texture.c
source/blender/physics/BPH_mass_spring.h
source/blender/physics/intern/BPH_mass_spring.cpp
source/blender/physics/intern/hair_volume.cpp
source/blender/physics/intern/implicit.h
source/blender/python/intern/gpu.c
source/blender/python/intern/gpu_offscreen.c
source/blender/render/CMakeLists.txt
source/blender/render/extern/include/RE_bake.h
source/blender/render/extern/include/RE_engine.h
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/extern/include/RE_render_ext.h
source/blender/render/extern/include/RE_shader_ext.h
source/blender/render/intern/include/envmap.h [deleted file]
source/blender/render/intern/include/initrender.h
source/blender/render/intern/include/occlusion.h [deleted file]
source/blender/render/intern/include/pixelblending.h [deleted file]
source/blender/render/intern/include/pixelshading.h [deleted file]
source/blender/render/intern/include/pointdensity.h [deleted file]
source/blender/render/intern/include/raycounter.h [deleted file]
source/blender/render/intern/include/rayintersection.h [deleted file]
source/blender/render/intern/include/rayobject.h [deleted file]
source/blender/render/intern/include/render_result.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/include/rendercore.h [deleted file]
source/blender/render/intern/include/renderdatabase.h [deleted file]
source/blender/render/intern/include/renderpipeline.h
source/blender/render/intern/include/shadbuf.h [deleted file]
source/blender/render/intern/include/shading.h [deleted file]
source/blender/render/intern/include/sss.h [deleted file]
source/blender/render/intern/include/strand.h [deleted file]
source/blender/render/intern/include/sunsky.h [deleted file]
source/blender/render/intern/include/texture.h
source/blender/render/intern/include/texture_ocean.h [deleted file]
source/blender/render/intern/include/volume_precache.h [deleted file]
source/blender/render/intern/include/volumetric.h [deleted file]
source/blender/render/intern/include/voxeldata.h [deleted file]
source/blender/render/intern/include/zbuf.h
source/blender/render/intern/raytrace/bvh.h [deleted file]
source/blender/render/intern/raytrace/rayobject.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_empty.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_hint.h [deleted file]
source/blender/render/intern/raytrace/rayobject_instance.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_internal.h [deleted file]
source/blender/render/intern/raytrace/rayobject_octree.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_qbvh.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_raycounter.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_rtbuild.h [deleted file]
source/blender/render/intern/raytrace/rayobject_svbvh.cpp [deleted file]
source/blender/render/intern/raytrace/rayobject_vbvh.cpp [deleted file]
source/blender/render/intern/raytrace/reorganize.h [deleted file]
source/blender/render/intern/raytrace/svbvh.h [deleted file]
source/blender/render/intern/raytrace/vbvh.h [deleted file]
source/blender/render/intern/source/bake.c [deleted file]
source/blender/render/intern/source/bake_api.c
source/blender/render/intern/source/convertblender.c [deleted file]
source/blender/render/intern/source/envmap.c [deleted file]
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/multires_bake.c
source/blender/render/intern/source/occlusion.c [deleted file]
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelblending.c [deleted file]
source/blender/render/intern/source/pixelshading.c [deleted file]
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayshade.c [deleted file]
source/blender/render/intern/source/render_result.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/rendercore.c [deleted file]
source/blender/render/intern/source/renderdatabase.c [deleted file]
source/blender/render/intern/source/shadbuf.c [deleted file]
source/blender/render/intern/source/shadeinput.c [deleted file]
source/blender/render/intern/source/shadeoutput.c [deleted file]
source/blender/render/intern/source/sss.c [deleted file]
source/blender/render/intern/source/strand.c [deleted file]
source/blender/render/intern/source/sunsky.c [deleted file]
source/blender/render/intern/source/texture_ocean.c [deleted file]
source/blender/render/intern/source/volume_precache.c [deleted file]
source/blender/render/intern/source/volumetric.c [deleted file]
source/blender/render/intern/source/voxeldata.c [deleted file]
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_files_link.c
source/blender/windowmanager/intern/wm_init_exit.c

index 0be4fae..d4860da 100644 (file)
@@ -4,7 +4,7 @@ GPU functions (gpu)
 
 .. module:: gpu
 
-This module provides access to materials GLSL shaders.
+Functions for GPU offscreen rendering, matrix stacks and selection.
 
 Submodules:
 
@@ -17,683 +17,4 @@ Submodules:
 Intro
 =====
 
-Module to provide functions concerning the GPU implementation in Blender, in particular
-the GLSL shaders that blender generates automatically to render materials in the 3D view.
-
-.. warning::
-
-   The API provided by this module is subject to change.
-   The data exposed by the API are are closely related to Blender's internal GLSL code
-   and may change if the GLSL code is modified (e.g. new uniform type).
-
-
-Constants
-=========
-
-GLSL Data Type
---------------
-
-.. _data-type:
-
-Type of GLSL data.
-For shader uniforms, the data type determines which ``glUniform`` function
-variant to use to send the uniform value to the GPU.
-For vertex attributes, the data type determines which ``glVertexAttrib`` function
-variant to use to send the vertex attribute to the GPU.
-
-See export_shader_
-
-.. data:: GPU_DATA_1I
-
-   one integer
-
-.. data:: GPU_DATA_1F
-
-   one float
-
-.. data:: GPU_DATA_2F
-
-   two floats
-
-.. data:: GPU_DATA_3F
-
-   three floats
-
-.. data:: GPU_DATA_4F
-
-   four floats
-
-.. data:: GPU_DATA_9F
-
-   matrix 3x3 in column-major order
-
-.. data:: GPU_DATA_16F
-
-   matrix 4x4 in column-major order
-
-.. data:: GPU_DATA_4UB
-
-   four unsigned byte
-
-
-GLSL Uniform Types
-------------------
-
-.. _uniform-type:
-
-Constants that specify the type of uniform used in a GLSL shader.
-The uniform type determines the data type, origin and method
-of calculation used by Blender to compute the uniform value.
-
-The calculation of some of the uniforms is based on matrices available in the scene:
-
-   .. _mat4_cam_to_world:
-   .. _mat4_world_to_cam:
-
-   ``mat4_cam_to_world``
-     Model matrix of the camera. OpenGL 4x4 matrix that converts
-     camera local coordinates to world coordinates. In blender this is obtained from the
-     'matrix_world' attribute of the camera object.
-
-     Some uniform will need the *mat4_world_to_cam*
-     matrix computed as the inverse of this matrix.
-
-   .. _mat4_object_to_world:
-   .. _mat4_world_to_object:
-
-   ``mat4_object_to_world``
-     Model matrix of the object that is being rendered. OpenGL 4x4 matric that converts
-     object local coordinates to world coordinates. In blender this is obtained from the
-     'matrix_world' attribute of the object.
-
-     Some uniform will need the *mat4_world_to_object* matrix, computed as the inverse of this matrix.
-
-   .. _mat4_lamp_to_world:
-   .. _mat4_world_to_lamp:
-
-   ``mat4_lamp_to_world``
-     Model matrix of the lamp lighting the object. OpenGL 4x4 matrix that converts lamp
-     local coordinates to world coordinates. In blender this is obtained from the
-     'matrix_world' attribute of the lamp object.
-
-     Some uniform will need the *mat4_world_to_lamp* matrix
-     computed as the inverse of this matrix.
-
-
-.. note::
-
-   Any uniforms used for view projections or transformations (object, lamp matrices for eg),
-   can only be set once per frame.
-
-
-GLSL Object Uniforms
-^^^^^^^^^^^^^^^^^^^^
-
-.. note::
-
-   - Object transformations and color must be set before drawing the object.
-   - There is at most one uniform of these types per shader.
-
-.. data:: GPU_DYNAMIC_OBJECT_VIEWMAT
-
-   A matrix that converts world coordinates to camera coordinates (see mat4_world_to_cam_).
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_OBJECT_MAT
-
-   A matrix that converts object coordinates to world coordinates (see mat4_object_to_world_).
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_OBJECT_VIEWIMAT
-
-   The uniform is a 4x4 GL matrix that converts coordinates
-   in camera space to world coordinates (see mat4_cam_to_world_).
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_OBJECT_IMAT
-
-   The uniform is a 4x4 GL matrix that converts world coodinates
-   to object coordinates (see mat4_world_to_object_).
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_OBJECT_COLOR
-
-   An RGB color + alpha defined at object level.
-   Each values between 0.0 and 1.0.
-
-   See :class:`bpy.types.Object.color`.
-
-   :type: float4
-
-.. data:: GPU_DYNAMIC_OBJECT_AUTOBUMPSCALE
-
-   Multiplier for bump-map scaling.
-
-   :type: float
-
-
-GLSL Lamp Uniforms
-^^^^^^^^^^^^^^^^^^
-
-.. note::
-
-   There is one uniform of that type per lamp lighting the material.
-
-.. data:: GPU_DYNAMIC_LAMP_DYNVEC
-
-   Represents the direction of light in camera space.
-
-   Computed as:
-      mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
-
-   .. note::
-
-      - The lamp Z axis points to the opposite direction of light.
-      - The norm of the vector should be unit length.
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_LAMP_DYNCO
-
-   Represents the position of the light in camera space.
-
-   Computed as:
-      mat4_world_to_cam_ * vec3_lamp_pos
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_LAMP_DYNIMAT
-
-   Matrix that converts vector in camera space to lamp space.
-
-   Computed as:
-      mat4_world_to_lamp_ * mat4_cam_to_world_
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_LAMP_DYNPERSMAT
-
-   Matrix that converts a vector in camera space to shadow buffer depth space.
-
-   Computed as:
-      mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
-
-   .. _mat4_perspective_to_depth:
-
-   ``mat4_perspective_to_depth`` is a fixed matrix defined as follow::
-
-      0.5 0.0 0.0 0.5
-      0.0 0.5 0.0 0.5
-      0.0 0.0 0.5 0.5
-      0.0 0.0 0.0 1.0
-
-   .. note::
-
-      - There is one uniform of that type per lamp casting shadow in the scene.
-
-   :type: matrix4x4
-
-.. data:: GPU_DYNAMIC_LAMP_DYNENERGY
-
-   See :class:`bpy.types.Lamp.energy`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_DYNCOL
-
-   See :class:`bpy.types.Lamp.color`.
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_LAMP_DISTANCE
-
-   See :class:`bpy.types.Lamp.distance`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_ATT1
-
-   See
-   :class:`bpy.types.PointLamp.linear_attenuation`,
-   :class:`bpy.types.SpotLamp.linear_attenuation`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_ATT2
-
-   See
-   :class:`bpy.types.PointLamp.quadratic_attenuation`,
-   :class:`bpy.types.SpotLamp.quadratic_attenuation`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_SPOTSIZE
-
-   See :class:`bpy.types.SpotLamp.spot_size`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_SPOTBLEND
-
-   See :class:`bpy.types.SpotLamp.spot_blend`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_LAMP_SPOTSCALE
-
-   Represents the SpotLamp local scale.
-
-   :type: float2
-
-
-GLSL Sampler Uniforms
-^^^^^^^^^^^^^^^^^^^^^
-
-.. data:: GPU_DYNAMIC_SAMPLER_2DBUFFER
-
-   Represents an internal texture used for certain effect
-   (color band, etc).
-
-   :type: integer
-
-.. data:: GPU_DYNAMIC_SAMPLER_2DIMAGE
-
-   Represents a texture loaded from an image file.
-
-   :type: integer
-
-.. data:: GPU_DYNAMIC_SAMPLER_2DSHADOW
-
-   Represents a texture loaded from a shadow buffer file.
-
-   :type: integer
-
-
-GLSL Mist Uniforms
-^^^^^^^^^^^^^^^^^^
-
-.. data:: GPU_DYNAMIC_MIST_ENABLE:
-
-   See :class:`bpy.types.WorldMistSettings.use_mist`.
-
-   :type: float (0 or 1)
-
-.. data:: GPU_DYNAMIC_MIST_START
-
-   See :class:`bpy.types.WorldMistSettings.start`.
-
-   :type: float
-
-   See :class:`bpy.types.WorldMistSettings.depth`.
-
-.. data:: GPU_DYNAMIC_MIST_DISTANCE
-
-   :type: float
-
-   See :class:`bpy.types.WorldMistSettings.intensity`.
-
-.. data:: GPU_DYNAMIC_MIST_INTENSITY
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MIST_TYPE
-
-   See :class:`bpy.types.WorldMistSettings.falloff`.
-
-   :type: float (used as an index into the type)
-
-.. data:: GPU_DYNAMIC_MIST_COLOR
-
-
-GLSL World Uniforms
-^^^^^^^^^^^^^^^^^^^
-
-.. data:: GPU_DYNAMIC_HORIZON_COLOR
-
-   See :class:`bpy.types.World.horizon_color`.
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_AMBIENT_COLOR
-
-   See :class:`bpy.types.World.ambient_color`.
-
-   :type: float3
-
-
-GLSL Material Uniforms
-^^^^^^^^^^^^^^^^^^^^^^
-
-.. data:: GPU_DYNAMIC_MAT_DIFFRGB
-
-   See :class:`bpy.types.Material.diffuse_color`.
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_MAT_REF
-
-   See :class:`bpy.types.Material.diffuse_intensity`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MAT_SPECRGB
-
-   See :class:`bpy.types.Material.specular_color`.
-
-   :type: float3
-
-.. data:: GPU_DYNAMIC_MAT_SPEC
-
-   See :class:`bpy.types.Material.specular_intensity`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MAT_HARD
-
-   See :class:`bpy.types.Material.specular_hardness`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MAT_EMIT
-
-   See :class:`bpy.types.Material.emit`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MAT_AMB
-
-   See :class:`bpy.types.Material.ambient`.
-
-   :type: float
-
-.. data:: GPU_DYNAMIC_MAT_ALPHA
-
-   See :class:`bpy.types.Material.alpha`.
-
-   :type: float
-
-
-
-GLSL Attribute Type
--------------------
-
-.. _attribute-type:
-
-Type of the vertex attribute used in the GLSL shader. Determines the mesh custom data
-layer that contains the vertex attribute.
-
-.. data:: CD_MTFACE
-
-   Vertex attribute is a UV Map. Data type is vector of 2 float.
-
-   There can be more than one attribute of that type, they are differenciated by name.
-   In blender, you can retrieve the attribute data with:
-
-   .. code-block:: python
-
-      mesh.uv_layers[attribute["name"]]
-
-.. data:: CD_MCOL
-
-   Vertex attribute is color layer. Data type is vector 4 unsigned byte (RGBA).
-
-   There can be more than one attribute of that type, they are differenciated by name.
-   In blender you can retrieve the attribute data with:
-
-   .. code-block:: python
-
-      mesh.vertex_colors[attribute["name"]]
-
-.. data:: CD_ORCO
-
-   Vertex attribute is original coordinates. Data type is vector 3 float.
-
-   There can be only 1 attribute of that type per shader.
-   In blender you can retrieve the attribute data with:
-
-   .. code-block:: python
-
-      mesh.vertices
-
-.. data:: CD_TANGENT
-
-   Vertex attribute is the tangent vector. Data type is vector 4 float.
-
-   There can be only 1 attribute of that type per shader.
-   There is currently no way to retrieve this attribute data via the RNA API but a standalone
-   C function to compute the tangent layer from the other layers can be obtained from
-   blender.org.
-
-
-Functions
-=========
-
-.. _export_shader:
-
-.. function:: export_shader(scene,material)
-
-   Extracts the GLSL shader producing the visual effect of material in scene for the purpose of
-   reusing the shader in an external engine.
-
-   This function is meant to be used in material exporter
-   so that the GLSL shader can be exported entirely.
-
-   The return value is a dictionary containing the
-   shader source code and all associated data.
-
-   :arg scene: the scene in which the material in rendered.
-   :type scene: :class:`bpy.types.Scene`
-   :arg material: the material that you want to export the GLSL shader
-   :type material: :class:`bpy.types.Material`
-   :return: the shader source code and all associated data in a dictionary
-   :rtype: dictionary
-
-   The dictionary contains the following elements:
-
-   - ``["fragment"]``: string
-      fragment shader source code.
-
-   - ``["vertex"]``: string
-      vertex shader source code.
-
-   - ``["uniforms"]``: sequence
-      list of uniforms used in fragment shader, can be empty list. Each element of the
-      sequence is a dictionary with the following elements:
-
-      - ``["varname"]``: string
-         name of the uniform in the fragment shader. Always of the form 'unf<number>'.
-
-      - ``["datatype"]``: integer
-         data type of the uniform variable. Can be one of the following:
-
-         .. hlist::
-            :columns: 2
-
-            - :data:`gpu.GPU_DATA_1I` : use ``glUniform1i``
-            - :data:`gpu.GPU_DATA_1F` : use ``glUniform1fv``
-            - :data:`gpu.GPU_DATA_2F` : use ``glUniform2fv``
-            - :data:`gpu.GPU_DATA_3F` : use ``glUniform3fv``
-            - :data:`gpu.GPU_DATA_4F` : use ``glUniform4fv``
-            - :data:`gpu.GPU_DATA_9F` : use ``glUniformMatrix3fv``
-            - :data:`gpu.GPU_DATA_16F` : use ``glUniformMatrix4fv``
-
-      - ``["type"]``: integer
-         type of uniform, determines the origin and method of calculation. See uniform-type_.
-         Depending on the type, more elements will be be present.
-
-      - ``["lamp"]``: :class:`bpy.types.Object`
-         Reference to the lamp object from which the uniforms value are extracted.
-         Set for the following uniforms types:
-
-         .. hlist::
-            :columns: 2
-
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
-            - :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
-            - :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
-
-         Notes:
-
-         - The uniforms
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`,
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`,
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
-           refer to the lamp object position and orientation,
-           both of can be derived from the object world matrix:
-
-            .. code-block:: python
-
-               obmat = uniform["lamp"].matrix_world
-
-            where obmat is the mat4_lamp_to_world_ matrix of the lamp as a 2 dimensional array,
-            the lamp world location location is in ``obmat[3]``.
-
-         - The uniform types
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and
-           :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
-           refer to the lamp data bloc that you get from:
-
-            .. code-block:: python
-
-               la = uniform["lamp"].data
-
-            from which you get ``lamp.energy`` and ``lamp.color``
-
-         - Lamp duplication is not supported: if you have duplicated lamps in your scene
-            (i.e. lamp that are instantiated by dupligroup, etc), this element will only
-            give you a reference to the orignal lamp and you will not know which instance
-            of the lamp it is refering too. You can still handle that case in the exporter
-            by distributing the uniforms amongst the duplicated lamps.
-
-      - ``["image"]``: :class:`bpy.types.Image`
-         Reference to the image databloc.
-         Set for uniform type
-         :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`.
-         You can get the image data from:
-
-         .. code-block:: python
-
-            # full path to image file
-            uniform["image"].filepath
-            # image size as a 2-dimensional array of int
-            uniform["image"].size
-
-      - ``["texnumber"]``: integer
-         Channel number to which the texture is bound when drawing the object.
-         Set for uniform types
-         :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`,
-         :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and
-         :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
-
-         This is provided for information only: when reusing the shader outside blencer,
-         you are free to assign the textures to the channel of your choice and to pass
-         that number channel to the GPU in the uniform.
-
-      - ``["texpixels"]``: byte array
-         texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
-         Although the corresponding uniform is a 2D sampler,
-         the texture is always a 1D texture of n x 1 pixel.
-         The texture size n is provided in ["texsize"] element.
-         These texture are only used for computer generated texture (colorband, etc).
-         The texture data is provided so that you can make a real image out of it in the exporter.
-
-      - ``["texsize"]``: integer
-         horizontal size of texture for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
-         The texture data is in ["texpixels"].
-
-   - ``["attributes"]``: sequence
-      list of attributes used in vertex shader, can be empty. Blender doesn't use
-      standard attributes except for vertex position and normal. All other vertex
-      attributes must be passed using the generic ``glVertexAttrib`` functions.
-      The attribute data can be found in the derived mesh custom data using RNA.
-      Each element of the sequence is a dictionary containing the following elements:
-
-      - ``["varname"]``: string
-         name of the uniform in the vertex shader. Always of the form 'att<number>'.
-
-      - ``["datatype"]``: integer
-         data type of vertex attribute, can be one of the following:
-
-         - :data:`gpu.GPU_DATA_2F`: use ``glVertexAttrib2fv``
-         - :data:`gpu.GPU_DATA_3F`: use ``glVertexAttrib3fv``
-         - :data:`gpu.GPU_DATA_4F`: use ``glVertexAttrib4fv``
-         - :data:`gpu.GPU_DATA_4UB`: use ``glVertexAttrib4ubv``
-
-      - ``["number"]``: integer
-         Generic attribute number. This is provided for information only.
-         Blender doesn't use ``glBindAttribLocation`` to place generic attributes at specific location,
-         it lets the shader compiler place the attributes automatically and query the
-         placement with ``glGetAttribLocation``.
-         The result of this placement is returned in this element.
-
-         When using this shader in a render engine, you should either use
-         ``glBindAttribLocation`` to force the attribute at this location or use
-         ``glGetAttribLocation`` to get the placement chosen by the compiler of your GPU.
-
-      - ``["type"]``: integer
-         type of the mesh custom data from which the vertex attribute is loaded.
-         See attribute-type_.
-
-      - ``["name"]``: string or integer
-         custom data layer name, used for attribute type :data:`gpu.CD_MTFACE` and :data:`gpu.CD_MCOL`.
-
-   Example:
-
-   .. code-block:: python
-
-      import gpu
-      # get GLSL shader of material Mat.001 in scene Scene.001
-      scene = bpy.data.scenes["Scene.001"]
-      material = bpy.data.materials["Mat.001"]
-      shader = gpu.export_shader(scene,material)
-      # scan the uniform list and find the images used in the shader
-      for uniform in shader["uniforms"]:
-          if uniform["type"] == gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE:
-              print("uniform {0} is using image {1}".format(uniform["varname"], uniform["image"].filepath))
-      # scan the attribute list and find the UV Map used in the shader
-      for attribute in shader["attributes"]:
-          if attribute["type"] == gpu.CD_MTFACE:
-              print("attribute {0} is using UV Map {1}".format(attribute["varname"], attribute["name"]))
-
-
-Notes
-=====
-
-.. _mat4_lamp_to_perspective:
-
-#. Calculation of the ``mat4_lamp_to_perspective`` matrix for a spot lamp.
-
-   The following pseudo code shows how the ``mat4_lamp_to_perspective`` matrix is computed
-   in blender for uniforms of :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT` type:
-
-   .. code-block:: python
-
-      # Get the lamp datablock with:
-      lamp = bpy.data.objects[uniform["lamp"]].data
-
-      # Compute the projection matrix:
-      #  You will need these lamp attributes:
-      #  lamp.clipsta : near clip plane in world unit
-      #  lamp.clipend : far clip plane in world unit
-      #  lamp.spotsize : angle in degree of the spot light
-
-      # The size of the projection plane is computed with the usual formula:
-      wsize = lamp.clista * tan(lamp.spotsize/2)
-
-      # And the projection matrix:
-      mat4_lamp_to_perspective = glFrustum(-wsize, wsize, -wsize, wsize, lamp.clista, lamp.clipend)
-
-#. Creation of the shadow map for a spot lamp.
-
-   The shadow map is the depth buffer of a render performed by placing the camera at the
-   spot light position. The size of the shadow map is given by the attribute ``lamp.bufsize``:
-   shadow map size in pixel, same size in both dimensions.
+Module to provide functions concerning the GPU implementation in Blender.
index 33fbcad..7656428 100644 (file)
@@ -1313,167 +1313,6 @@ class CYCLES_MATERIAL_PT_viewport(CyclesButtonsPanel, Panel):
         col.prop(mat, "specular_hardness", text="Hardness")
 
 
-class CYCLES_TEXTURE_PT_context(CyclesButtonsPanel, Panel):
-    bl_label = ""
-    bl_context = "texture"
-    bl_options = {'HIDE_HEADER'}
-    COMPAT_ENGINES = {'CYCLES'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        space = context.space_data
-        pin_id = space.pin_id
-        use_pin_id = space.use_pin_id
-        user = context.texture_user
-
-        space.use_limited_texture_context = False
-
-        if not (use_pin_id and isinstance(pin_id, bpy.types.Texture)):
-            pin_id = None
-
-        if not pin_id:
-            layout.template_texture_user()
-
-        if user or pin_id:
-            layout.separator()
-
-            split = layout.split(percentage=0.65)
-            col = split.column()
-
-            if pin_id:
-                col.template_ID(space, "pin_id")
-            else:
-                propname = context.texture_user_property.identifier
-                col.template_ID(user, propname, new="texture.new")
-
-            if tex:
-                split = layout.split(percentage=0.2)
-                split.label(text="Type:")
-                split.prop(tex, "type", text="")
-
-
-class CYCLES_TEXTURE_PT_node(CyclesButtonsPanel, Panel):
-    bl_label = "Node"
-    bl_context = "texture"
-
-    @classmethod
-    def poll(cls, context):
-        node = context.texture_node
-        return node and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        node = context.texture_node
-        ntree = node.id_data
-        layout.template_node_view(ntree, node, None)
-
-
-class CYCLES_TEXTURE_PT_mapping(CyclesButtonsPanel, Panel):
-    bl_label = "Mapping"
-    bl_context = "texture"
-
-    @classmethod
-    def poll(cls, context):
-        node = context.texture_node
-        # TODO(sergey): perform a faster/nicer check?
-        return node and hasattr(node, 'texture_mapping') and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        node = context.texture_node
-
-        mapping = node.texture_mapping
-
-        layout.prop(mapping, "vector_type", expand=True)
-
-        row = layout.row()
-
-        row.column().prop(mapping, "translation")
-        row.column().prop(mapping, "rotation")
-        row.column().prop(mapping, "scale")
-
-        layout.label(text="Projection:")
-
-        row = layout.row()
-        row.prop(mapping, "mapping_x", text="")
-        row.prop(mapping, "mapping_y", text="")
-        row.prop(mapping, "mapping_z", text="")
-
-
-class CYCLES_TEXTURE_PT_colors(CyclesButtonsPanel, Panel):
-    bl_label = "Color"
-    bl_context = "texture"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        # node = context.texture_node
-        return False
-        # return node and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        node = context.texture_node
-
-        mapping = node.color_mapping
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Blend:")
-        col.prop(mapping, "blend_type", text="")
-        col.prop(mapping, "blend_factor", text="Factor")
-        col.prop(mapping, "blend_color", text="")
-
-        col = split.column()
-        col.label(text="Adjust:")
-        col.prop(mapping, "brightness")
-        col.prop(mapping, "contrast")
-        col.prop(mapping, "saturation")
-
-        layout.separator()
-
-        layout.prop(mapping, "use_color_ramp", text="Ramp")
-        if mapping.use_color_ramp:
-            layout.template_color_ramp(mapping, "color_ramp", expand=True)
-
-
-class CYCLES_PARTICLE_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 CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
     bl_label = "Bake"
     bl_context = "render"
@@ -1486,66 +1325,83 @@ class CYCLES_RENDER_PT_bake(CyclesButtonsPanel, Panel):
         scene = context.scene
         cscene = scene.cycles
         cbk = scene.render.bake
+        rd = scene.render
 
-        layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
+        if rd.use_bake_multires:
+            layout.operator("object.bake_image", icon='RENDER_STILL')
+        else:
+            layout.operator("object.bake", icon='RENDER_STILL').type = cscene.bake_type
 
         col = layout.column()
-        col.prop(cscene, "bake_type")
+        col.prop(rd, "use_bake_multires")
+        if rd.use_bake_multires:
+            col.prop(rd, "bake_type")
 
-        col = layout.column()
+            split = layout.split()
 
-        if cscene.bake_type == 'NORMAL':
-            col.prop(cbk, "normal_space", text="Space")
+            col = split.column()
+            col.prop(rd, "bake_margin")
+            col.prop(rd, "use_bake_clear")
 
-            row = col.row(align=True)
-            row.label(text="Swizzle:")
-            row.prop(cbk, "normal_r", text="")
-            row.prop(cbk, "normal_g", text="")
-            row.prop(cbk, "normal_b", text="")
+            col = split.column()
+            if rd.bake_type == 'DISPLACEMENT':
+                col.prop(rd, "use_bake_lores_mesh")
+        else:
+            col.prop(cscene, "bake_type")
 
-        elif cscene.bake_type == 'COMBINED':
-            row = col.row(align=True)
-            row.prop(cbk, "use_pass_direct", toggle=True)
-            row.prop(cbk, "use_pass_indirect", toggle=True)
+            col = layout.column()
 
-            split = col.split()
-            split.active = cbk.use_pass_direct or cbk.use_pass_indirect
+            if cscene.bake_type == 'NORMAL':
+                col.prop(cbk, "normal_space", text="Space")
 
-            col = split.column()
-            col.prop(cbk, "use_pass_diffuse")
-            col.prop(cbk, "use_pass_glossy")
-            col.prop(cbk, "use_pass_transmission")
+                row = col.row(align=True)
+                row.label(text="Swizzle:")
+                row.prop(cbk, "normal_r", text="")
+                row.prop(cbk, "normal_g", text="")
+                row.prop(cbk, "normal_b", text="")
 
-            col = split.column()
-            col.prop(cbk, "use_pass_subsurface")
-            col.prop(cbk, "use_pass_ambient_occlusion")
-            col.prop(cbk, "use_pass_emit")
+            elif cscene.bake_type == 'COMBINED':
+                row = col.row(align=True)
+                row.prop(cbk, "use_pass_direct", toggle=True)
+                row.prop(cbk, "use_pass_indirect", toggle=True)
 
-        elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
-            row = col.row(align=True)
-            row.prop(cbk, "use_pass_direct", toggle=True)
-            row.prop(cbk, "use_pass_indirect", toggle=True)
-            row.prop(cbk, "use_pass_color", toggle=True)
+                split = col.split()
+                split.active = cbk.use_pass_direct or cbk.use_pass_indirect
 
-        layout.separator()
+                col = split.column()
+                col.prop(cbk, "use_pass_diffuse")
+                col.prop(cbk, "use_pass_glossy")
+                col.prop(cbk, "use_pass_transmission")
 
-        split = layout.split()
+                col = split.column()
+                col.prop(cbk, "use_pass_subsurface")
+                col.prop(cbk, "use_pass_ambient_occlusion")
+                col.prop(cbk, "use_pass_emit")
 
-        col = split.column()
-        col.prop(cbk, "margin")
-        col.prop(cbk, "use_clear")
+            elif cscene.bake_type in {'DIFFUSE', 'GLOSSY', 'TRANSMISSION', 'SUBSURFACE'}:
+                row = col.row(align=True)
+                row.prop(cbk, "use_pass_direct", toggle=True)
+                row.prop(cbk, "use_pass_indirect", toggle=True)
+                row.prop(cbk, "use_pass_color", toggle=True)
 
-        col = split.column()
-        col.prop(cbk, "use_selected_to_active")
-        sub = col.column()
-        sub.active = cbk.use_selected_to_active
-        sub.prop(cbk, "use_cage", text="Cage")
-        if cbk.use_cage:
-            sub.prop(cbk, "cage_extrusion", text="Extrusion")
-            sub.prop_search(cbk, "cage_object", scene, "objects", text="")
-        else:
-            sub.prop(cbk, "cage_extrusion", text="Ray Distance")
+            layout.separator()
 
+            split = layout.split()
+
+            col = split.column()
+            col.prop(cbk, "margin")
+            col.prop(cbk, "use_clear")
+
+            col = split.column()
+            col.prop(cbk, "use_selected_to_active")
+            sub = col.column()
+            sub.active = cbk.use_selected_to_active
+            sub.prop(cbk, "use_cage", text="Cage")
+            if cbk.use_cage:
+                sub.prop(cbk, "cage_extrusion", text="Extrusion")
+                sub.prop_search(cbk, "cage_object", scene, "objects", text="")
+            else:
+                sub.prop(cbk, "cage_extrusion", text="Ray Distance")
 
 class CYCLES_RENDER_PT_debug(CyclesButtonsPanel, Panel):
     bl_label = "Debug"
@@ -1727,47 +1583,14 @@ def get_panels():
         'DATA_PT_falloff_curve',
         'DATA_PT_lamp',
         'DATA_PT_preview',
-        'DATA_PT_shadow',
         'DATA_PT_spot',
-        'DATA_PT_sunsky',
         'MATERIAL_PT_context_material',
-        'MATERIAL_PT_diffuse',
-        'MATERIAL_PT_flare',
-        'MATERIAL_PT_halo',
-        'MATERIAL_PT_mirror',
-        'MATERIAL_PT_options',
-        'MATERIAL_PT_pipeline',
         'MATERIAL_PT_preview',
-        'MATERIAL_PT_shading',
-        'MATERIAL_PT_shadow',
-        'MATERIAL_PT_specular',
-        'MATERIAL_PT_sss',
-        'MATERIAL_PT_strand',
-        'MATERIAL_PT_transp',
-        'MATERIAL_PT_volume_density',
-        'MATERIAL_PT_volume_integration',
-        'MATERIAL_PT_volume_lighting',
-        'MATERIAL_PT_volume_options',
-        'MATERIAL_PT_volume_shading',
-        'MATERIAL_PT_volume_transp',
         'VIEWLAYER_PT_layer_options',
         'VIEWLAYER_PT_layer_passes',
         'VIEWLAYER_PT_views',
-        'RENDER_PT_antialiasing',
-        'RENDER_PT_bake',
-        'RENDER_PT_motion_blur',
-        'RENDER_PT_performance',
         'RENDER_PT_post_processing',
-        'RENDER_PT_shading',
         'SCENE_PT_simplify',
-        'TEXTURE_PT_context_texture',
-        'WORLD_PT_ambient_occlusion',
-        'WORLD_PT_environment_lighting',
-        'WORLD_PT_gather',
-        'WORLD_PT_indirect_lighting',
-        'WORLD_PT_mist',
-        'WORLD_PT_preview',
-        'WORLD_PT_world'
         }
 
     panels = []
@@ -1815,11 +1638,6 @@ classes = (
     CYCLES_MATERIAL_PT_displacement,
     CYCLES_MATERIAL_PT_settings,
     CYCLES_MATERIAL_PT_viewport,
-    CYCLES_TEXTURE_PT_context,
-    CYCLES_TEXTURE_PT_node,
-    CYCLES_TEXTURE_PT_mapping,
-    CYCLES_TEXTURE_PT_colors,
-    CYCLES_PARTICLE_PT_textures,
     CYCLES_RENDER_PT_bake,
     CYCLES_RENDER_PT_debug,
     CYCLES_PARTICLE_PT_curve_settings,
index 2af6caa..c2b23f0 100644 (file)
@@ -1538,16 +1538,9 @@ def process(layer_name, lineset_name):
             raise RuntimeError("No Thickness modifier with type", type(m), m)
     # -- Textures -- #
     has_tex = False
-    if scene.render.use_shading_nodes:
-        if linestyle.use_nodes and linestyle.node_tree:
-            shaders_list.append(BlenderTextureShader(linestyle.node_tree))
-            has_tex = True
-    else:
-        if linestyle.use_texture:
-            textures = tuple(BlenderTextureShader(slot) for slot in linestyle.texture_slots if slot is not None)
-            if textures:
-                shaders_list.extend(textures)
-                has_tex = True
+    if linestyle.use_nodes and linestyle.node_tree:
+        shaders_list.append(BlenderTextureShader(linestyle.node_tree))
+        has_tex = True
     if has_tex:
         shaders_list.append(StrokeTextureStepShader(linestyle.texture_spacing))
 
index 24323b1..70334fb 100644 (file)
@@ -364,88 +364,38 @@ class QuickSmoke(Operator):
 
         # Setup material
 
-        # Cycles
-        if context.scene.render.use_shading_nodes or context.render.use_shading_nodes:
-            bpy.ops.object.material_slot_add()
-
-            mat = bpy.data.materials.new("Smoke Domain Material")
-            obj.material_slots[0].material = mat
-
-            # Make sure we use nodes
-            mat.use_nodes = True
-
-            # Set node variables and clear the default nodes
-            tree = mat.node_tree
-            nodes = tree.nodes
-            links = tree.links
-
-            nodes.clear()
+        # Cycles and Eevee
+        bpy.ops.object.material_slot_add()
 
-            # Create shader nodes
+        mat = bpy.data.materials.new("Smoke Domain Material")
+        obj.material_slots[0].material = mat
 
-            # Material output
-            node_out = nodes.new(type='ShaderNodeOutputMaterial')
-            node_out.location = grid_location(6, 1)
+        # Make sure we use nodes
+        mat.use_nodes = True
 
-            # Add Principled Volume
-            node_principled = nodes.new(type='ShaderNodeVolumePrincipled')
-            node_principled.location = grid_location(4, 1)
-            links.new(node_principled.outputs["Volume"],
-                    node_out.inputs["Volume"])
+        # Set node variables and clear the default nodes
+        tree = mat.node_tree
+        nodes = tree.nodes
+        links = tree.links
 
-            node_principled.inputs["Density"].default_value = 5.0
+        nodes.clear()
 
-            if self.style in {'FIRE', 'BOTH'}:
-                node_principled.inputs["Blackbody Intensity"].default_value = 1.0
+        # Create shader nodes
 
-        # Blender Internal
-        else:
-            # create a volume material with a voxel data texture for the domain
-            bpy.ops.object.material_slot_add()
-
-            mat = bpy.data.materials.new("Smoke Domain Material")
-            obj.material_slots[0].material = mat
-            mat.type = 'VOLUME'
-            mat.volume.density = 0
-            mat.volume.density_scale = 5
-            mat.volume.step_size = 0.1
-
-            tex = bpy.data.textures.new("Smoke Density", 'VOXEL_DATA')
-            tex.voxel_data.domain_object = obj
-            tex.voxel_data.interpolation = 'TRICUBIC_BSPLINE'
-
-            tex_slot = mat.texture_slots.add()
-            tex_slot.texture = tex
-            tex_slot.texture_coords = 'ORCO'
-            tex_slot.use_map_color_emission = False
-            tex_slot.use_map_density = True
-            tex_slot.use_map_color_reflection = True
-
-            # for fire add a second texture for flame emission
-            mat.volume.emission_color = Vector((0.0, 0.0, 0.0))
-            tex = bpy.data.textures.new("Flame", 'VOXEL_DATA')
-            tex.voxel_data.domain_object = obj
-            tex.voxel_data.smoke_data_type = 'SMOKEFLAME'
-            tex.voxel_data.interpolation = 'TRICUBIC_BSPLINE'
-            tex.use_color_ramp = True
+        # Material output
+        node_out = nodes.new(type='ShaderNodeOutputMaterial')
+        node_out.location = grid_location(6, 1)
 
-            tex_slot = mat.texture_slots.add()
-            tex_slot.texture = tex
-            tex_slot.texture_coords = 'ORCO'
+        # Add Principled Volume
+        node_principled = nodes.new(type='ShaderNodeVolumePrincipled')
+        node_principled.location = grid_location(4, 1)
+        links.new(node_principled.outputs["Volume"],
+                node_out.inputs["Volume"])
 
-            # add color ramp for flame color
-            ramp = tex.color_ramp
-            # dark orange
-            elem = ramp.elements.new(0.333)
-            elem.color = (0.2, 0.03, 0.0, 1.0)
+        node_principled.inputs["Density"].default_value = 5.0
 
-            # yellow glow
-            elem = ramp.elements.new(0.666)
-            elem.color = (1, 0.65, 0.25, 1.0)
-
-            mat.texture_slots[1].use_map_density = True
-            mat.texture_slots[1].use_map_emission = True
-            mat.texture_slots[1].emission_factor = 5
+        if self.style in {'FIRE', 'BOTH'}:
+            node_principled.inputs["Blackbody Intensity"].default_value = 1.0
 
         return {'FINISHED'}
 
@@ -547,13 +497,33 @@ class QuickFluid(Operator):
         mat = bpy.data.materials.new("Fluid Domain Material")
         obj.material_slots[0].material = mat
 
-        mat.specular_intensity = 1
-        mat.specular_hardness = 100
-        mat.use_transparency = True
-        mat.alpha = 0.0
-        mat.transparency_method = 'RAYTRACE'
-        mat.raytrace_transparency.ior = 1.33
-        mat.raytrace_transparency.depth = 4
+        # Make sure we use nodes
+        mat.use_nodes = True
+
+        # Set node variables and clear the default nodes
+        tree = mat.node_tree
+        nodes = tree.nodes
+        links = tree.links
+
+        nodes.clear()
+
+        # Create shader nodes
+
+        # Material output
+        node_out = nodes.new(type='ShaderNodeOutputMaterial')
+        node_out.location = grid_location(6, 1)
+
+        # Add Glass
+        node_glass = nodes.new(type='ShaderNodeBsdfGlass')
+        node_glass.location = grid_location(4, 1)
+        links.new(node_glass.outputs["BSDF"], node_out.inputs["Surface"])
+        node_glass.inputs["IOR"].default_value = 1.33
+
+        # Add Absorption
+        node_absorption = nodes.new(type='ShaderNodeVolumeAbsorption')
+        node_absorption.location = grid_location(4, 2)
+        links.new(node_absorption.outputs["Volume"], node_out.inputs["Volume"])
+        node_absorption.inputs["Color"].default_value = (0.8, 0.9, 1.0, 1.0)
 
         if self.start_baking:
             bpy.ops.fluid.bake('INVOKE_DEFAULT')
index c696c38..b06d054 100644 (file)
@@ -318,34 +318,6 @@ class AddPresetSafeAreas(AddPresetBase, Operator):
     preset_subdir = "safe_areas"
 
 
-class AddPresetSSS(AddPresetBase, Operator):
-    """Add or remove a Subsurface Scattering Preset"""
-    bl_idname = "material.sss_preset_add"
-    bl_label = "Add SSS Preset"
-    preset_menu = "MATERIAL_MT_sss_presets"
-
-    preset_defines = [
-        ("material = "
-         "bpy.context.material.active_node_material "
-         "if bpy.context.material.active_node_material "
-         "else bpy.context.material")
-    ]
-
-    preset_values = [
-        "material.subsurface_scattering.back",
-        "material.subsurface_scattering.color",
-        "material.subsurface_scattering.color_factor",
-        "material.subsurface_scattering.error_threshold",
-        "material.subsurface_scattering.front",
-        "material.subsurface_scattering.ior",
-        "material.subsurface_scattering.radius",
-        "material.subsurface_scattering.scale",
-        "material.subsurface_scattering.texture_factor",
-    ]
-
-    preset_subdir = "sss"
-
-
 class AddPresetCloth(AddPresetBase, Operator):
     """Add or remove a Cloth Preset"""
     bl_idname = "cloth.preset_add"
@@ -695,7 +667,6 @@ classes = (
     AddPresetNodeColor,
     AddPresetOperator,
     AddPresetRender,
-    AddPresetSSS,
     AddPresetSafeAreas,
     AddPresetSunSky,
     AddPresetTrackingCamera,
index f3daf64..892ca26 100644 (file)
@@ -55,16 +55,11 @@ class DATA_PT_context_lamp(DataButtonsPanel, Panel):
 
         split = layout.split(percentage=0.65)
 
-        texture_count = len(lamp.texture_slots.keys())
-
         if ob:
             split.template_ID(ob, "data")
         elif lamp:
             split.template_ID(space, "pin_id")
 
-        if texture_count != 0:
-            split.label(text=str(texture_count), icon='TEXTURE')
-
 
 class DATA_PT_preview(DataButtonsPanel, Panel):
     bl_label = "Preview"
@@ -111,17 +106,11 @@ class DATA_PT_lamp(DataButtonsPanel, Panel):
                 sub.prop(lamp, "linear_coefficient", text="Linear")
                 sub.prop(lamp, "quadratic_coefficient", text="Quadratic")
 
-            col.prop(lamp, "use_sphere")
-
         if lamp.type == 'AREA':
             col.prop(lamp, "distance")
-            col.prop(lamp, "gamma")
 
         col = split.column()
-        col.prop(lamp, "use_negative")
-        col.prop(lamp, "use_own_layer", text="This Layer Only")
-        col.prop(lamp, "use_specular")
-        col.prop(lamp, "use_diffuse")
+        col.label()
 
 
 class DATA_PT_EEVEE_lamp(DataButtonsPanel, Panel):
@@ -154,202 +143,7 @@ class DATA_PT_EEVEE_lamp(DataButtonsPanel, Panel):
                 sub.prop(lamp, "size_y", text="Size Y")
 
         col = split.column()
-        col.prop(lamp, "use_specular")
-        col.prop(lamp, "use_diffuse")
-        col.separator()
-
-        if lamp.type in {'POINT', 'SPOT', 'AREA'}:
-            col.prop(lamp, "use_sphere")
-            col = col.column()
-            col.active = lamp.use_sphere
-            col.prop(lamp, "distance")
-
-
-class DATA_PT_sunsky(DataButtonsPanel, Panel):
-    bl_label = "Sky & Atmosphere"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        lamp = context.lamp
-        engine = context.engine
-        return (lamp and lamp.type == 'SUN') and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        lamp = context.lamp.sky
-
-        row = layout.row(align=True)
-        row.prop(lamp, "use_sky")
-        row.menu("LAMP_MT_sunsky_presets", text=bpy.types.LAMP_MT_sunsky_presets.bl_label)
-        row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMIN')
-        row.operator("lamp.sunsky_preset_add", text="", icon='ZOOMOUT').remove_active = True
-
-        row = layout.row()
-        row.active = lamp.use_sky or lamp.use_atmosphere
-        row.prop(lamp, "atmosphere_turbidity", text="Turbidity")
-
-        split = layout.split()
-
-        col = split.column()
-        col.active = lamp.use_sky
-        col.label(text="Blending:")
-        sub = col.column()
-        sub.prop(lamp, "sky_blend_type", text="")
-        sub.prop(lamp, "sky_blend", text="Factor")
-
-        col.label(text="Color Space:")
-        sub = col.column()
-        sub.row().prop(lamp, "sky_color_space", expand=True)
-        sub.prop(lamp, "sky_exposure", text="Exposure")
-
-        col = split.column()
-        col.active = lamp.use_sky
-        col.label(text="Horizon:")
-        sub = col.column()
-        sub.prop(lamp, "horizon_brightness", text="Brightness")
-        sub.prop(lamp, "spread", text="Spread")
-
-        col.label(text="Sun:")
-        sub = col.column()
-        sub.prop(lamp, "sun_brightness", text="Brightness")
-        sub.prop(lamp, "sun_size", text="Size")
-        sub.prop(lamp, "backscattered_light", slider=True, text="Back Light")
-
-        layout.separator()
-
-        layout.prop(lamp, "use_atmosphere")
-
-        split = layout.split()
-
-        col = split.column()
-        col.active = lamp.use_atmosphere
-        col.label(text="Intensity:")
-        col.prop(lamp, "sun_intensity", text="Sun")
-        col.prop(lamp, "atmosphere_distance_factor", text="Distance")
-
-        col = split.column()
-        col.active = lamp.use_atmosphere
-        col.label(text="Scattering:")
-        sub = col.column(align=True)
-        sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
-        sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
-
-
-class DATA_PT_shadow(DataButtonsPanel, Panel):
-    bl_label = "Shadow"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        lamp = context.lamp
-        engine = context.engine
-        return (lamp and lamp.type in {'POINT', 'SUN', 'SPOT', 'AREA'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        lamp = context.lamp
-
-        layout.row().prop(lamp, "shadow_method", expand=True)
-
-        if lamp.shadow_method == 'NOSHADOW' and lamp.type == 'AREA':
-            split = layout.split()
-
-            col = split.column()
-            col.label(text="Form Factor Sampling:")
-
-            sub = col.row(align=True)
-
-            if lamp.shape == 'SQUARE':
-                sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
-            elif lamp.shape == 'RECTANGLE':
-                sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
-                sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
-
-        if lamp.shadow_method != 'NOSHADOW':
-            split = layout.split()
-
-            col = split.column()
-            col.prop(lamp, "shadow_color", text="")
-
-            col = split.column()
-            col.prop(lamp, "use_shadow_layer", text="This Layer Only")
-            col.prop(lamp, "use_only_shadow")
-
-        if lamp.shadow_method == 'RAY_SHADOW':
-            split = layout.split()
-
-            col = split.column()
-            col.label(text="Sampling:")
-
-            if lamp.type in {'POINT', 'SUN', 'SPOT'}:
-                sub = col.row()
-
-                sub.prop(lamp, "shadow_ray_samples", text="Samples")
-                sub.prop(lamp, "shadow_soft_size", text="Soft Size")
-
-            elif lamp.type == 'AREA':
-                sub = col.row(align=True)
-
-                if lamp.shape == 'SQUARE':
-                    sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
-                elif lamp.shape == 'RECTANGLE':
-                    sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
-                    sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
-
-            col.row().prop(lamp, "shadow_ray_sample_method", expand=True)
-
-            if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC':
-                layout.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
-
-            if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED':
-                row = layout.row()
-                row.prop(lamp, "use_umbra")
-                row.prop(lamp, "use_dither")
-                row.prop(lamp, "use_jitter")
-
-        elif lamp.shadow_method == 'BUFFER_SHADOW':
-            col = layout.column()
-            col.label(text="Buffer Type:")
-            col.row().prop(lamp, "shadow_buffer_type", expand=True)
-
-            if lamp.shadow_buffer_type in {'REGULAR', 'HALFWAY', 'DEEP'}:
-                split = layout.split()
-
-                col = split.column()
-                col.label(text="Filter Type:")
-                col.prop(lamp, "shadow_filter_type", text="")
-                sub = col.column(align=True)
-                sub.prop(lamp, "shadow_buffer_soft", text="Soft")
-                sub.prop(lamp, "shadow_buffer_bias", text="Bias")
-
-                col = split.column()
-                col.label(text="Sample Buffers:")
-                col.prop(lamp, "shadow_sample_buffers", text="")
-                sub = col.column(align=True)
-                sub.prop(lamp, "shadow_buffer_size", text="Size")
-                sub.prop(lamp, "shadow_buffer_samples", text="Samples")
-                if lamp.shadow_buffer_type == 'DEEP':
-                    col.prop(lamp, "compression_threshold")
-
-            elif lamp.shadow_buffer_type == 'IRREGULAR':
-                layout.prop(lamp, "shadow_buffer_bias", text="Bias")
-
-            split = layout.split()
-
-            col = split.column()
-            col.prop(lamp, "use_auto_clip_start", text="Autoclip Start")
-            sub = col.column()
-            sub.active = not lamp.use_auto_clip_start
-            sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
-
-            col = split.column()
-            col.prop(lamp, "use_auto_clip_end", text="Autoclip End")
-            sub = col.column()
-            sub.active = not lamp.use_auto_clip_end
-            sub.prop(lamp, "shadow_buffer_clip_end", text="Clip End")
+        col.label()
 
 
 class DATA_PT_EEVEE_shadow(DataButtonsPanel, Panel):
@@ -531,8 +325,6 @@ classes = (
     DATA_PT_preview,
     DATA_PT_lamp,
     DATA_PT_EEVEE_lamp,
-    DATA_PT_sunsky,
-    DATA_PT_shadow,
     DATA_PT_EEVEE_shadow,
     DATA_PT_area,
     DATA_PT_spot,
index 3069041..a9a47d2 100644 (file)
@@ -241,7 +241,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
 
 class DATA_PT_face_maps(MeshButtonsPanel, Panel):
     bl_label = "Face Maps"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
index bf85299..28e3995 100644 (file)
@@ -1014,17 +1014,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def UV_PROJECT(self, layout, ob, md):
         split = layout.split()
-
-        col = split.column()
-        col.label(text="Image:")
-        col.prop(md, "image", text="")
-
         col = split.column()
-        col.label(text="UV Map:")
-        col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
+        col.prop_search(md, "uv_layer", ob.data, "uv_layers")
+        col.separator()
 
-        split = layout.split()
-        col = split.column()
         col.prop(md, "projector_count", text="Projectors")
         for proj in md.projectors:
             col.prop(proj, "object", text="")
index b199212..84ebb21 100644 (file)
@@ -39,7 +39,7 @@ class RenderFreestyleButtonsPanel:
 class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
     bl_label = "Freestyle"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         rd = context.scene.render
@@ -111,7 +111,7 @@ class RENDER_MT_lineset_specials(Menu):
 
 class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
     bl_label = "Freestyle"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -167,7 +167,7 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
 
 class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel):
     bl_label = "Freestyle Line Set"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_edge_type_buttons(self, box, lineset, edge_type):
         # property names
@@ -261,7 +261,7 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel
 class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Panel):
     bl_label = "Freestyle Line Style"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_modifier_box_header(self, box, modifier):
         row = box.row()
@@ -781,10 +781,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan
             layout.separator()
 
             row = layout.row()
-            if scene.render.use_shading_nodes:
-                row.prop(linestyle, "use_nodes")
-            else:
-                row.prop(linestyle, "use_texture")
+            row.prop(linestyle, "use_nodes")
             row.prop(linestyle, "texture_spacing", text="Spacing Along Stroke")
 
             row = layout.row()
@@ -818,7 +815,7 @@ class MaterialFreestyleButtonsPanel:
 class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
     bl_label = "Freestyle Line"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
index 233a1c4..13c783a 100644 (file)
@@ -23,42 +23,6 @@ from rna_prop_ui import PropertyPanel
 from bpy.app.translations import pgettext_iface as iface_
 from bpy_extras.node_utils import find_node_input, find_output_node
 
-def active_node_mat(mat):
-    # TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
-    # which settings from node-materials are used
-    if mat is not None:
-        mat_node = mat.active_node_material
-        if mat_node:
-            return mat_node
-        else:
-            return mat
-
-    return None
-
-
-def check_material(mat):
-    if mat is not None:
-        if mat.use_nodes:
-            if mat.active_node_material is not None:
-                return True
-            return False
-        return True
-    return False
-
-
-def simple_material(mat):
-    if (mat is not None) and (not mat.use_nodes):
-        return True
-    return False
-
-
-class MATERIAL_MT_sss_presets(Menu):
-    bl_label = "SSS Presets"
-    preset_subdir = "sss"
-    preset_operator = "script.execute_preset"
-    draw = Menu.draw_preset
-
-
 class MATERIAL_MT_specials(Menu):
     bl_label = "Material Specials"
 
@@ -82,12 +46,6 @@ class MATERIAL_UL_matslots(UIList):
                 layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
             else:
                 layout.label(text="", icon_value=icon)
-            if ma and not context.scene.render.use_shading_nodes:
-                manode = ma.active_node_material
-                if manode:
-                    layout.label(text=iface_("Node %s") % manode.name, translate=False, icon_value=layout.icon(manode))
-                elif ma.use_nodes:
-                    layout.label(text="Node <none>")
         elif self.layout_type == 'GRID':
             layout.alignment = 'CENTER'
             layout.label(text="", icon_value=icon)
@@ -104,859 +62,16 @@ class MaterialButtonsPanel:
         return context.material and (context.engine in cls.COMPAT_ENGINES)
 
 
-class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
-    bl_label = ""
-    bl_options = {'HIDE_HEADER'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        # An exception, don't call the parent poll func because
-        # this manages materials for all engine types
-
-        engine = context.engine
-        return (context.material or context.object) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = context.material
-        ob = context.object
-        slot = context.material_slot
-        space = context.space_data
-
-        if ob:
-            is_sortable = (len(ob.material_slots) > 1)
-
-            rows = 1
-            if is_sortable:
-                rows = 4
-
-            row = layout.row()
-
-            row.template_list("MATERIAL_UL_matslots", "", ob, "material_slots", ob, "active_material_index", rows=rows)
-
-            col = row.column(align=True)
-            col.operator("object.material_slot_add", icon='ZOOMIN', text="")
-            col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
-
-            col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
-
-            if is_sortable:
-                col.separator()
-
-                col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
-                col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
-
-            if ob.mode == 'EDIT':
-                row = layout.row(align=True)
-                row.operator("object.material_slot_assign", text="Assign")
-                row.operator("object.material_slot_select", text="Select")
-                row.operator("object.material_slot_deselect", text="Deselect")
-
-        split = layout.split(percentage=0.65)
-
-        if ob:
-            split.template_ID(ob, "active_material", new="material.new")
-            row = split.row()
-            if mat:
-                row.prop(mat, "use_nodes", icon='NODETREE', text="")
-
-            if slot:
-                row.prop(slot, "link", text="")
-            else:
-                row.label()
-        elif mat:
-            split.template_ID(space, "pin_id")
-            split.separator()
-
-        if mat:
-            layout.row().prop(mat, "type", expand=True)
-            if mat.use_nodes:
-                row = layout.row()
-                row.label(text="", icon='NODETREE')
-                if mat.active_node_material:
-                    row.prop(mat.active_node_material, "name", text="")
-                else:
-                    row.label(text="No material node selected")
-
-
 class MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
     bl_label = "Preview"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+    COMPAT_ENGINES = {'BLENDER_EEVEE'}
 
     def draw(self, context):
         self.layout.template_preview(context.material)
 
 
-class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel):
-    bl_label = "Render Pipeline Options"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and (not simple_material(mat)) and (mat.type in {'SURFACE', 'WIRE', 'VOLUME'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self. layout
-
-        mat = context.material
-        mat_type = mat.type in {'SURFACE', 'WIRE'}
-
-        row = layout.row()
-        row.active = mat_type
-        row.prop(mat, "use_transparency")
-        sub = row.column()
-        sub.prop(mat, "offset_z")
-
-        sub.active = mat_type and mat.use_transparency and mat.transparency_method == 'Z_TRANSPARENCY'
-
-        row = layout.row()
-        row.active = mat.use_transparency or not mat_type
-        row.prop(mat, "transparency_method", expand=True)
-
-        layout.separator()
-
-        split = layout.split()
-        col = split.column()
-
-        col.prop(mat, "use_raytrace")
-        col.prop(mat, "use_full_oversampling")
-        sub = col.column()
-        sub.active = mat_type
-        sub.prop(mat, "use_sky")
-        sub.prop(mat, "invert_z")
-        col.prop(mat, "pass_index")
-
-        col = split.column()
-        col.active = mat_type
-
-        col.prop(mat, "use_cast_shadows", text="Cast")
-        col.prop(mat, "use_cast_shadows_only", text="Cast Only")
-        col.prop(mat, "use_cast_buffer_shadows")
-        sub = col.column()
-        sub.active = mat.use_cast_buffer_shadows
-        sub.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
-        col.prop(mat, "use_cast_approximate")
-
-
-class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel):
-    bl_label = "Diffuse"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(mat, "diffuse_color", text="")
-        sub = col.column()
-        sub.active = (not mat.use_shadeless)
-        sub.prop(mat, "diffuse_intensity", text="Intensity")
-
-        col = split.column()
-        col.active = (not mat.use_shadeless)
-        col.prop(mat, "diffuse_shader", text="")
-        col.prop(mat, "use_diffuse_ramp", text="Ramp")
-
-        col = layout.column()
-        col.active = (not mat.use_shadeless)
-        if mat.diffuse_shader == 'OREN_NAYAR':
-            col.prop(mat, "roughness")
-        elif mat.diffuse_shader == 'MINNAERT':
-            col.prop(mat, "darkness")
-        elif mat.diffuse_shader == 'TOON':
-            row = col.row()
-            row.prop(mat, "diffuse_toon_size", text="Size")
-            row.prop(mat, "diffuse_toon_smooth", text="Smooth")
-        elif mat.diffuse_shader == 'FRESNEL':
-            row = col.row()
-            row.prop(mat, "diffuse_fresnel", text="Fresnel")
-            row.prop(mat, "diffuse_fresnel_factor", text="Factor")
-
-        if mat.use_diffuse_ramp:
-            col = layout.column()
-            col.active = (not mat.use_shadeless)
-            col.separator()
-            col.template_color_ramp(mat, "diffuse_ramp", expand=True)
-            col.separator()
-
-            row = col.row()
-            row.prop(mat, "diffuse_ramp_input", text="Input")
-            row.prop(mat, "diffuse_ramp_blend", text="Blend")
-
-            col.prop(mat, "diffuse_ramp_factor", text="Factor")
-
-
-class MATERIAL_PT_specular(MaterialButtonsPanel, Panel):
-    bl_label = "Specular"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-
-        layout.active = (not mat.use_shadeless)
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(mat, "specular_color", text="")
-        col.prop(mat, "specular_intensity", text="Intensity")
-
-        col = split.column()
-        col.prop(mat, "specular_shader", text="")
-        col.prop(mat, "use_specular_ramp", text="Ramp")
-
-        col = layout.column()
-        if mat.specular_shader in {'COOKTORR', 'PHONG'}:
-            col.prop(mat, "specular_hardness", text="Hardness")
-        elif mat.specular_shader == 'BLINN':
-            row = col.row()
-            row.prop(mat, "specular_hardness", text="Hardness")
-            row.prop(mat, "specular_ior", text="IOR")
-        elif mat.specular_shader == 'WARDISO':
-            col.prop(mat, "specular_slope", text="Slope")
-        elif mat.specular_shader == 'TOON':
-            row = col.row()
-            row.prop(mat, "specular_toon_size", text="Size")
-            row.prop(mat, "specular_toon_smooth", text="Smooth")
-
-        if mat.use_specular_ramp:
-            layout.separator()
-            layout.template_color_ramp(mat, "specular_ramp", expand=True)
-            layout.separator()
-
-            row = layout.row()
-            row.prop(mat, "specular_ramp_input", text="Input")
-            row.prop(mat, "specular_ramp_blend", text="Blend")
-
-            layout.prop(mat, "specular_ramp_factor", text="Factor")
-
-
-class MATERIAL_PT_shading(MaterialButtonsPanel, Panel):
-    bl_label = "Shading"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-
-        if mat.type in {'SURFACE', 'WIRE'}:
-            split = layout.split()
-
-            col = split.column()
-            sub = col.column()
-            sub.active = not mat.use_shadeless
-            sub.prop(mat, "emit")
-            sub.prop(mat, "ambient")
-            sub = col.column()
-            sub.prop(mat, "translucency")
-
-            col = split.column()
-            col.prop(mat, "use_shadeless")
-            sub = col.column()
-            sub.active = not mat.use_shadeless
-            sub.prop(mat, "use_tangent_shading")
-            sub.prop(mat, "use_cubic")
-
-
-class MATERIAL_PT_transp(MaterialButtonsPanel, Panel):
-    bl_label = "Transparency"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        mat = context.material
-
-        if simple_material(mat):
-            self.layout.prop(mat, "use_transparency", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        base_mat = context.material
-        mat = active_node_mat(context.material)
-        rayt = mat.raytrace_transparency
-
-        if simple_material(base_mat):
-            row = layout.row()
-            row.active = mat.use_transparency
-            row.prop(mat, "transparency_method", expand=True)
-
-        split = layout.split()
-        split.active = base_mat.use_transparency
-
-        col = split.column()
-        col.prop(mat, "alpha")
-        row = col.row()
-        row.active = (base_mat.transparency_method != 'MASK') and (not mat.use_shadeless)
-        row.prop(mat, "specular_alpha", text="Specular")
-
-        col = split.column()
-        col.active = (not mat.use_shadeless)
-        col.prop(rayt, "fresnel")
-        sub = col.column()
-        sub.active = (rayt.fresnel > 0.0)
-        sub.prop(rayt, "fresnel_factor", text="Blend")
-
-        if base_mat.transparency_method == 'RAYTRACE':
-            layout.separator()
-            split = layout.split()
-            split.active = base_mat.use_transparency
-
-            col = split.column()
-            col.prop(rayt, "ior")
-            col.prop(rayt, "filter")
-            col.prop(rayt, "falloff")
-            col.prop(rayt, "depth_max")
-            col.prop(rayt, "depth")
-
-            col = split.column()
-            col.label(text="Gloss:")
-            col.prop(rayt, "gloss_factor", text="Amount")
-            sub = col.column()
-            sub.active = rayt.gloss_factor < 1.0
-            sub.prop(rayt, "gloss_threshold", text="Threshold")
-            sub.prop(rayt, "gloss_samples", text="Samples")
-
-
-class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel):
-    bl_label = "Mirror"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        raym = active_node_mat(context.material).raytrace_mirror
-
-        self.layout.prop(raym, "use", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-        raym = mat.raytrace_mirror
-
-        layout.active = raym.use
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(raym, "reflect_factor")
-        col.prop(mat, "mirror_color", text="")
-
-        col = split.column()
-        col.prop(raym, "fresnel")
-        sub = col.column()
-        sub.active = (raym.fresnel > 0.0)
-        sub.prop(raym, "fresnel_factor", text="Blend")
-
-        split = layout.split()
-
-        col = split.column()
-        col.separator()
-        col.prop(raym, "depth")
-        col.prop(raym, "distance", text="Max Dist")
-        col.separator()
-        sub = col.split(percentage=0.4)
-        sub.active = (raym.distance > 0.0)
-        sub.label(text="Fade To:")
-        sub.prop(raym, "fade_to", text="")
-
-        col = split.column()
-        col.label(text="Gloss:")
-        col.prop(raym, "gloss_factor", text="Amount")
-        sub = col.column()
-        sub.active = (raym.gloss_factor < 1.0)
-        sub.prop(raym, "gloss_threshold", text="Threshold")
-        sub.prop(raym, "gloss_samples", text="Samples")
-        sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
-
-
-class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
-    bl_label = "Subsurface Scattering"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        mat = active_node_mat(context.material)
-        sss = mat.subsurface_scattering
-
-        self.layout.active = (not mat.use_shadeless)
-        self.layout.prop(sss, "use", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-        sss = mat.subsurface_scattering
-
-        layout.active = (sss.use) and (not mat.use_shadeless)
-
-        row = layout.row().split()
-        sub = row.row(align=True).split(align=True, percentage=0.75)
-        sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
-        sub.operator("material.sss_preset_add", text="", icon='ZOOMIN')
-        sub.operator("material.sss_preset_add", text="", icon='ZOOMOUT').remove_active = True
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(sss, "ior")
-        col.prop(sss, "scale")
-        col.prop(sss, "color", text="")
-        col.prop(sss, "radius", text="RGB Radius", expand=True)
-
-        col = split.column()
-        sub = col.column(align=True)
-        sub.label(text="Blend:")
-        sub.prop(sss, "color_factor", text="Color")
-        sub.prop(sss, "texture_factor", text="Texture")
-        sub.label(text="Scattering Weight:")
-        sub.prop(sss, "front")
-        sub.prop(sss, "back")
-        col.separator()
-        col.prop(sss, "error_threshold", text="Error")
-
-
-class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
-    bl_label = "Halo"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = context.material  # don't use node material
-        halo = mat.halo
-
-        def number_but(layout, toggle, number, name, color):
-            row = layout.row(align=True)
-            row.prop(halo, toggle, text="")
-            sub = row.column(align=True)
-            sub.active = getattr(halo, toggle)
-            sub.prop(halo, number, text=name, translate=False)
-            if not color == "":
-                sub.prop(mat, color, text="")
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(mat, "alpha")
-        col.prop(mat, "diffuse_color", text="")
-        col.prop(halo, "seed")
-
-        col = split.column()
-        col.prop(halo, "size")
-        col.prop(halo, "hardness")
-        col.prop(halo, "add")
-
-        layout.label(text="Options:")
-
-        split = layout.split()
-        col = split.column()
-        col.prop(halo, "use_texture")
-        col.prop(halo, "use_vertex_normal")
-        col.prop(halo, "use_extreme_alpha")
-        col.prop(halo, "use_shaded")
-        col.prop(halo, "use_soft")
-
-        col = split.column()
-        number_but(col, "use_ring", "ring_count", iface_("Rings"), "mirror_color")
-        number_but(col, "use_lines", "line_count", iface_("Lines"), "specular_color")
-        number_but(col, "use_star", "star_tip_count", iface_("Star Tips"), "")
-
-
-class MATERIAL_PT_flare(MaterialButtonsPanel, Panel):
-    bl_label = "Flare"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        halo = context.material.halo
-
-        self.layout.prop(halo, "use_flare_mode", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = context.material  # don't use node material
-        halo = mat.halo
-
-        layout.active = halo.use_flare_mode
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(halo, "flare_size", text="Size")
-        col.prop(halo, "flare_boost", text="Boost")
-        col.prop(halo, "flare_seed", text="Seed")
-
-        col = split.column()
-        col.prop(halo, "flare_subflare_count", text="Subflares")
-        col.prop(halo, "flare_subflare_size", text="Subsize")
-
-
-class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
-    bl_label = "Strand"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and (mat.type in {'SURFACE', 'WIRE', 'HALO'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = context.material  # don't use node material
-        tan = mat.strand
-
-        split = layout.split()
-
-        col = split.column()
-        sub = col.column(align=True)
-        sub.label(text="Size:")
-        sub.prop(tan, "root_size", text="Root")
-        sub.prop(tan, "tip_size", text="Tip")
-        sub.prop(tan, "size_min", text="Minimum")
-        sub.prop(tan, "use_blender_units")
-        sub = col.column()
-        sub.active = (not mat.use_shadeless)
-        sub.prop(tan, "use_tangent_shading")
-        col.prop(tan, "shape")
-
-        col = split.column()
-        col.label(text="Shading:")
-        col.prop(tan, "width_fade")
-        ob = context.object
-        if ob and ob.type == 'MESH':
-            col.prop_search(tan, "uv_layer", ob.data, "uv_layers", text="")
-        else:
-            col.prop(tan, "uv_layer", text="")
-        col.separator()
-        sub = col.column()
-        sub.active = (not mat.use_shadeless)
-        sub.label("Surface diffuse:")
-        sub = col.column()
-        sub.prop(tan, "blend_distance", text="Distance")
-
-
-class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
-    bl_label = "Options"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        base_mat = context.material
-        mat = active_node_mat(base_mat)
-
-        split = layout.split()
-
-        col = split.column()
-        if simple_material(base_mat):
-            col.prop(mat, "use_raytrace")
-            col.prop(mat, "use_full_oversampling")
-            col.prop(mat, "use_sky")
-        col.prop(mat, "use_mist")
-        if simple_material(base_mat):
-            col.prop(mat, "invert_z")
-            sub = col.row()
-            sub.prop(mat, "offset_z")
-            sub.active = mat.use_transparency and mat.transparency_method == 'Z_TRANSPARENCY'
-        sub = col.column(align=True)
-        sub.label(text="Light Group:")
-        sub.prop(mat, "light_group", text="")
-        row = sub.row(align=True)
-        row.active = bool(mat.light_group)
-        row.prop(mat, "use_light_group_exclusive", text="Exclusive")
-        row.prop(mat, "use_light_group_local", text="Local")
-
-        col = split.column()
-        col.prop(mat, "use_vertex_color_paint")
-        col.prop(mat, "use_vertex_color_light")
-        col.prop(mat, "use_object_color")
-        col.prop(mat, "use_uv_project")
-        if simple_material(base_mat):
-            col.prop(mat, "pass_index")
-
-        col.label("Edit Image")
-        col.template_ID(mat, "edit_image")
-
-
-class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel):
-    bl_label = "Shadow"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        base_mat = context.material
-        mat = active_node_mat(base_mat)
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(mat, "use_shadows", text="Receive")
-        col.prop(mat, "use_transparent_shadows", text="Receive Transparent")
-        col.prop(mat, "use_only_shadow", text="Shadows Only")
-        sub = col.column()
-        sub.active = mat.use_only_shadow
-        sub.prop(mat, "shadow_only_type", text="")
-
-        if not simple_material(base_mat):
-            col = split.column()
-
-        col.prop(mat, "use_ray_shadow_bias", text="Auto Ray Bias")
-        sub = col.column()
-        sub.active = (not mat.use_ray_shadow_bias)
-        sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
-
-        if simple_material(base_mat):
-            col = split.column()
-
-            col.prop(mat, "use_cast_shadows", text="Cast")
-            col.prop(mat, "use_cast_shadows_only", text="Cast Only")
-            col.prop(mat, "use_cast_buffer_shadows")
-        sub = col.column()
-        sub.active = mat.use_cast_buffer_shadows
-        if simple_material(base_mat):
-            sub.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
-        sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias")
-        if simple_material(base_mat):
-            col.prop(mat, "use_cast_approximate")
-
-
-class VolumeButtonsPanel:
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "material"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES)
-
-
-class MATERIAL_PT_volume_density(VolumeButtonsPanel, Panel):
-    bl_label = "Density"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        vol = context.material.volume  # don't use node material
-
-        row = layout.row()
-        row.prop(vol, "density")
-        row.prop(vol, "density_scale")
-
-
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel, Panel):
-    bl_label = "Shading"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        vol = context.material.volume  # don't use node material
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(vol, "scattering")
-        col.prop(vol, "asymmetry")
-        col.prop(vol, "transmission_color")
-
-        col = split.column()
-        sub = col.column(align=True)
-        sub.prop(vol, "emission")
-        sub.prop(vol, "emission_color", text="")
-        sub = col.column(align=True)
-        sub.prop(vol, "reflection")
-        sub.prop(vol, "reflection_color", text="")
-
-
-class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, Panel):
-    bl_label = "Lighting"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        vol = context.material.volume  # don't use node material
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(vol, "light_method", text="")
-
-        col = split.column()
-
-        if vol.light_method == 'SHADED':
-            col.prop(vol, "use_external_shadows")
-            col.prop(vol, "use_light_cache")
-            sub = col.column()
-            sub.active = vol.use_light_cache
-            sub.prop(vol, "cache_resolution")
-        elif vol.light_method in {'MULTIPLE_SCATTERING', 'SHADED_PLUS_MULTIPLE_SCATTERING'}:
-            sub = col.column()
-            sub.enabled = True
-            sub.active = False
-            sub.label("Light Cache Enabled")
-            col.prop(vol, "cache_resolution")
-
-            sub = col.column(align=True)
-            sub.prop(vol, "ms_diffusion")
-            sub.prop(vol, "ms_spread")
-            sub.prop(vol, "ms_intensity")
-
-
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel):
-    bl_label = "Transparency"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return mat and simple_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = context.material  # don't use node material
-
-        layout.row().prop(mat, "transparency_method", expand=True)
-
-
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel):
-    bl_label = "Integration"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        vol = context.material.volume  # don't use node material
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Step Calculation:")
-        col.prop(vol, "step_method", text="")
-        col = col.column(align=True)
-        col.prop(vol, "step_size")
-
-        col = split.column()
-        col.label()
-        col.prop(vol, "depth_threshold")
-
-
-class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel):
-    bl_label = "Options"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        mat = context.material
-        engine = context.engine
-        return check_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        layout = self.layout
-
-        mat = active_node_mat(context.material)
-
-        split = layout.split()
-
-        col = split.column()
-        if simple_material(context.material):
-            col.prop(mat, "use_raytrace")
-            col.prop(mat, "use_full_oversampling")
-        col.prop(mat, "use_mist")
-
-        col = split.column()
-        col.label(text="Light Group:")
-        col.prop(mat, "light_group", text="")
-        row = col.row()
-        row.active = bool(mat.light_group)
-        row.prop(mat, "use_light_group_exclusive", text="Exclusive")
-
-
 class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_EEVEE'}
     _context_path = "material"
     _property_type = bpy.types.Material
 
@@ -1101,29 +216,9 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
 
 
 classes = (
-    MATERIAL_MT_sss_presets,
     MATERIAL_MT_specials,
     MATERIAL_UL_matslots,
-    MATERIAL_PT_context_material,
     MATERIAL_PT_preview,
-    MATERIAL_PT_pipeline,
-    MATERIAL_PT_diffuse,
-    MATERIAL_PT_specular,
-    MATERIAL_PT_shading,
-    MATERIAL_PT_transp,
-    MATERIAL_PT_mirror,
-    MATERIAL_PT_sss,
-    MATERIAL_PT_halo,
-    MATERIAL_PT_flare,
-    MATERIAL_PT_strand,
-    MATERIAL_PT_options,
-    MATERIAL_PT_shadow,
-    MATERIAL_PT_volume_density,
-    MATERIAL_PT_volume_shading,
-    MATERIAL_PT_volume_lighting,
-    MATERIAL_PT_volume_transp,
-    MATERIAL_PT_volume_integration,
-    MATERIAL_PT_volume_options,
     MATERIAL_PT_custom_props,
     EEVEE_MATERIAL_PT_context_material,
     EEVEE_MATERIAL_PT_surface,
index 4a446ac..b6f7cfe 100644 (file)
@@ -1396,6 +1396,38 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
         # row.prop(psys, "invert_vertex_group_field", text="")
 
 
+class PARTICLE_PT_textures(ParticleButtonsPanel, Panel):
+    bl_label = "Textures"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
+
+    @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
+
+        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 PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
     _context_path = "particle_system.settings"
@@ -1420,6 +1452,7 @@ classes = (
     PARTICLE_PT_field_weights,
     PARTICLE_PT_force_fields,
     PARTICLE_PT_vertexgroups,
+    PARTICLE_PT_textures,
     PARTICLE_PT_custom_props,
 )
 
index 1528899..e0d0327 100644 (file)
@@ -50,7 +50,7 @@ class PhysicButtonsPanel:
 
 class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
     bl_label = "Cloth"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -134,7 +134,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Cache"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         md = context.cloth
@@ -144,7 +144,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Collision"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         cloth = context.cloth.collision_settings
@@ -184,7 +184,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Stiffness Scaling"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         cloth = context.cloth.settings
@@ -217,7 +217,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Sewing Springs"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         cloth = context.cloth.settings
@@ -251,7 +251,7 @@ class PHYSICS_PT_cloth_sewing(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         cloth = context.cloth.settings
index e1c0606..476a448 100644 (file)
@@ -60,7 +60,7 @@ class PhysicButtonsPanel:
 
 class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -108,7 +108,6 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
 
         elif md.ui_type == 'BRUSH':
             brush = md.brush_settings
-            use_shading_nodes = context.scene.render.use_shading_nodes
 
             if brush is None:
                 layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
@@ -123,21 +122,13 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
                 col.prop(brush, "paint_wetness", text="Wetness")
 
                 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, "material", text="")
-                    col.prop(brush, "paint_alpha", text="Alpha Factor")
-                else:
-                    col.prop(brush, "paint_color", text="")
-                    col.prop(brush, "paint_alpha", text="Alpha")
+                col.prop(brush, "paint_color", text="")
+                col.prop(brush, "paint_alpha", text="Alpha")
 
 
 class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Advanced"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -213,7 +204,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Output"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -306,7 +297,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Initial Color"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -342,7 +333,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Effects"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -391,7 +382,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Cache"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -412,7 +403,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
 
 class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Source"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -465,7 +456,7 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Velocity"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -501,7 +492,7 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
     bl_label = "Dynamic Paint Waves"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
index 80ad9e3..93f1d28 100644 (file)
@@ -42,7 +42,7 @@ class PhysicButtonsPanel:
 
 class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
     bl_label = "Fluid"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -205,7 +205,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
     bl_label = "Fluid World"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -258,7 +258,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
     bl_label = "Fluid Boundary"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -288,7 +288,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
     bl_label = "Fluid Particles"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
index 21453ff..817b0ab 100644 (file)
@@ -29,7 +29,7 @@ class PHYSICS_PT_rigidbody_panel:
 
 class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
     bl_label = "Rigid Body"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -56,7 +56,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
 
 class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
     bl_label = "Rigid Body Collisions"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -101,7 +101,7 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
 class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
     bl_label = "Rigid Body Dynamics"
     bl_default_closed = True
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
index 90d3b3d..aca989f 100644 (file)
@@ -29,7 +29,7 @@ class PHYSICS_PT_rigidbody_constraint_panel:
 
 class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Panel):
     bl_label = "Rigid Body Constraint"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
index 101a152..86b9a95 100644 (file)
@@ -46,7 +46,7 @@ class PhysicButtonsPanel:
 
 class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -76,7 +76,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Cache"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         md = context.soft_body
@@ -86,7 +86,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Goal"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         softbody = context.soft_body.settings
@@ -126,7 +126,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Edges"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         softbody = context.soft_body.settings
@@ -176,7 +176,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Self Collision"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         softbody = context.soft_body.settings
@@ -205,7 +205,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Solver"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -238,7 +238,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
 class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         md = context.soft_body
index 779a77c..10c823c 100644 (file)
@@ -193,129 +193,6 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
         subrow.prop(rd, "frame_map_new", text="New")
 
 
-class RENDER_PT_antialiasing(RenderButtonsPanel, Panel):
-    bl_label = "Anti-Aliasing"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        rd = context.scene.render
-
-        self.layout.prop(rd, "use_antialiasing", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-        layout.active = rd.use_antialiasing
-
-        split = layout.split()
-
-        col = split.column()
-        col.row().prop(rd, "antialiasing_samples", expand=True)
-        sub = col.row()
-        sub.prop(rd, "use_full_sample")
-
-        col = split.column()
-        col.prop(rd, "pixel_filter_type", text="")
-        col.prop(rd, "filter_size", text="Size")
-
-
-class RENDER_PT_motion_blur(RenderButtonsPanel, Panel):
-    bl_label = "Sampled Motion Blur"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        rd = context.scene.render
-        return not rd.use_full_sample and (context.engine in cls.COMPAT_ENGINES)
-
-    def draw_header(self, context):
-        rd = context.scene.render
-
-        self.layout.prop(rd, "use_motion_blur", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-        layout.active = rd.use_motion_blur
-
-        row = layout.row()
-        row.prop(rd, "motion_blur_samples")
-        row.prop(rd, "motion_blur_shutter")
-
-
-class RENDER_PT_shading(RenderButtonsPanel, Panel):
-    bl_label = "Shading"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(rd, "use_textures", text="Textures")
-        col.prop(rd, "use_shadows", text="Shadows")
-        col.prop(rd, "use_sss", text="Subsurface Scattering")
-        col.prop(rd, "use_envmaps", text="Environment Map")
-
-        col = split.column()
-        col.prop(rd, "use_raytrace", text="Ray Tracing")
-        col.prop(rd, "alpha_mode", text="Alpha")
-        col.prop(rd, "use_world_space_shading", text="World Space Shading")
-
-
-class RENDER_PT_performance(RenderButtonsPanel, Panel):
-    bl_label = "Performance"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-
-        split = layout.split()
-
-        col = split.column(align=True)
-        col.label(text="Threads:")
-        col.row(align=True).prop(rd, "threads_mode", expand=True)
-        sub = col.column(align=True)
-        sub.enabled = rd.threads_mode == 'FIXED'
-        sub.prop(rd, "threads")
-
-        col.label(text="Tile Size:")
-        col.prop(rd, "tile_x", text="X")
-        col.prop(rd, "tile_y", text="Y")
-
-        col.separator()
-        col.prop(rd, "preview_start_resolution")
-        col.prop(rd, "preview_pixel_size", text="")
-
-        col = split.column()
-        col.label(text="Memory:")
-        sub = col.column()
-        sub.enabled = not rd.use_full_sample
-        sub.prop(rd, "use_save_buffers")
-        sub = col.column()
-        sub.active = rd.use_compositing
-        sub.prop(rd, "use_free_image_textures")
-        sub = col.column()
-        sub.active = rd.use_raytrace
-        sub.label(text="Acceleration Structure:")
-        sub.prop(rd, "raytrace_method", text="")
-        if rd.raytrace_method == 'OCTREE':
-            sub.prop(rd, "octree_resolution", text="Resolution")
-        else:
-            sub.prop(rd, "use_instances", text="Instances")
-        sub.prop(rd, "use_local_coords", text="Local Coordinates")
-
-
 class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
     bl_label = "Post Processing"
     bl_options = {'DEFAULT_CLOSED'}
@@ -438,7 +315,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
 class RENDER_PT_encoding(RenderButtonsPanel, Panel):
     bl_label = "Encoding"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -517,77 +394,6 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
             col.prop(ffmpeg, "packetsize", text="Packet Size")
 
 
-class RENDER_PT_bake(RenderButtonsPanel, Panel):
-    bl_label = "Bake"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-
-        layout.operator("object.bake_image", icon='RENDER_STILL')
-
-        layout.prop(rd, "bake_type")
-
-        multires_bake = False
-        if rd.bake_type in ['NORMALS', 'DISPLACEMENT', 'DERIVATIVE', 'AO']:
-            layout.prop(rd, "use_bake_multires")
-            multires_bake = rd.use_bake_multires
-
-        if not multires_bake:
-            if rd.bake_type == 'NORMALS':
-                layout.prop(rd, "bake_normal_space")
-            elif rd.bake_type in {'DISPLACEMENT', 'AO'}:
-                layout.prop(rd, "use_bake_normalize")
-
-            # col.prop(rd, "bake_aa_mode")
-            # col.prop(rd, "use_bake_antialiasing")
-
-            layout.separator()
-
-            split = layout.split()
-
-            col = split.column()
-            col.prop(rd, "use_bake_to_vertex_color")
-            sub = col.column()
-            sub.active = not rd.use_bake_to_vertex_color
-            sub.prop(rd, "use_bake_clear")
-            sub.prop(rd, "bake_margin")
-            sub.prop(rd, "bake_quad_split", text="Split")
-
-            col = split.column()
-            col.prop(rd, "use_bake_selected_to_active")
-            sub = col.column()
-            sub.active = rd.use_bake_selected_to_active
-            sub.prop(rd, "bake_distance")
-            sub.prop(rd, "bake_bias")
-        else:
-            split = layout.split()
-
-            col = split.column()
-            col.prop(rd, "use_bake_clear")
-            col.prop(rd, "bake_margin")
-
-            if rd.bake_type == 'DISPLACEMENT':
-                col = split.column()
-                col.prop(rd, "use_bake_lores_mesh")
-
-            if rd.bake_type == 'AO':
-                col = split.column()
-                col.prop(rd, "bake_bias")
-                col.prop(rd, "bake_samples")
-
-        if rd.bake_type == 'DERIVATIVE':
-            row = layout.row()
-            row.prop(rd, "use_bake_user_scale", text="")
-
-            sub = row.column()
-            sub.active = rd.use_bake_user_scale
-            sub.prop(rd, "bake_user_scale", text="User Scale")
-
-
 class RENDER_PT_clay_layer_settings(RenderButtonsPanel, Panel):
     bl_label = "Clay Layer Settings"
     COMPAT_ENGINES = {'BLENDER_CLAY'}
@@ -905,15 +711,10 @@ classes = (
     RENDER_PT_context,
     RENDER_PT_render,
     RENDER_PT_dimensions,
-    RENDER_PT_antialiasing,
-    RENDER_PT_motion_blur,
-    RENDER_PT_shading,
-    RENDER_PT_performance,
     RENDER_PT_post_processing,
     RENDER_PT_stamp,
     RENDER_PT_output,
     RENDER_PT_encoding,
-    RENDER_PT_bake,
     RENDER_PT_clay_layer_settings,
     RENDER_PT_clay_collection_settings,
     RENDER_PT_eevee_sampling,
index 79a7113..094f2a9 100644 (file)
@@ -308,7 +308,7 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel):
 
 class SCENE_PT_physics(SceneButtonsPanel, Panel):
     bl_label = "Gravity"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw_header(self, context):
         self.layout.prop(context.scene, "use_gravity", text="")
@@ -325,7 +325,7 @@ class SCENE_PT_physics(SceneButtonsPanel, Panel):
 
 class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
     bl_label = "Rigid Body World"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -370,7 +370,7 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
 class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):
     bl_label = "Rigid Body Cache"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -387,7 +387,7 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):
 class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel):
     bl_label = "Rigid Body Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -427,9 +427,6 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
         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")
 
 
 class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
index 8f2c308..aa3227e 100644 (file)
@@ -23,12 +23,9 @@ from bpy.types import Menu, Panel, UIList
 from bpy.types import (
     Brush,
     FreestyleLineStyle,
-    Lamp,
-    Material,
     Object,
     ParticleSettings,
     Texture,
-    World,
 )
 
 from rna_prop_ui import PropertyPanel
@@ -47,22 +44,9 @@ class TEXTURE_MT_specials(Menu):
         layout.operator("texture.slot_paste", icon='PASTEDOWN')
 
 
-class TEXTURE_MT_envmap_specials(Menu):
-    bl_label = "Environment Map Specials"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.operator("texture.envmap_save", icon='IMAGEFILE')
-        layout.operator("texture.envmap_clear", icon='FILE_REFRESH')
-        layout.operator("texture.envmap_clear_all", icon='FILE_REFRESH')
-
-
 class TEXTURE_UL_texslots(UIList):
 
     def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
-        # assert(isinstance(item, bpy.types.MaterialTextureSlot)
         ma = data
         slot = item
         tex = slot.texture if slot else None
@@ -71,29 +55,11 @@ class TEXTURE_UL_texslots(UIList):
                 layout.prop(tex, "name", text="", emboss=False, icon_value=icon)
             else:
                 layout.label(text="", icon_value=icon)
-            if tex and isinstance(item, bpy.types.MaterialTextureSlot):
-                layout.prop(ma, "use_textures", text="", index=index)
         elif self.layout_type == 'GRID':
             layout.alignment = 'CENTER'
             layout.label(text="", icon_value=icon)
 
-
-from .properties_material import active_node_mat
-
-
 def context_tex_datablock(context):
-    idblock = context.material
-    if idblock:
-        return active_node_mat(idblock)
-
-    idblock = context.lamp
-    if idblock:
-        return idblock
-
-    idblock = context.world
-    if idblock:
-        return idblock
-
     idblock = context.brush
     if idblock:
         return idblock
@@ -108,151 +74,138 @@ def context_tex_datablock(context):
     return idblock
 
 
-def id_tex_datablock(bid):
-    if isinstance(bid, Object):
-        if bid.type == 'LAMP':
-            return bid.data
-        return bid.active_material
-
-    return bid
-
-
 class TextureButtonsPanel:
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "texture"
 
+
+class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
+    bl_label = "Preview"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+
     @classmethod
     def poll(cls, context):
         tex = context.texture
         return tex and (tex.type != 'NONE' or tex.use_nodes) and (context.engine in cls.COMPAT_ENGINES)
 
+    def draw(self, context):
+        layout = self.layout
+
+        tex = context.texture
+        slot = getattr(context, "texture_slot", None)
+        idblock = context_tex_datablock(context)
+
+        if idblock:
+            layout.template_preview(tex, parent=idblock, slot=slot)
+        else:
+            layout.template_preview(tex, slot=slot)
+
+        # Show Alpha Button for Brush Textures, see #29502
+        idblock = context_tex_datablock(context)
+        if isinstance(idblock, Brush):
+            layout.prop(tex, "use_preview_alpha")
 
-class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
+class TEXTURE_PT_context(TextureButtonsPanel, Panel):
     bl_label = ""
+    bl_context = "texture"
     bl_options = {'HIDE_HEADER'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        engine = context.engine
-        # if not (hasattr(context, "texture_slot") or hasattr(context, "texture_node")):
-        #     return False
-        return ((context.material or
-                 context.world or
-                 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))
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
 
-        slot = getattr(context, "texture_slot", None)
-        node = getattr(context, "texture_node", None)
-        space = context.space_data
         tex = context.texture
-        idblock = context_tex_datablock(context)
+        space = context.space_data
         pin_id = space.pin_id
+        use_pin_id = space.use_pin_id
+        user = context.texture_user
 
-        space.use_limited_texture_context = True
-
-        if space.use_pin_id and not isinstance(pin_id, Texture):
-            idblock = id_tex_datablock(pin_id)
-            pin_id = None
-
-        if not space.use_pin_id:
-            layout.row().prop(space, "texture_context", expand=True)
+        if not (use_pin_id and isinstance(pin_id, bpy.types.Texture)):
             pin_id = None
 
-        if space.texture_context == 'OTHER':
-            if not pin_id:
-                layout.template_texture_user()
-            user = context.texture_user
-            if user or pin_id:
-                layout.separator()
+        if not pin_id:
+            layout.template_texture_user()
 
-                row = layout.row()
+        if user or pin_id:
+            layout.separator()
 
-                if pin_id:
-                    row.template_ID(space, "pin_id")
-                else:
-                    propname = context.texture_user_property.identifier
-                    row.template_ID(user, propname, new="texture.new")
-
-                if tex:
-                    split = layout.split(percentage=0.2)
-                    if tex.use_nodes:
-                        if slot:
-                            split.label(text="Output:")
-                            split.prop(slot, "output_node", text="")
-                    else:
-                        split.label(text="Type:")
-                        split.prop(tex, "type", text="")
-            return
-
-        tex_collection = (pin_id is None) and (node is None) and (not isinstance(idblock, Brush))
-
-        if tex_collection:
-            row = layout.row()
+            split = layout.split(percentage=0.65)
+            col = split.column()
 
-            row.template_list("TEXTURE_UL_texslots", "", idblock, "texture_slots",
-                              idblock, "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 tex_collection:
-            layout.template_ID(idblock, "active_texture", new="texture.new")
-        elif node:
-            layout.template_ID(node, "texture", new="texture.new")
-        elif idblock:
-            layout.template_ID(idblock, "texture", new="texture.new")
-
-        if pin_id:
-            layout.template_ID(space, "pin_id")
-
-        if tex:
-            split = layout.split(percentage=0.2)
-            if tex.use_nodes:
-                if slot:
-                    split.label(text="Output:")
-                    split.prop(slot, "output_node", text="")
+            if pin_id:
+                col.template_ID(space, "pin_id")
             else:
+                propname = context.texture_user_property.identifier
+                col.template_ID(user, propname, new="texture.new")
+
+            if tex:
+                split = layout.split(percentage=0.2)
                 split.label(text="Type:")
                 split.prop(tex, "type", text="")
 
 
-class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
-    bl_label = "Preview"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+class TEXTURE_PT_node(TextureButtonsPanel, Panel):
+    bl_label = "Node"
+    bl_context = "texture"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+
+    @classmethod
+    def poll(cls, context):
+        node = context.texture_node
+        return node and (context.engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
 
-        tex = context.texture
-        slot = getattr(context, "texture_slot", None)
-        idblock = context_tex_datablock(context)
+        node = context.texture_node
+        ntree = node.id_data
+        layout.template_node_view(ntree, node, None)
 
-        if idblock:
-            layout.template_preview(tex, parent=idblock, slot=slot)
-        else:
-            layout.template_preview(tex, slot=slot)
 
-        # Show Alpha Button for Brush Textures, see #29502
-        if context.space_data.texture_context == 'BRUSH':
-            layout.prop(tex, "use_preview_alpha")
+class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
+    bl_label = "Mapping"
+    bl_context = "texture"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+
+    @classmethod
+    def poll(cls, context):
+        node = context.texture_node
+        # TODO(sergey): perform a faster/nicer check?
+        return node and hasattr(node, 'texture_mapping') and (context.engine in cls.COMPAT_ENGINES)
+
+    def draw(self, context):
+        layout = self.layout
+
+        node = context.texture_node
+
+        mapping = node.texture_mapping
+
+        layout.prop(mapping, "vector_type", expand=True)
+
+        row = layout.row()
+
+        row.column().prop(mapping, "translation")
+        row.column().prop(mapping, "rotation")
+        row.column().prop(mapping, "scale")
+
+        layout.label(text="Projection:")
+
+        row = layout.row()
+        row.prop(mapping, "mapping_x", text="")
+        row.prop(mapping, "mapping_y", text="")
+        row.prop(mapping, "mapping_z", text="")
 
 
 class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
     bl_label = "Colors"
     bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
+
+    @classmethod
+    def poll(cls, context):
+        tex = context.texture
+        return tex and (tex.type != 'NONE' or tex.use_nodes) and (context.engine in cls.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
@@ -281,23 +234,6 @@ class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
         col = layout.column()
         col.prop(tex, "use_clamp", text="Clamp")
 
-# Texture Slot Panels #
-
-
-class TextureSlotPanel(TextureButtonsPanel):
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        if not hasattr(context, "texture_slot"):
-            return False
-
-        engine = context.engine
-        return TextureButtonsPanel.poll(cls, context) and (engine in cls.COMPAT_ENGINES)
-
-
-# Texture Type Panels #
-
 
 class TextureTypePanel(TextureButtonsPanel):
 
@@ -311,7 +247,7 @@ class TextureTypePanel(TextureButtonsPanel):
 class TEXTURE_PT_clouds(TextureTypePanel, Panel):
     bl_label = "Clouds"
     tex_type = 'CLOUDS'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -335,7 +271,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel):
 class TEXTURE_PT_wood(TextureTypePanel, Panel):
     bl_label = "Wood"
     tex_type = 'WOOD'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -364,7 +300,7 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel):
 class TEXTURE_PT_marble(TextureTypePanel, Panel):
     bl_label = "Marble"
     tex_type = 'MARBLE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -391,7 +327,7 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel):
 class TEXTURE_PT_magic(TextureTypePanel, Panel):
     bl_label = "Magic"
     tex_type = 'MAGIC'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -406,7 +342,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel):
 class TEXTURE_PT_blend(TextureTypePanel, Panel):
     bl_label = "Blend"
     tex_type = 'BLEND'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -424,7 +360,7 @@ class TEXTURE_PT_blend(TextureTypePanel, Panel):
 class TEXTURE_PT_stucci(TextureTypePanel, Panel):
     bl_label = "Stucci"
     tex_type = 'STUCCI'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -444,7 +380,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel):
 class TEXTURE_PT_image(TextureTypePanel, Panel):
     bl_label = "Image"
     tex_type = 'IMAGE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -471,7 +407,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
     bl_label = "Image Sampling"
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -494,17 +430,6 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
 
         col = split.column()
 
-        # Only for Material based textures, not for Lamp/World...
-        if slot and isinstance(idblock, Material):
-            col.prop(tex, "use_normal_map")
-            row = col.row()
-            row.active = tex.use_normal_map
-            row.prop(slot, "normal_map_space", text="")
-
-            row = col.row()
-            row.active = not tex.use_normal_map
-            row.prop(tex, "use_derivative_map")
-
         col.prop(tex, "use_mipmap")
         row = col.row()
         row.active = tex.use_mipmap
@@ -518,7 +443,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
     bl_label = "Image Mapping"
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -570,62 +495,10 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
         col.prop(tex, "crop_max_y", text="Y")
 
 
-class TEXTURE_PT_envmap(TextureTypePanel, Panel):
-    bl_label = "Environment Map"
-    tex_type = 'ENVIRONMENT_MAP'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        env = tex.environment_map
-
-        row = layout.row()
-        row.prop(env, "source", expand=True)
-        row.menu("TEXTURE_MT_envmap_specials", icon='DOWNARROW_HLT', text="")
-
-        if env.source == 'IMAGE_FILE':
-            layout.template_ID(tex, "image", open="image.open")
-            layout.template_image(tex, "image", tex.image_user, compact=True)
-        else:
-            layout.prop(env, "mapping")
-            if env.mapping == 'PLANE':
-                layout.prop(env, "zoom")
-            layout.prop(env, "viewpoint_object")
-
-            split = layout.split()
-
-            col = split.column()
-            col.prop(env, "layers_ignore")
-            col.prop(env, "resolution")
-            col.prop(env, "depth")
-
-            col = split.column(align=True)
-
-            col.label(text="Clipping:")
-            col.prop(env, "clip_start", text="Start")
-            col.prop(env, "clip_end", text="End")
-
-
-class TEXTURE_PT_envmap_sampling(TextureTypePanel, Panel):
-    bl_label = "Environment Map Sampling"
-    bl_options = {'DEFAULT_CLOSED'}
-    tex_type = 'ENVIRONMENT_MAP'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-
-        texture_filter_common(tex, layout)
-
-
 class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
     bl_label = "Musgrave"
     tex_type = 'MUSGRAVE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -661,7 +534,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
 class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
     bl_label = "Voronoi"
     tex_type = 'VORONOI'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -697,7 +570,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
 class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
     bl_label = "Distorted Noise"
     tex_type = 'DISTORTED_NOISE'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     def draw(self, context):
         layout = self.layout
@@ -716,180 +589,20 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
         split.prop(tex, "nabla")
 
 
-class TEXTURE_PT_voxeldata(TextureButtonsPanel, Panel):
-    bl_label = "Voxel Data"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        tex = context.texture
-        engine = context.engine
-        return tex and (tex.type == 'VOXEL_DATA' and (engine in cls.COMPAT_ENGINES))
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        vd = tex.voxel_data
-
-        layout.prop(vd, "file_format")
-        if vd.file_format in {'BLENDER_VOXEL', 'RAW_8BIT'}:
-            layout.prop(vd, "filepath")
-        if vd.file_format == 'RAW_8BIT':
-            layout.prop(vd, "resolution")
-        elif vd.file_format == 'SMOKE':
-            layout.prop(vd, "domain_object")
-            layout.prop(vd, "smoke_data_type")
-        elif vd.file_format == 'HAIR':
-            layout.prop(vd, "domain_object")
-            layout.prop(vd, "hair_data_type")
-        elif vd.file_format == 'IMAGE_SEQUENCE':
-            layout.template_ID(tex, "image", open="image.open")
-            layout.template_image(tex, "image", tex.image_user, compact=True)
-            # layout.prop(vd, "frame_duration")
-
-        if vd.file_format in {'BLENDER_VOXEL', 'RAW_8BIT'}:
-            layout.prop(vd, "use_still_frame")
-            row = layout.row()
-            row.active = vd.use_still_frame
-            row.prop(vd, "still_frame")
-
-        layout.prop(vd, "interpolation")
-        layout.prop(vd, "extension")
-        layout.prop(vd, "intensity")
-
-
-class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
-    bl_label = "Point Density"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        tex = context.texture
-        engine = context.engine
-        return tex and (tex.type == 'POINT_DENSITY' and (engine in cls.COMPAT_ENGINES))
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        pd = tex.point_density
-
-        layout.row().prop(pd, "point_source", expand=True)
-
-        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:
-            col.label(text="Object:")
-            col.prop(pd, "object", text="")
-            col.label(text="Cache:")
-            col.prop(pd, "vertex_cache_space", text="")
-
-        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:
-            col.prop(pd, "vertex_color_source", text="")
-            if pd.vertex_color_source == 'VERTEX_COLOR':
-                if pd.object and pd.object.data:
-                    col.prop_search(pd, "vertex_attribute_name", pd.object.data, "vertex_colors", text="")
-            if pd.vertex_color_source == 'VERTEX_WEIGHT':
-                if pd.object:
-                    col.prop_search(pd, "vertex_attribute_name", pd.object, "vertex_groups", text="")
-                layout.template_color_ramp(pd, "color_ramp", expand=True)
-
-        col = split.column()
-        col.label()
-        col.prop(pd, "radius")
-        col.label(text="Falloff:")
-        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")
-
-        if pd.use_falloff_curve:
-            col = layout.column()
-            col.label(text="Falloff Curve")
-            col.template_curve_mapping(pd, "falloff_curve", brush=False)
-
-
-class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel):
-    bl_label = "Turbulence"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+class TextureSlotPanel(TextureButtonsPanel):
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
-        tex = context.texture
-        engine = context.engine
-        return tex and (tex.type == 'POINT_DENSITY' and (engine in cls.COMPAT_ENGINES))
-
-    def draw_header(self, context):
-        pd = context.texture.point_density
-
-        self.layout.prop(pd, "use_turbulence", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        pd = tex.point_density
-        layout.active = pd.use_turbulence
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Influence:")
-        col.prop(pd, "turbulence_influence", text="")
-        col.label(text="Noise Basis:")
-        col.prop(pd, "noise_basis", text="")
-
-        col = split.column()
-        col.label()
-        col.prop(pd, "turbulence_scale")
-        col.prop(pd, "turbulence_depth")
-        col.prop(pd, "turbulence_strength")
-
-
-class TEXTURE_PT_ocean(TextureTypePanel, Panel):
-    bl_label = "Ocean"
-    tex_type = 'OCEAN'
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        tex = context.texture
-        ot = tex.ocean
+        if not hasattr(context, "texture_slot"):
+            return False
 
-        col = layout.column()
-        col.prop(ot, "ocean_object")
-        col.prop(ot, "output")
+        return (context.engine in cls.COMPAT_ENGINES)
 
 
 class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
     bl_label = "Mapping"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -960,31 +673,6 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
                 row.prop(tex, "mapping_y", text="")
                 row.prop(tex, "mapping_z", text="")
 
-            elif isinstance(idblock, Material):
-                split = layout.split(percentage=0.3)
-                split.label(text="Projection:")
-                split.prop(tex, "mapping", text="")
-
-                split = layout.split()
-
-                col = split.column()
-                if tex.texture_coords in {'ORCO', 'UV'}:
-                    col.prop(tex, "use_from_dupli")
-                    if (idblock.type == 'VOLUME' and tex.texture_coords == 'ORCO'):
-                        col.prop(tex, "use_map_to_bounds")
-                elif tex.texture_coords == 'OBJECT':
-                    col.prop(tex, "use_from_original")
-                    if (idblock.type == 'VOLUME'):
-                        col.prop(tex, "use_map_to_bounds")
-                else:
-                    col.label()
-
-                col = split.column()
-                row = col.row()
-                row.prop(tex, "mapping_x", text="")
-                row.prop(tex, "mapping_y", text="")
-                row.prop(tex, "mapping_z", text="")
-
             row = layout.row()
             row.column().prop(tex, "offset")
             row.column().prop(tex, "scale")
@@ -992,7 +680,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
 
 class TEXTURE_PT_influence(TextureSlotPanel, Panel):
     bl_label = "Influence"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
 
     @classmethod
     def poll(cls, context):
@@ -1022,101 +710,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
             sub.prop(tex, factor, text=name, slider=True)
             return sub  # XXX, temp. use_map_normal needs to override.
 
-        if isinstance(idblock, Material):
-            if idblock.type in {'SURFACE', 'WIRE'}:
-                split = layout.split()
-
-                col = split.column()
-                col.label(text="Diffuse:")
-                factor_but(col, "use_map_diffuse", "diffuse_factor", "Intensity")
-                factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
-                factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
-                factor_but(col, "use_map_translucency", "translucency_factor", "Translucency")
-
-                col.label(text="Specular:")
-                factor_but(col, "use_map_specular", "specular_factor", "Intensity")
-                factor_but(col, "use_map_color_spec", "specular_color_factor", "Color")
-                factor_but(col, "use_map_hardness", "hardness_factor", "Hardness")
-
-                col = split.column()
-                col.label(text="Shading:")
-                factor_but(col, "use_map_ambient", "ambient_factor", "Ambient")
-                factor_but(col, "use_map_emit", "emit_factor", "Emit")
-                factor_but(col, "use_map_mirror", "mirror_factor", "Mirror")
-                factor_but(col, "use_map_raymir", "raymir_factor", "Ray Mirror")
-
-                col.label(text="Geometry:")
-                # XXX replace 'or' when displacement is fixed to not rely on normal influence value.
-                sub_tmp = factor_but(col, "use_map_normal", "normal_factor", "Normal")
-                sub_tmp.active = (tex.use_map_normal or tex.use_map_displacement)
-                # END XXX
-
-                factor_but(col, "use_map_warp", "warp_factor", "Warp")
-                factor_but(col, "use_map_displacement", "displacement_factor", "Displace")
-
-                #~ sub = col.column()
-                #~ sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
-                #~ sub.prop(tex, "default_value", text="Amount", slider=True)
-            elif idblock.type == 'HALO':
-                layout.label(text="Halo:")
-
-                split = layout.split()
-
-                col = split.column()
-                factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
-                factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
-
-                col = split.column()
-                factor_but(col, "use_map_raymir", "raymir_factor", "Size")
-                factor_but(col, "use_map_hardness", "hardness_factor", "Hardness")
-                factor_but(col, "use_map_translucency", "translucency_factor", "Add")
-            elif idblock.type == 'VOLUME':
-                layout.label(text="Volume:")
-
-                split = layout.split()
-
-                col = split.column()
-                factor_but(col, "use_map_density", "density_factor", "Density")
-                factor_but(col, "use_map_emission", "emission_factor", "Emission")
-                factor_but(col, "use_map_scatter", "scattering_factor", "Scattering")
-                factor_but(col, "use_map_reflect", "reflection_factor", "Reflection")
-
-                col = split.column()
-                col.label(text=" ")
-                factor_but(col, "use_map_color_emission", "emission_color_factor", "Emission Color")
-                factor_but(col, "use_map_color_transmission", "transmission_color_factor", "Transmission Color")
-                factor_but(col, "use_map_color_reflection", "reflection_color_factor", "Reflection Color")
-
-                layout.label(text="Geometry:")
-
-                split = layout.split()
-
-                col = split.column()
-                factor_but(col, "use_map_warp", "warp_factor", "Warp")
-
-                col = split.column()
-                factor_but(col, "use_map_displacement", "displacement_factor", "Displace")
-
-        elif isinstance(idblock, Lamp):
-            split = layout.split()
-
-            col = split.column()
-            factor_but(col, "use_map_color", "color_factor", "Color")
-
-            col = split.column()
-            factor_but(col, "use_map_shadow", "shadow_factor", "Shadow")
-
-        elif isinstance(idblock, World):
-            split = layout.split()
-
-            col = split.column()
-            factor_but(col, "use_map_blend", "blend_factor", "Blend")
-            factor_but(col, "use_map_horizon", "horizon_factor", "Horizon")
-
-            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):
+        if isinstance(idblock, ParticleSettings):
             split = layout.split()
 
             col = split.column()
@@ -1170,47 +764,26 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
             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)
-
-        if isinstance(idblock, Material):
-            layout.label(text="Bump Mapping:")
-
-            # only show bump settings if activated but not for normal-map images
-            row = layout.row()
-
-            sub = row.row()
-            sub.active = (
-                (tex.use_map_normal or tex.use_map_warp) and
-                not (tex.texture.type == 'IMAGE' and
-                     (tex.texture.use_normal_map or tex.texture.use_derivative_map))
-            )
-            sub.prop(tex, "bump_method", text="Method")
-
-            # the space setting is supported for: derivative-maps + bump-maps
-            # (DEFAULT,BEST_QUALITY), not for normal-maps
-            sub = row.row()
-            sub.active = (
-                (tex.use_map_normal or tex.use_map_warp) and
-                not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and
-                ((tex.bump_method in {'BUMP_LOW_QUALITY', 'BUMP_MEDIUM_QUALITY', 'BUMP_BEST_QUALITY'}) or
-                 (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
-            )
-            sub.prop(tex, "bump_objectspace", text="Space")
-
 
 class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
     _context_path = "texture"
     _property_type = Texture
 
+    @classmethod
+    def poll(cls, context):
+        return context.texture and (context.engine in cls.COMPAT_ENGINES)
+
 
 classes = (
     TEXTURE_MT_specials,
-    TEXTURE_MT_envmap_specials,
     TEXTURE_UL_texslots,
-    TEXTURE_PT_context_texture,
     TEXTURE_PT_preview,
+    TEXTURE_PT_context,
+    TEXTURE_PT_node,
+    TEXTURE_PT_node_mapping,
+    TEXTURE_PT_mapping,
+    TEXTURE_PT_influence,
     TEXTURE_PT_colors,
     TEXTURE_PT_clouds,
     TEXTURE_PT_wood,
@@ -1221,17 +794,9 @@ classes = (
     TEXTURE_PT_image,
     TEXTURE_PT_image_sampling,
     TEXTURE_PT_image_mapping,
-    TEXTURE_PT_envmap,
-    TEXTURE_PT_envmap_sampling,
     TEXTURE_PT_musgrave,
     TEXTURE_PT_voronoi,
     TEXTURE_PT_distortednoise,
-    TEXTURE_PT_voxeldata,
-    TEXTURE_PT_pointdensity,
-    TEXTURE_PT_pointdensity_turbulence,
-    TEXTURE_PT_ocean,
-    TEXTURE_PT_mapping,
-    TEXTURE_PT_influence,
     TEXTURE_PT_custom_props,
 )
 
index 045ddc0..1ec2d47 100644 (file)
@@ -50,197 +50,12 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
         world = context.world
         space = context.space_data
 
-        texture_count = world and len(world.texture_slots.keys())
-
         split = layout.split(percentage=0.85)
         if scene:
             split.template_ID(scene, "world", new="world.new")
         elif world:
             split.template_ID(space, "pin_id")
 
-        if texture_count:
-            split.label(text=str(texture_count), icon='TEXTURE')
-
-
-class WORLD_PT_preview(WorldButtonsPanel, Panel):
-    bl_label = "Preview"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    @classmethod
-    def poll(cls, context):
-        return (context.world) and (context.engine in cls.COMPAT_ENGINES)
-
-    def draw(self, context):
-        self.layout.template_preview(context.world)
-
-
-class WORLD_PT_world(WorldButtonsPanel, Panel):
-    bl_label = "World"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        world = context.world
-
-        row = layout.row()
-        row.prop(world, "use_sky_paper")
-        row.prop(world, "use_sky_blend")
-        row.prop(world, "use_sky_real")
-
-        row = layout.row()
-        row.column().prop(world, "horizon_color")
-        col = row.column()
-        col.prop(world, "zenith_color")
-        col.active = world.use_sky_blend
-        row.column().prop(world, "ambient_color")
-
-        row = layout.row()
-        row.prop(world, "exposure")
-        row.prop(world, "color_range")
-
-
-class WORLD_PT_ambient_occlusion(WorldButtonsPanel, Panel):
-    bl_label = "Ambient Occlusion"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        light = context.world.light_settings
-        self.layout.prop(light, "use_ambient_occlusion", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        light = context.world.light_settings
-
-        layout.active = light.use_ambient_occlusion
-
-        split = layout.split()
-        split.prop(light, "ao_factor", text="Factor")
-        split.prop(light, "ao_blend_type", text="")
-
-
-class WORLD_PT_environment_lighting(WorldButtonsPanel, Panel):
-    bl_label = "Environment Lighting"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        light = context.world.light_settings
-        self.layout.prop(light, "use_environment_light", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        light = context.world.light_settings
-
-        layout.active = light.use_environment_light
-
-        split = layout.split()
-        split.prop(light, "environment_energy", text="Energy")
-        split.prop(light, "environment_color", text="")
-
-
-class WORLD_PT_indirect_lighting(WorldButtonsPanel, Panel):
-    bl_label = "Indirect Lighting"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        light = context.world.light_settings
-        self.layout.prop(light, "use_indirect_light", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        light = context.world.light_settings
-
-        layout.active = light.use_indirect_light and light.gather_method == 'APPROXIMATE'
-
-        split = layout.split()
-        split.prop(light, "indirect_factor", text="Factor")
-        split.prop(light, "indirect_bounces", text="Bounces")
-
-        if light.gather_method == 'RAYTRACE':
-            layout.label(text="Only works with Approximate gather method")
-
-
-class WORLD_PT_gather(WorldButtonsPanel, Panel):
-    bl_label = "Gather"
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        light = context.world.light_settings
-
-        layout.active = light.use_ambient_occlusion or light.use_environment_light or light.use_indirect_light
-
-        layout.row().prop(light, "gather_method", expand=True)
-
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Attenuation:")
-        if light.gather_method == 'RAYTRACE':
-            col.prop(light, "distance")
-        col.prop(light, "use_falloff")
-        sub = col.row()
-        sub.active = light.use_falloff
-        sub.prop(light, "falloff_strength", text="Strength")
-
-        if light.gather_method == 'RAYTRACE':
-            col = split.column()
-
-            col.label(text="Sampling:")
-            col.prop(light, "sample_method", text="")
-
-            sub = col.column()
-            sub.prop(light, "samples")
-
-            if light.sample_method == 'ADAPTIVE_QMC':
-                sub.prop(light, "threshold")
-                sub.prop(light, "adapt_to_speed", slider=True)
-            elif light.sample_method == 'CONSTANT_JITTERED':
-                sub.prop(light, "bias")
-
-        if light.gather_method == 'APPROXIMATE':
-            col = split.column()
-
-            col.label(text="Sampling:")
-            col.prop(light, "passes")
-            col.prop(light, "error_threshold", text="Error")
-            col.prop(light, "use_cache")
-            col.prop(light, "correction")
-
-
-class WORLD_PT_mist(WorldButtonsPanel, Panel):
-    bl_label = "Mist"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        world = context.world
-
-        self.layout.prop(world.mist_settings, "use_mist", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        world = context.world
-
-        layout.active = world.mist_settings.use_mist
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(world.mist_settings, "intensity")
-        col.prop(world.mist_settings, "start")
-
-        col = split.column()
-        col.prop(world.mist_settings, "depth")
-        col.prop(world.mist_settings, "height")
-
-        layout.prop(world.mist_settings, "falloff")
-
 
 class EEVEE_WORLD_PT_mist(WorldButtonsPanel, Panel):
     bl_label = "Mist Pass"
@@ -311,13 +126,6 @@ class EEVEE_WORLD_PT_surface(WorldButtonsPanel, Panel):
 
 classes = (
     WORLD_PT_context_world,
-    WORLD_PT_preview,
-    WORLD_PT_world,
-    WORLD_PT_ambient_occlusion,
-    WORLD_PT_environment_lighting,
-    WORLD_PT_indirect_lighting,
-    WORLD_PT_gather,
-    WORLD_PT_mist,
     WORLD_PT_custom_props,
     EEVEE_WORLD_PT_surface,
     EEVEE_WORLD_PT_mist,
index 8b199d7..f97c88b 100644 (file)
@@ -51,14 +51,12 @@ class NODE_HT_header(Header):
         NODE_MT_editor_menus.draw_collapsible(context, layout)
 
         layout.prop(snode, "tree_type", text="", expand=True)
-        use_shading_nodes = scene.render.use_shading_nodes
 
         if snode.tree_type == 'ShaderNodeTree':
-            if use_shading_nodes:
-                layout.prop(snode, "shader_type", text="", expand=True)
+            layout.prop(snode, "shader_type", text="", expand=True)
 
             ob = context.object
-            if (not use_shading_nodes or snode.shader_type == 'OBJECT') and ob:
+            if snode.shader_type == 'OBJECT' and ob:
                 row = layout.row()
                 # disable material slot buttons when pinned, cannot find correct slot within id_from (#36589)
                 row.enabled = not snode.pin
@@ -69,18 +67,18 @@ class NODE_HT_header(Header):
                 if id_from and ob.type != 'LAMP':
                     row.template_ID(id_from, "active_material", new="material.new")
 
-                # Don't show "Use Nodes" Button when Engine is BI for Lamps
-                if snode_id and not (use_shading_nodes == 0 and ob.type == 'LAMP'):
+                # No shader nodes for Eevee lamps
+                if snode_id and not (context.engine == 'BLENDER_EEVEE' and ob.type == 'LAMP'):
                     layout.prop(snode_id, "use_nodes")
 
-            if use_shading_nodes and snode.shader_type == 'WORLD':
+            if snode.shader_type == 'WORLD':
                 row = layout.row()
                 row.enabled = not snode.pin
                 row.template_ID(scene, "world", new="world.new")
                 if snode_id:
                     row.prop(snode_id, "use_nodes")
 
-            if use_shading_nodes and snode.shader_type == 'LINESTYLE':
+            if snode.shader_type == 'LINESTYLE':
                 view_layer = context.scene.view_layers.active
                 lineset = view_layer.freestyle_settings.linesets.active
                 if lineset is not None:
index 5d6964e..ca9c446 100644 (file)
@@ -1288,7 +1288,7 @@ class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsP
 
 
 class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
     _context_path = "scene.sequence_editor.active_strip"
     _property_type = (bpy.types.Sequence,)
     bl_category = "Strip"
index 731295e..d211d8b 100644 (file)
@@ -1547,54 +1547,40 @@ class VIEW3D_MT_object_specials(Menu):
             lamp = obj.data
 
             layout.operator_context = 'INVOKE_REGION_WIN'
-            use_shading_nodes = scene.render.use_shading_nodes
-
-            if use_shading_nodes:
-                emission_node = None
-                if lamp.node_tree:
-                    for node in lamp.node_tree.nodes:
-                        if getattr(node, "type", None) == 'EMISSION':
-                            emission_node = node
-                            break
-
-                if emission_node is not None:
-                    props = layout.operator("wm.context_modal_mouse", text="Strength")
-                    props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.node_tree" \
-                                           ".nodes[\"" + emission_node.name + "\"]" \
-                                           ".inputs[\"Strength\"].default_value"
-                    props.header_text = "Lamp Strength: %.3f"
-                    props.input_scale = 0.1
-
-                if lamp.type == 'AREA':
-                    props = layout.operator("wm.context_modal_mouse", text="Size X")
-                    props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.size"
-                    props.header_text = "Lamp Size X: %.3f"
 
-                    if lamp.shape == 'RECTANGLE':
-                        props = layout.operator("wm.context_modal_mouse", text="Size Y")
-                        props.data_path_iter = "selected_editable_objects"
-                        props.data_path_item = "data.size_y"
-                        props.header_text = "Lamp Size Y: %.3f"
+            emission_node = None
+            if lamp.node_tree:
+                for node in lamp.node_tree.nodes:
+                    if getattr(node, "type", None) == 'EMISSION':
+                        emission_node = node
+                        break
 
-                elif lamp.type in {'SPOT', 'POINT', 'SUN'}:
-                    props = layout.operator("wm.context_modal_mouse", text="Size")
-                    props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.shadow_soft_size"
-                    props.header_text = "Lamp Size: %.3f"
-            else:
-                props = layout.operator("wm.context_modal_mouse", text="Energy")
+            if emission_node is not None:
+                props = layout.operator("wm.context_modal_mouse", text="Strength")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.node_tree" \
+                                       ".nodes[\"" + emission_node.name + "\"]" \
+                                       ".inputs[\"Strength\"].default_value"
+                props.header_text = "Lamp Strength: %.3f"
+                props.input_scale = 0.1
+
+            if lamp.type == 'AREA':
+                props = layout.operator("wm.context_modal_mouse", text="Size X")
                 props.data_path_iter = "selected_editable_objects"
-                props.data_path_item = "data.energy"
-                props.header_text = "Lamp Energy: %.3f"
+                props.data_path_item = "data.size"
+                props.header_text = "Lamp Size X: %.3f"
 
-                if lamp.type in {'SPOT', 'AREA', 'POINT'}:
-                    props = layout.operator("wm.context_modal_mouse", text="Falloff Distance")
+                if lamp.shape == 'RECTANGLE':
+                    props = layout.operator("wm.context_modal_mouse", text="Size Y")
                     props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.distance"
-                    props.input_scale = 0.1
-                    props.header_text = "Lamp Falloff Distance: %.1f"
+                    props.data_path_item = "data.size_y"
+                    props.header_text = "Lamp Size Y: %.3f"
+
+            elif lamp.type in {'SPOT', 'POINT', 'SUN'}:
+                props = layout.operator("wm.context_modal_mouse", text="Size")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.shadow_soft_size"
+                props.header_text = "Lamp Size: %.3f"
 
             if lamp.type == 'SPOT':
                 layout.separator()
@@ -1610,19 +1596,6 @@ class VIEW3D_MT_object_specials(Menu):
                 props.input_scale = -0.01
                 props.header_text = "Spot Blend: %.2f"
 
-                if not use_shading_nodes:
-                    props = layout.operator("wm.context_modal_mouse", text="Clip Start")
-                    props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.shadow_buffer_clip_start"
-                    props.input_scale = 0.05
-                    props.header_text = "Clip Start: %.2f"
-
-                    props = layout.operator("wm.context_modal_mouse", text="Clip End")
-                    props.data_path_iter = "selected_editable_objects"
-                    props.data_path_item = "data.shadow_buffer_clip_end"
-                    props.input_scale = 0.05
-                    props.header_text = "Clip End: %.2f"
-
         layout.separator()
 
         props = layout.operator("object.isolate_type_render")
index d7c23e4..e56fb36 100644 (file)
@@ -341,7 +341,6 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
         row = col.row(align=True)
         row.operator("transform.edge_slide", text="Slide Edge")
         row.operator("transform.vert_slide", text="Vertex")
-        col.operator("mesh.noise")
         col.operator("mesh.vertices_smooth")
         col.operator("transform.vertex_random")
 
@@ -1199,9 +1198,6 @@ class TEXTURE_UL_texpaintslots(UIList):
 
         if self.layout_type in {'DEFAULT', 'COMPACT'}:
             layout.prop(item, "name", text="", emboss=False, icon_value=icon)
-            if (not mat.use_nodes) and context.engine == 'BLENDER_RENDER':
-                mtex_index = mat.texture_paint_slots[index].index
-                layout.prop(mat, "use_textures", text="", index=mtex_index)
         elif self.layout_type == 'GRID':
             layout.alignment = 'CENTER'
             layout.label(text="")
@@ -1262,16 +1258,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
                 else:
                     slot = None
 
-                if (not mat.use_nodes) and context.engine == 'BLENDER_RENDER':
-                    row = col.row(align=True)
-                    row.operator_menu_enum("paint.add_texture_paint_slot", "type")
-                    row.operator("paint.delete_texture_paint_slot", text="", icon='X')
-
-                    if slot:
-                        col.prop(mat.texture_slots[slot.index], "blend_type")
-                        col.separator()
-
-                if slot and slot.index != -1:
+                if slot and slot.valid:
                     col.label("UV Map:")
                     col.prop_search(slot, "uv_layer", ob.data, "uv_layers", text="")
 
index a92b256..0d283d3 100644 (file)
@@ -43,18 +43,10 @@ class CompositorNodeCategory(SortedNodeCategory):
         return (context.space_data.tree_type == 'CompositorNodeTree')
 
 
-class ShaderNewNodeCategory(SortedNodeCategory):
+class ShaderNodeCategory(SortedNodeCategory):
     @classmethod
     def poll(cls, context):
-        return (context.space_data.tree_type == 'ShaderNodeTree' and
-                context.scene.render.use_shading_nodes)
-
-
-class ShaderOldNodeCategory(SortedNodeCategory):
-    @classmethod
-    def poll(cls, context):
-        return (context.space_data.tree_type == 'ShaderNodeTree' and
-                not context.scene.render.use_shading_nodes)
+        return (context.space_data.tree_type == 'ShaderNodeTree')
 
 
 class TextureNodeCategory(SortedNodeCategory):
@@ -172,59 +164,8 @@ def object_eevee_cycles_shader_nodes_poll(context):
 # All standard node categories currently used in nodes.
 
 shader_node_categories = [
-    # Shader Nodes
-    ShaderOldNodeCategory("SH_INPUT", "Input", items=[
-        NodeItem("ShaderNodeMaterial"),
-        NodeItem("ShaderNodeCameraData"),
-        NodeItem("ShaderNodeFresnel"),
-        NodeItem("ShaderNodeLayerWeight"),
-        NodeItem("ShaderNodeLampData"),
-        NodeItem("ShaderNodeValue"),
-        NodeItem("ShaderNodeRGB"),
-        NodeItem("ShaderNodeTexture"),
-        NodeItem("ShaderNodeGeometry"),
-        NodeItem("ShaderNodeExtendedMaterial"),
-        NodeItem("ShaderNodeParticleInfo"),
-        NodeItem("ShaderNodeObjectInfo"),
-        NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
-        ]),
-    ShaderOldNodeCategory("SH_OUTPUT", "Output", items=[
-        NodeItem("ShaderNodeOutput"),
-        NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
-        ]),
-    ShaderOldNodeCategory("SH_OP_COLOR", "Color", items=[
-        NodeItem("ShaderNodeMixRGB"),
-        NodeItem("ShaderNodeRGBCurve"),
-        NodeItem("ShaderNodeInvert"),
-        NodeItem("ShaderNodeHueSaturation"),
-        NodeItem("ShaderNodeGamma"),
-        ]),
-    ShaderOldNodeCategory("SH_OP_VECTOR", "Vector", items=[
-        NodeItem("ShaderNodeNormal"),
-        NodeItem("ShaderNodeMapping"),
-        NodeItem("ShaderNodeVectorCurve"),
-        NodeItem("ShaderNodeVectorTransform"),
-        NodeItem("ShaderNodeNormalMap"),
-        ]),
-    ShaderOldNodeCategory("SH_CONVERTOR", "Converter", items=[
-        NodeItem("ShaderNodeValToRGB"),
-        NodeItem("ShaderNodeRGBToBW"),
-        NodeItem("ShaderNodeMath"),
-        NodeItem("ShaderNodeVectorMath"),
-        NodeItem("ShaderNodeSqueeze"),
-        NodeItem("ShaderNodeSeparateRGB"),
-        NodeItem("ShaderNodeCombineRGB"),
-        NodeItem("ShaderNodeSeparateHSV"),
-        NodeItem("ShaderNodeCombineHSV"),
-        ]),
-    ShaderOldNodeCategory("SH_GROUP", "Group", items=node_group_items),
-    ShaderOldNodeCategory("SH_LAYOUT", "Layout", items=[
-        NodeItem("NodeFrame"),
-        NodeItem("NodeReroute"),
-        ]),
-
-    # New Shader Nodes (Cycles)
-    ShaderNewNodeCategory("SH_NEW_INPUT", "Input", items=[
+    # Shader Nodes (Cycles and Eevee)
+    ShaderNodeCategory("SH_NEW_INPUT", "Input", items=[
         NodeItem("ShaderNodeTexCoord"),
         NodeItem("ShaderNodeAttribute"),
         NodeItem("ShaderNodeLightPath"),
@@ -244,14 +185,14 @@ shader_node_categories = [
         NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
         ]),
-    ShaderNewNodeCategory("SH_NEW_OUTPUT", "Output", items=[
+    ShaderNodeCategory("SH_NEW_OUTPUT", "Output", items=[
         NodeItem("ShaderNodeOutputMaterial", poll=object_eevee_cycles_shader_nodes_poll),
         NodeItem("ShaderNodeOutputLamp", poll=object_cycles_shader_nodes_poll),
         NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
         NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
         ]),
-    ShaderNewNodeCategory("SH_NEW_SHADER", "Shader", items=[
+    ShaderNodeCategory("SH_NEW_SHADER", "Shader", items=[
         NodeItem("ShaderNodeMixShader", poll=eevee_cycles_shader_nodes_poll),
         NodeItem("ShaderNodeAddShader", poll=eevee_cycles_shader_nodes_poll),
         NodeItem("ShaderNodeBsdfDiffuse", poll=object_eevee_cycles_shader_nodes_poll),
@@ -275,7 +216,7 @@ shader_node_categories = [
         NodeItem("ShaderNodeVolumePrincipled"),
         NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
         ]),
-    ShaderNewNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
+    ShaderNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
         NodeItem("ShaderNodeTexImage"),
         NodeItem("ShaderNodeTexEnvironment"),
         NodeItem("ShaderNodeTexSky"),
@@ -289,7 +230,7 @@ shader_node_categories = [
         NodeItem("ShaderNodeTexBrick"),
         NodeItem("ShaderNodeTexPointDensity"),
         ]),
-    ShaderNewNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
+    ShaderNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
         NodeItem("ShaderNodeMixRGB"),
         NodeItem("ShaderNodeRGBCurve"),
         NodeItem("ShaderNodeInvert"),
@@ -298,7 +239,7 @@ shader_node_categories = [
         NodeItem("ShaderNodeGamma"),
         NodeItem("ShaderNodeBrightContrast"),
         ]),
-    ShaderNewNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
+    ShaderNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
         NodeItem("ShaderNodeMapping"),
         NodeItem("ShaderNodeBump"),
         NodeItem("ShaderNodeDisplacement"),
@@ -308,7 +249,7 @@ shader_node_categories = [
         NodeItem("ShaderNodeVectorCurve"),
         NodeItem("ShaderNodeVectorTransform"),
         ]),
-    ShaderNewNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
+    ShaderNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
         NodeItem("ShaderNodeMath"),
         NodeItem("ShaderNodeValToRGB"),
         NodeItem("ShaderNodeRGBToBW"),
@@ -322,11 +263,11 @@ shader_node_categories = [
         NodeItem("ShaderNodeWavelength"),
         NodeItem("ShaderNodeBlackbody"),
         ]),
-    ShaderNewNodeCategory("SH_NEW_SCRIPT", "Script", items=[
+    ShaderNodeCategory("SH_NEW_SCRIPT", "Script", items=[
         NodeItem("ShaderNodeScript"),
         ]),
-    ShaderNewNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
-    ShaderNewNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
+    ShaderNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
+    ShaderNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
         NodeItem("NodeFrame"),
         NodeItem("NodeReroute"),
         ]),
index e911a0d..79c14c1 100644 (file)
@@ -28,18 +28,6 @@ class MATERIAL_UL_matslots_example(bpy.types.UIList):
                 layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
             else:
                 layout.label(text="", translate=False, icon_value=icon)
-            # And now we can add other UI stuff...
-            # Here, we add nodes info if this material uses (old!) shading nodes.
-            if ma and not context.scene.render.use_shading_nodes:
-                manode = ma.active_node_material
-                if manode:
-                    # The static method UILayout.icon returns the integer value of the icon ID "computed" for the given
-                    # RNA object.
-                    layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode))
-                elif ma.use_nodes:
-                    layout.label(text="Node <none>", translate=False)
-                else:
-                    layout.label(text="")
         # 'GRID' layout type should be as compact as possible (typically a single icon!).
         elif self.layout_type in {'GRID'}:
             layout.alignment = 'CENTER'
index 70ca7a1..b31a185 100644 (file)
@@ -165,7 +165,7 @@ void AbcHairWriter::write_hair_sample(DerivedMesh *dm,
                                        psys_interpolate_uvs(tface, face->v4, pa->fuv, r_uv);
                                        uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
 
-                                       psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL, NULL);
+                                       psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, normal, NULL, NULL, NULL);
 
                                        copy_yup_from_zup(tmp_nor.getValue(), normal);
                                        norm_values.push_back(tmp_nor);
@@ -273,7 +273,7 @@ void AbcHairWriter::write_hair_child_sample(DerivedMesh *dm,
                        psys_interpolate_uvs(tface, face->v4, pc->fuv, r_uv);
                        uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
 
-                       psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL, NULL);
+                       psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL);
 
                        /* Convert Z-up to Y-up. */
                        norm_values.push_back(Imath::V3f(tmpnor[0], tmpnor[2], -tmpnor[1]));
index b038559..74416bc 100644 (file)
@@ -97,7 +97,6 @@ struct MCol;
 struct ColorBand;
 struct Depsgraph;
 struct GPUVertexAttribs;
-struct GPUDrawObject;
 struct PBVH;
 
 /* number of sub-elements each mesh element has (for interpolation) */
@@ -127,34 +126,6 @@ typedef enum DerivedMeshType {
        DM_TYPE_CCGDM
 } DerivedMeshType;
 
-typedef enum DMDrawOption {
-       /* the element is hidden or otherwise non-drawable */
-       DM_DRAW_OPTION_SKIP = 0,
-       /* normal drawing */
-       DM_DRAW_OPTION_NORMAL = 1,
-       /* draw, but don't set the color from mcol */
-       DM_DRAW_OPTION_NO_MCOL = 2,
-       /* used in drawMappedFaces, use GL stipple for the face */
-       DM_DRAW_OPTION_STIPPLE = 3,
-} DMDrawOption;
-
-/* Drawing callback types */
-typedef int (*DMSetMaterial)(int mat_nr, void *attribs);
-typedef int (*DMCompareDrawOptions)(void *userData, int cur_index, int next_index);
-typedef void (*DMSetDrawInterpOptions)(void *userData, int index, float t);
-typedef DMDrawOption (*DMSetDrawOptions)(void *userData, int index);
-
-typedef enum DMDrawFlag {
-       DM_DRAW_USE_COLORS          = (1 << 0),
-       DM_DRAW_ALWAYS_SMOOTH       = (1 << 1),
-       DM_DRAW_USE_ACTIVE_UV       = (1 << 2),
-       DM_DRAW_USE_TEXPAINT_UV     = (1 << 3),
-       DM_DRAW_SKIP_HIDDEN         = (1 << 4),
-       DM_DRAW_SKIP_SELECT         = (1 << 5),
-       DM_DRAW_SELECT_USE_EDITMODE = (1 << 6),
-       DM_DRAW_NEED_NORMALS        = (1 << 7)
-} DMDrawFlag;
-
 typedef enum DMForeachFlag {
        DM_FOREACH_NOP = 0,
        DM_FOREACH_USE_NORMAL = (1 << 0),  /* foreachMappedVert, foreachMappedLoop, foreachMappedFaceCenter */
@@ -163,14 +134,9 @@ typedef enum DMForeachFlag {
 typedef enum DMDirtyFlag {
        /* dm has valid tessellated faces, but tessellated CDDATA need to be updated. */
        DM_DIRTY_TESS_CDLAYERS = 1 << 0,
-       /* One of the MCOL layers have been updated, force updating of GPUDrawObject's colors buffer.
-        * This is necessary with modern, VBO draw code, as e.g. in vpaint mode me->mcol may be updated
-        * without actually rebuilding dm (hence by default keeping same GPUDrawObject, and same colors
-        * buffer, which prevents update during a stroke!). */
-       DM_DIRTY_MCOL_UPDATE_DRAW = 1 << 1,
 
        /* check this with modifier dependsOnNormals callback to see if normals need recalculation */
-       DM_DIRTY_NORMALS = 1 << 2,
+       DM_DIRTY_NORMALS = 1 << 1,
 }  DMDirtyFlag;
 
 typedef struct DerivedMesh DerivedMesh;
@@ -181,9 +147,7 @@ struct DerivedMesh {
        int needsFree; /* checked on ->release, is set to 0 for cached results */
        int deformedOnly; /* set by modifier stack if only deformed from original */
        BVHCache *bvhCache;
-       struct GPUDrawObject *drawObject;
        DerivedMeshType type;
-       float auto_bump_scale;
        DMDirtyFlag dirty;
        int totmat; /* total materials. Will be valid only before object drawing. */
        struct Material **mat; /* material array. Will be valid only before object drawing */
@@ -383,98 +347,6 @@ struct DerivedMesh {
         */
        struct PBVH *(*getPBVH)(struct Object *ob, DerivedMesh *dm);
 
-       /* Drawing Operations */
-
-       /** Draw all vertices as bgl points (no options) */
-       void (*drawVerts)(DerivedMesh *dm);
-
-       /** Draw all edges as lines (no options)
-        *
-        * Also called for *final* editmode DerivedMeshes
-        */
-       void (*drawEdges)(DerivedMesh *dm, bool drawLooseEdges, bool drawAllEdges);
-       
-       /** Draw all loose edges (edges w/ no adjoining faces) */
-       void (*drawLooseEdges)(DerivedMesh *dm);
-
-       /** Draw all faces
-        *  o Set face normal or vertex normal based on inherited face flag
-        *  o Use inherited face material index to call setMaterial
-        *  o Only if setMaterial returns true
-        *
-        * Also called for *final* editmode DerivedMeshes
-        */
-       void (*drawFacesSolid)(DerivedMesh *dm, float (*partial_redraw_planes)[4],
-                              bool fast, DMSetMaterial setMaterial);
-
-       /** Draw all faces with GLSL materials
-        *  o setMaterial is called for every different material nr
-        *  o Only if setMaterial returns true
-        */
-       void (*drawFacesGLSL)(DerivedMesh *dm, DMSetMaterial setMaterial);
-
-       /** Draw mapped faces (no color, or texture)
-        * - Only if !setDrawOptions or
-        *   setDrawOptions(userData, mapped-face-index, r_drawSmooth)
-        *   returns true
-        *
-        * If drawSmooth is set to true then vertex normals should be set and
-        * glShadeModel called with GL_SMOOTH. Otherwise the face normal should
-        * be set and glShadeModel called with GL_FLAT.
-        *
-        * The setDrawOptions is allowed to not set drawSmooth (for example, when
-        * lighting is disabled), in which case the implementation should draw as
-        * smooth shaded.
-        */
-       void (*drawMappedFaces)(DerivedMesh *dm,
-                               DMSetDrawOptions setDrawOptions,
-                               DMSetMaterial setMaterial,
-                               DMCompareDrawOptions compareDrawOptions,
-                               void *userData,
-                               DMDrawFlag flag);
-
-       /** Draw mapped faces with GLSL materials
-        * - setMaterial is called for every different material nr
-        * - setDrawOptions is called for every face
-        * - Only if setMaterial and setDrawOptions return true
-        */
-       void (*drawMappedFacesGLSL)(DerivedMesh *dm,
-                                   DMSetMaterial setMaterial,
-                                   DMSetDrawOptions setDrawOptions,
-                                   void *userData);
-
-       /** Draw mapped edges as lines
-        * - Only if !setDrawOptions or setDrawOptions(userData, mapped-edge)
-        *   returns true
-        */
-       void (*drawMappedEdges)(DerivedMesh *dm,
-                               DMSetDrawOptions setDrawOptions,
-                               void *userData);
-
-       /** Draw mapped edges as lines with interpolation values
-        * - Only if !setDrawOptions or
-        *   setDrawOptions(userData, mapped-edge, mapped-v0, mapped-v1, t)
-        *   returns true
-        *
-        * NOTE: This routine is optional!
-        */
-       void (*drawMappedEdgesInterp)(DerivedMesh *dm, 
-                                     DMSetDrawOptions setDrawOptions,
-                                     DMSetDrawInterpOptions setDrawInterpOptions,
-                                     void *userData);
-
-       /** Draw all faces with materials
-        * - setMaterial is called for every different material nr
-        * - setFace is called to verify if a face must be hidden
-        */
-       void (*drawMappedFacesMat)(DerivedMesh *dm,
-                                  void (*setMaterial)(void *userData, int matnr, void *attribs),
-                                  bool (*setFace)(void *userData, int index), void *userData);
-
-       struct GPUDrawObject *(*gpuObjectNew)(DerivedMesh *dm);
-       void (*copy_gpu_data)(DerivedMesh *dm, int type, void *varray_p,
-                             const int *mat_orig_to_new, const void *user_data);
-
        /** Release reference to the DerivedMesh. This function decides internally
         * if the DerivedMesh will be freed, or cached for later use. */
        void (*release)(DerivedMesh *dm);
@@ -756,9 +628,6 @@ void DM_vertex_attributes_from_gpu(
         DerivedMesh *dm,
         struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs);
 
-void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert, int loop);
-void DM_draw_attrib_vertex_uniforms(const DMVertexAttribs *attribs);
-
 void DM_calc_tangents_names_from_gpu(
         const struct GPUVertexAttribs *gattribs,
         char (*tangent_names)[MAX_NAME], int *tangent_names_count);
index 0c22edc..a16bdbb 100644 (file)
@@ -28,7 +28,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         280
-#define BLENDER_SUBVERSION      7
+#define BLENDER_SUBVERSION      8
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   6
index 5e79f64..c647dd3 100644 (file)
@@ -93,11 +93,6 @@ typedef struct CameraParams {
        float clipsta;
        float clipend;
 
-       /* fields */
-       int use_fields;
-       int field_second;
-       int field_odd;
-
        /* computed viewplane */
        float ycor;
        float viewdx;
index d57d0ea..43f3661 100644 (file)
@@ -87,10 +87,6 @@ short BKE_object_material_slot_find_index(struct Object *ob, struct Material *ma
 bool  BKE_object_material_slot_add(struct Object *ob);
 bool  BKE_object_material_slot_remove(struct Object *ob);
 
-struct Image  *BKE_object_material_edit_image_get(struct Object *ob, short mat_nr);
-struct Image **BKE_object_material_edit_image_get_array(struct Object *ob);
-bool           BKE_object_material_edit_image_set(struct Object *ob, short mat_nr, struct Image *image);
-
 void BKE_texpaint_slot_refresh_cache(struct Scene *scene, struct Material *ma);
 void BKE_texpaint_slots_refresh_object(struct Scene *scene, struct Object *ob);
 
@@ -101,13 +97,6 @@ struct Material *BKE_material_pop_id(struct Main *bmain, struct ID *id, int inde
 void BKE_material_clear_id(struct Main *bmain, struct ID *id, bool update_data);
 /* rendering */
 
-void init_render_material(struct Material *, int, float *);
-void init_render_materials(struct Main *, int r_mode, float *amd, bool do_default_material);
-void end_render_material(struct Material *);
-void end_render_materials(struct Main *);
-
-bool material_in_material(struct Material *parmat, struct Material *mat);
-
 void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
 
 /* copy/paste */
index 2907b56..d85f409 100644 (file)
@@ -498,7 +498,6 @@ struct bNode   *nodeGetActiveTexture(struct bNodeTree *ntree);
 void            nodeUpdate(struct bNodeTree *ntree, struct bNode *node);
 bool            nodeUpdateID(struct bNodeTree *ntree, struct ID *id);
 void            nodeUpdateInternalLinks(struct bNodeTree *ntree, struct bNode *node);
-void            nodeSynchronizeID(struct bNode *node, bool copy_to_id);
 
 int             nodeSocketIsHidden(struct bNodeSocket *sock);
 void            ntreeTagUsedSockets(struct bNodeTree *ntree);
@@ -702,24 +701,22 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, c
 /* -------------------------------------------------------------------- */
 /** \name Shader Nodes
  * \{ */
-struct ShadeInput;
-struct ShadeResult;
 
 /* note: types are needed to restore callbacks, don't change values */
 /* range 1 - 100 is reserved for common nodes */
 /* using toolbox, we add node groups by assuming the values below don't exceed NODE_GROUP_MENU for now */
 
-#define SH_NODE_OUTPUT         1
+//#define SH_NODE_OUTPUT               1
 
-#define SH_NODE_MATERIAL       100
+//#define SH_NODE_MATERIAL     100
 #define SH_NODE_RGB                    101
 #define SH_NODE_VALUE          102
 #define SH_NODE_MIX_RGB                103
 #define SH_NODE_VALTORGB       104
 #define SH_NODE_RGBTOBW                105
-#define SH_NODE_TEXTURE                106
+//#define SH_NODE_TEXTURE              106
 #define SH_NODE_NORMAL         107
-#define SH_NODE_GEOMETRY       108
+//#define SH_NODE_GEOMETRY     108
 #define SH_NODE_MAPPING                109
 #define SH_NODE_CURVE_VEC      110
 #define SH_NODE_CURVE_RGB      111
@@ -727,7 +724,7 @@ struct ShadeResult;
 #define SH_NODE_MATH           115
 #define SH_NODE_VECT_MATH      116
 #define SH_NODE_SQUEEZE                117
-#define SH_NODE_MATERIAL_EXT   118
+//#define SH_NODE_MATERIAL_EXT 118
 #define SH_NODE_INVERT         119
 #define SH_NODE_SEPRGB         120
 #define SH_NODE_COMBRGB                121
@@ -813,12 +810,7 @@ struct ShadeResult;
 
 struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree);
 void            ntreeShaderEndExecTree(struct bNodeTreeExec *exec);
-bool            ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr);
-void            ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode);
-
-/* switch material render loop */
-extern void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *);
-void            set_node_shader_lamp_loop(void (*lamp_loop_func)(struct ShadeInput *, struct ShadeResult *));
+bool            ntreeShaderExecTree(struct bNodeTree *ntree, int thread);
 
 void            ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat, short compatibility);
 void            ntreeGPUMaterialDomain(struct bNodeTree *ntree, bool *has_surface_output, bool *has_volume_output);
@@ -1051,7 +1043,7 @@ struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree);
 void ntreeTexEndExecTree(struct bNodeTreeExec *exec);
 int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target,
                      float coord[3], float dxt[3], float dyt[3], int osatex, const short thread,
-                     struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex);
+                     struct Tex *tex, short which_output, int cfra, int preview, struct MTex *mtex);
 /** \} */
 
 void init_nodesystem(void);
index 05082ed..0c8d00e 100644 (file)
@@ -324,7 +324,7 @@ void copy_particle_key(struct ParticleKey *to, struct ParticleKey *from, int tim
 CustomDataMask psys_emitter_customdata_mask(struct ParticleSystem *psys);
 void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd, int distr, int index, int index_dmcache,
                               float fuv[4], float foffset, float vec[3], float nor[3],
-                              float utan[3], float vtan[3], float orco[3], float ornor[3]);
+                              float utan[3], float vtan[3], float orco[3]);
 struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct ParticleSystem *psys);
 
 struct ModifierData *object_add_particle_system(struct Scene *scene, struct Object *ob, const char *name);
@@ -356,7 +356,7 @@ void BKE_particlesettings_clump_curve_init(struct ParticleSettings *part);
 void BKE_particlesettings_rough_curve_init(struct ParticleSettings *part);
 void BKE_particlesettings_twist_curve_init(struct ParticleSettings *part);
 void psys_apply_child_modifiers(struct ParticleThreadContext *ctx, struct ListBase *modifiers,
-                                struct ChildParticle *cpa, struct ParticleTexture *ptex, const float orco[3], const float ornor[3], float hairmat[4][4],
+                                struct ChildParticle *cpa, struct ParticleTexture *ptex, const float orco[3], float hairmat[4][4],
                                 struct ParticleCacheKey *keys, struct ParticleCacheKey *parent_keys, const float parent_orco[3]);
 
 void psys_sph_init(struct ParticleSimulationData *sim, struct SPHData *sphdata);
@@ -422,7 +422,7 @@ float *psys_cache_vgroup(struct DerivedMesh *dm, struct ParticleSystem *psys, in
 void psys_get_texture(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleTexture *ptex, int event, float cfra);
 void psys_interpolate_face(struct MVert *mvert, struct MFace *mface, struct MTFace *tface,
                            float (*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3],
-                           float orco[3], float ornor[3]);
+                           float orco[3]);
 float psys_particle_value_from_verts(struct DerivedMesh *dm, short from, struct ParticleData *pa, float *values);
 void psys_get_from_key(struct ParticleKey *key, float loc[3], float vel[3], float rot[4], float *time);
 
@@ -430,7 +430,7 @@ void psys_get_from_key(struct ParticleKey *key, float loc[3], float vel[3], floa
 void BKE_psys_collision_neartest_cb(void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit);
 void psys_particle_on_dm(struct DerivedMesh *dm_final, int from, int index, int index_dmcache,
                          const float fw[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3],
-                         float orco[3], float ornor[3]);
+                         float orco[3]);
 
 /* particle_system.c */
 void distribute_particles(struct ParticleSimulationData *sim, int from);
index 5f37aa2..c18288d 100644 (file)
@@ -129,10 +129,6 @@ bool BKE_pbvh_node_find_nearest_to_ray(
 
 /* Drawing */
 
-void BKE_pbvh_node_draw(PBVHNode *node, void *data);
-void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3],
-                   int (*setMaterial)(int matnr, void *attribs), bool wireframe, bool fast);
-void BKE_pbvh_draw_BB(PBVH *bvh);
 void BKE_pbvh_draw_cb(
         PBVH *bvh, float (*planes)[4], float (*fnors)[3], bool fast,
         void (*draw_fn)(void *user_data, struct Gwn_Batch *batch), void *user_data);
@@ -225,7 +221,7 @@ struct GSet *BKE_pbvh_bmesh_node_faces(PBVHNode *node);
 void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node);
 void BKE_pbvh_bmesh_after_stroke(PBVH *bvh);
 
-/* Update Normals/Bounding Box/Draw Buffers/Redraw and clear flags */
+/* Update Normals/Bounding Box/Redraw and clear flags */
 
 void BKE_pbvh_update(PBVH *bvh, int flags, float (*face_nors)[3]);
 void BKE_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3]);
index 75392c4..bdbed9a 100644 (file)
@@ -151,16 +151,12 @@ bool BKE_scene_remove_render_view(struct Scene *scene, struct SceneRenderView *s
 /* render profile */
 int get_render_subsurf_level(const struct RenderData *r, int level, bool for_render);
 int get_render_child_particle_number(const struct RenderData *r, int num, bool for_render);
-int get_render_shadow_samples(const struct RenderData *r, int samples);
-float get_render_aosss_error(const struct RenderData *r, float error);
 
-bool BKE_scene_use_new_shading_nodes(const struct Scene *scene);
 bool BKE_scene_use_shading_nodes_custom(struct Scene *scene);
-bool BKE_scene_use_world_space_shading(struct Scene *scene);
 bool BKE_scene_use_spherical_stereo(struct Scene *scene);
 
-bool BKE_scene_uses_blender_internal(const struct Scene *scene);
 bool BKE_scene_uses_blender_eevee(const struct Scene *scene);
+bool BKE_scene_uses_cycles(const struct Scene *scene);
 
 void BKE_scene_disable_color_management(struct Scene *scene);
 bool BKE_scene_check_color_management_enabled(const struct Scene *scene);
index c0116f6..cd173ef 100644 (file)
@@ -437,7 +437,7 @@ enum {
 
 typedef struct ImBuf *(*SequencerDrawView)(
         struct Depsgraph *depsgraph, struct Scene *scene,
-        struct ViewLayer *view_layer, int drawtype,
+        int drawtype,
         struct Object *camera, int width, int height,
         unsigned int flag, unsigned int draw_flags, int alpha_mode,
         int samples, const char *viewname,
index 4e98852..ed6aa3f 100644 (file)
@@ -40,7 +40,6 @@ extern "C" {
 struct bNode;
 struct Brush;
 struct ColorBand;
-struct EnvMap;
 struct FreestyleLineStyle;
 struct ImagePool;
 struct Lamp;
@@ -53,7 +52,6 @@ struct PointDensity;
 struct Tex;
 struct TexMapping;
 struct TexResult;
-struct VoxelData;
 struct World;
 
 /*  in ColorBand struct */
@@ -76,27 +74,17 @@ struct MTex *BKE_texture_mtex_add_id(struct ID *id, int slot);
 // void autotexname(struct Tex *tex);
 
 struct Tex *give_current_object_texture(struct Object *ob);
-struct Tex *give_current_material_texture(struct Material *ma);
-struct Tex *give_current_lamp_texture(struct Lamp *la);
 struct Tex *give_current_linestyle_texture(struct FreestyleLineStyle *linestyle);
-struct Tex *give_current_world_texture(struct World *world);
 struct Tex *give_current_brush_texture(struct Brush *br);
 struct Tex *give_current_particle_texture(struct ParticleSettings *part);
 
-struct bNode *give_current_material_texture_node(struct Material *ma);
-
 bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
 void set_active_mtex(struct ID *id, short act);
 
 void set_current_brush_texture(struct Brush *br, struct Tex *tex);
-void set_current_world_texture(struct World *wo, struct Tex *tex);
-void set_current_material_texture(struct Material *ma, struct Tex *tex);
-void set_current_lamp_texture(struct Lamp *la, struct Tex *tex);
 void set_current_linestyle_texture(struct FreestyleLineStyle *linestyle, struct Tex *tex);
 void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex);
 
-bool has_current_material_texture(struct Material *ma);
-
 struct TexMapping *BKE_texture_mapping_add(int type);
 void               BKE_texture_mapping_default(struct TexMapping *texmap, int type);
 void               BKE_texture_mapping_init(struct TexMapping *texmap);
@@ -104,26 +92,12 @@ void               BKE_texture_mapping_init(struct TexMapping *texmap);
 struct ColorMapping *BKE_texture_colormapping_add(void);
 void                 BKE_texture_colormapping_default(struct ColorMapping *colormap);
 
-void           BKE_texture_envmap_free_data(struct EnvMap *env);
-void           BKE_texture_envmap_free(struct EnvMap *env);
-struct EnvMap *BKE_texture_envmap_add(void);
-struct EnvMap *BKE_texture_envmap_copy(const struct EnvMap *env, const int flag);
-
 void                 BKE_texture_pointdensity_init_data(struct PointDensity *pd);
 void                 BKE_texture_pointdensity_free_data(struct PointDensity *pd);
 void                 BKE_texture_pointdensity_free(struct PointDensity *pd);
 struct PointDensity *BKE_texture_pointdensity_add(void);
 struct PointDensity *BKE_texture_pointdensity_copy(const struct PointDensity *pd, const int flag);
 
-void              BKE_texture_voxeldata_free_data(struct VoxelData *vd);
-void              BKE_texture_voxeldata_free(struct VoxelData *vd);
-struct VoxelData *BKE_texture_voxeldata_add(void);
-struct VoxelData *BKE_texture_voxeldata_copy(struct VoxelData *vd);
-
-void             BKE_texture_ocean_free(struct OceanTex *ot);
-struct OceanTex *BKE_texture_ocean_add(void);
-struct OceanTex *BKE_texture_ocean_copy(const struct OceanTex *ot, const int flag);
-
 bool    BKE_texture_dependsOnTime(const struct Tex *texture);
 bool    BKE_texture_is_image_user(const struct Tex *tex);
 
index bcdcdaa..648af41 100644 (file)
 
 #include "BLI_sys_types.h" /* for intptr_t support */
 
-#include "GPU_buffers.h"
-#include "GPU_shader.h"
-#include "GPU_immediate.h"
-
 #include "DEG_depsgraph.h"
 #include "DEG_depsgraph_query.h"
 
@@ -348,7 +344,6 @@ void DM_init(
        DM_init_funcs(dm);
        
        dm->needsFree = 1;
-       dm->auto_bump_scale = -1.0f;
        dm->dirty = 0;
 
        /* don't use CustomData_reset(...); because we dont want to touch customdata */
@@ -405,7 +400,6 @@ int DM_release(DerivedMesh *dm)
 {
        if (dm->needsFree) {
                bvhcache_free(&dm->bvhCache);
-               GPU_drawobject_free(dm);
                CustomData_free(&dm->vertData, dm->numVertData);
                CustomData_free(&dm->edgeData, dm->numEdgeData);
                CustomData_free(&dm->faceData, dm->numTessFaceData);
@@ -3002,21 +2996,6 @@ void mesh_get_mapped_verts_coords(DerivedMesh *dm, float (*r_cos)[3], const int
        }
 }
 
-/* ******************* GLSL ******************** */
-
-void DM_calc_tangents_names_from_gpu(
-        const GPUVertexAttribs *gattribs,
-        char (*tangent_names)[MAX_NAME], int *r_tangent_names_count)
-{
-       int count = 0;
-       for (int b = 0; b < gattribs->totlayer; b++) {
-               if (gattribs->layer[b].type == CD_TANGENT) {
-                       strcpy(tangent_names[count++], gattribs->layer[b].name);
-               }
-       }
-       *r_tangent_names_count = count;
-}
-
 void DM_add_named_tangent_layer_for_uv(
         CustomData *uv_data, CustomData *tan_data, int numLoopData,
         const char *layer_name)
@@ -3050,397 +3029,6 @@ void DM_calc_loop_tangents(
                &dm->tangent_mask);
 }
 
-void DM_calc_auto_bump_scale(DerivedMesh *dm)
-{
-       /* int totvert = dm->getNumVerts(dm); */ /* UNUSED */
-       int totface = dm->getNumTessFaces(dm);
-
-       MVert *mvert = dm->getVertArray(dm);
-       MFace *mface = dm->getTessFaceArray(dm);
-       MTFace *mtface = dm->getTessFaceDataArray(dm, CD_MTFACE);
-
-       if (mtface) {
-               double dsum = 0.0;
-               int nr_accumulated = 0;
-               int f;
-
-               for (f = 0; f < totface; f++) {
-                       {
-                               float *verts[4], *tex_coords[4];
-                               const int nr_verts = mface[f].v4 != 0 ? 4 : 3;
-                               bool is_degenerate;
-                               int i;
-
-                               verts[0] = mvert[mface[f].v1].co; verts[1] = mvert[mface[f].v2].co; verts[2] = mvert[mface[f].v3].co;
-                               tex_coords[0] = mtface[f].uv[0]; tex_coords[1] = mtface[f].uv[1]; tex_coords[2] = mtface[f].uv[2];
-                               if (nr_verts == 4) {
-                                       verts[3] = mvert[mface[f].v4].co;
-                                       tex_coords[3] = mtface[f].uv[3];
-                               }
-
-                               /* discard degenerate faces */
-                               is_degenerate = 0;
-                               if (equals_v3v3(verts[0], verts[1]) ||
-                                   equals_v3v3(verts[0], verts[2]) ||
-                                   equals_v3v3(verts[1], verts[2]) ||
-                                   equals_v2v2(tex_coords[0], tex_coords[1]) ||
-                                   equals_v2v2(tex_coords[0], tex_coords[2]) ||
-                                   equals_v2v2(tex_coords[1], tex_coords[2]))
-                               {
-                                       is_degenerate = 1;
-                               }
-
-                               /* verify last vertex as well if this is a quad */
-                               if (is_degenerate == 0 && nr_verts == 4) {
-                                       if (equals_v3v3(verts[3], verts[0]) ||
-                                           equals_v3v3(verts[3], verts[1]) ||
-                                           equals_v3v3(verts[3], verts[2]) ||
-                                           equals_v2v2(tex_coords[3], tex_coords[0]) ||
-                                           equals_v2v2(tex_coords[3], tex_coords[1]) ||
-                                           equals_v2v2(tex_coords[3], tex_coords[2]))
-                                       {
-                                               is_degenerate = 1;
-                                       }
-
-                                       /* verify the winding is consistent */
-                                       if (is_degenerate == 0) {
-                                               float prev_edge[2];
-                                               bool is_signed = 0;
-                                               sub_v2_v2v2(prev_edge, tex_coords[0], tex_coords[3]);
-
-                                               i = 0;
-                                               while (is_degenerate == 0 && i < 4) {
-                                                       float cur_edge[2], signed_area;
-                                                       sub_v2_v2v2(cur_edge, tex_coords[(i + 1) & 0x3], tex_coords[i]);
-                                                       signed_area = cross_v2v2(prev_edge, cur_edge);
-
-                                                       if (i == 0) {
-                                                               is_signed = (signed_area < 0.0f) ? 1 : 0;
-                                                       }
-                                                       else if ((is_signed != 0) != (signed_area < 0.0f)) {
-                                                               is_degenerate = 1;
-                                                       }
-
-                                                       if (is_degenerate == 0) {
-                                                               copy_v2_v2(prev_edge, cur_edge);
-                                                               i++;
-                                                       }
-                                               }
-                                       }
-                               }
-
-                               /* proceed if not a degenerate face */
-                               if (is_degenerate == 0) {
-                                       int nr_tris_to_pile = 0;
-                                       /* quads split at shortest diagonal */
-                                       int offs = 0;  /* initial triangulation is 0,1,2 and 0, 2, 3 */
-                                       if (nr_verts == 4) {
-                                               float pos_len_diag0, pos_len_diag1;
-
-                                               pos_len_diag0 = len_squared_v3v3(verts[2], verts[0]);
-                                               pos_len_diag1 = len_squared_v3v3(verts[3], verts[1]);
-
-                                               if (pos_len_diag1 < pos_len_diag0) {
-                                                       offs = 1;     // alter split
-                                               }
-                                               else if (pos_len_diag0 == pos_len_diag1) { /* do UV check instead */
-                                                       float tex_len_diag0, tex_len_diag1;
-
-                                                       tex_len_diag0 = len_squared_v2v2(tex_coords[2], tex_coords[0]);
-                                                       tex_len_diag1 = len_squared_v2v2(tex_coords[3], tex_coords[1]);
-
-                                                       if (tex_len_diag1 < tex_len_diag0) {
-                                                               offs = 1; /* alter split */
-                                                       }
-                                               }
-                                       }
-                                       nr_tris_to_pile = nr_verts - 2;
-                                       if (nr_tris_to_pile == 1 || nr_tris_to_pile == 2) {
-                                               const int indices[6] = {offs + 0, offs + 1, offs + 2, offs + 0, offs + 2, (offs + 3) & 0x3 };
-                                               int t;
-                                               for (t = 0; t < nr_tris_to_pile; t++) {
-                                                       float f2x_area_uv;
-                                                       const float *p0 = verts[indices[t * 3 + 0]];
-                                                       const float *p1 = verts[indices[t * 3 + 1]];
-                                                       const float *p2 = verts[indices[t * 3 + 2]];
-
-                                                       float edge_t0[2], edge_t1[2];
-                                                       sub_v2_v2v2(edge_t0, tex_coords[indices[t * 3 + 1]], tex_coords[indices[t * 3 + 0]]);
-                                                       sub_v2_v2v2(edge_t1, tex_coords[indices[t * 3 + 2]], tex_coords[indices[t * 3 + 0]]);
-
-                                                       f2x_area_uv = fabsf(cross_v2v2(edge_t0, edge_t1));
-                                                       if (f2x_area_uv > FLT_EPSILON) {
-                                                               float norm[3], v0[3], v1[3], f2x_surf_area, fsurf_ratio;
-                                                               sub_v3_v3v3(v0, p1, p0);
-                                                               sub_v3_v3v3(v1, p2, p0);
-                                                               cross_v3_v3v3(norm, v0, v1);
-
-                                                               f2x_surf_area = len_v3(norm);
-                                                               fsurf_ratio = f2x_surf_area / f2x_area_uv;  /* tri area divided by texture area */
-
-                                                               nr_accumulated++;
-                                                               dsum += (double)(fsurf_ratio);
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               /* finalize */
-               {
-                       const float avg_area_ratio = (nr_accumulated > 0) ? ((float)(dsum / nr_accumulated)) : 1.0f;
-                       const float use_as_render_bump_scale = sqrtf(avg_area_ratio);       // use width of average surface ratio as your bump scale
-                       dm->auto_bump_scale = use_as_render_bump_scale;
-               }
-       }
-       else {
-               dm->auto_bump_scale = 1.0f;
-       }
-}
-
-void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, DMVertexAttribs *attribs)
-{
-       CustomData *vdata, *ldata;
-       int a, b, layer;
-       const bool is_editmesh = (dm->type == DM_TYPE_EDITBMESH);
-
-       /* From the layers requested by the GLSL shader, figure out which ones are
-        * actually available for this derivedmesh, and retrieve the pointers */
-
-       memset(attribs, 0, sizeof(DMVertexAttribs));
-
-       vdata = &dm->vertData;
-       ldata = dm->getLoopDataLayout(dm);
-       
-       /* calc auto bump scale if necessary */
-       if (dm->auto_bump_scale <= 0.0f)
-               DM_calc_auto_bump_scale(dm);
-
-       char tangent_names[MAX_MTFACE][MAX_NAME];
-       int tangent_names_count;
-       /* Add a tangent layer/layers. */
-       DM_calc_tangents_names_from_gpu(gattribs, tangent_names, &tangent_names_count);
-
-       if (tangent_names_count)
-               dm->calcLoopTangents(dm, false, (const char (*)[MAX_NAME])tangent_names, tangent_names_count);
-
-       for (b = 0; b < gattribs->totlayer; b++) {
-               int type = gattribs->layer[b].type;
-               layer = -1;
-               if (type == CD_AUTO_FROM_NAME) {
-                       /* We need to deduct what exact layer is used.
-                        *
-                        * We do it based on the specified name.
-                        */
-                       if (gattribs->layer[b].name[0]) {
-                               layer = CustomData_get_named_layer_index(ldata, CD_MLOOPUV, gattribs->layer[b].name);
-                               type = CD_MTFACE;
-                               if (layer == -1) {
-                                       layer = CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, gattribs->layer[b].name);
-                                       type = CD_MCOL;
-                               }
-                               if (layer == -1) {
-                                       layer = CustomData_get_named_layer_index(&dm->loopData, CD_TANGENT, gattribs->layer[b].name);
-                                       type = CD_TANGENT;
-                               }
-                               if (layer == -1) {
-                                       continue;
-                               }
-                       }
-                       else {
-                               /* Fall back to the UV layer, which matches old behavior. */
-                               type = CD_MTFACE;
-                       }
-               }
-               if (type == CD_MTFACE) {
-                       /* uv coordinates */
-                       if (layer == -1) {
-                               if (gattribs->layer[b].name[0])
-                                       layer = CustomData_get_named_layer_index(ldata, CD_MLOOPUV, gattribs->layer[b].name);
-                               else
-                                       layer = CustomData_get_active_layer_index(ldata, CD_MLOOPUV);
-                       }
-
-                       a = attribs->tottface++;
-
-                       if (layer != -1) {
-                               attribs->tface[a].array = is_editmesh ? NULL : ldata->layers[layer].data;
-                               attribs->tface[a].em_offset = ldata->layers[layer].offset;
-                       }
-                       else {
-                               attribs->tface[a].array = NULL;
-                               attribs->tface[a].em_offset = -1;
-                       }
-
-                       attribs->tface[a].gl_index = gattribs->layer[b].glindex;
-                       attribs->tface[a].gl_info_index = gattribs->layer[b].glinfoindoex;
-                       attribs->tface[a].gl_texco = gattribs->layer[b].gltexco;
-               }
-               else if (type == CD_MCOL) {
-                       if (layer == -1) {
-                               if (gattribs->layer[b].name[0])
-                                       layer = CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, gattribs->layer[b].name);
-                               else
-                                       layer = CustomData_get_active_layer_index(ldata, CD_MLOOPCOL);
-                       }
-
-                       a = attribs->totmcol++;
-
-                       if (layer != -1) {
-                               attribs->mcol[a].array = is_editmesh ? NULL : ldata->layers[layer].data;
-                               /* odd, store the offset for a different layer type here, but editmode draw code expects it */
-                               attribs->mcol[a].em_offset = ldata->layers[layer].offset;
-                       }
-                       else {
-                               attribs->mcol[a].array = NULL;
-                               attribs->mcol[a].em_offset = -1;
-                       }
-
-                       attribs->mcol[a].gl_index = gattribs->layer[b].glindex;
-                       attribs->mcol[a].gl_info_index = gattribs->layer[b].glinfoindoex;
-               }
-               else if (type == CD_TANGENT) {
-                       /* note, even with 'is_editmesh' this uses the derived-meshes loop data */
-                       if (layer == -1) {
-                               if (gattribs->layer[b].name[0])
-                                       layer = CustomData_get_named_layer_index(&dm->loopData, CD_TANGENT, gattribs->layer[b].name);
-                               else
-                                       layer = CustomData_get_active_layer_index(&dm->loopData, CD_TANGENT);
-                       }
-
-                       a = attribs->tottang++;
-
-                       if (layer != -1) {
-                               attribs->tang[a].array = dm->loopData.layers[layer].data;
-                               attribs->tang[a].em_offset = dm->loopData.layers[layer].offset;
-                       }
-                       else {
-                               attribs->tang[a].array = NULL;
-                               attribs->tang[a].em_offset = -1;
-                       }
-
-                       attribs->tang[a].gl_index = gattribs->layer[b].glindex;
-                       attribs->tang[a].gl_info_index = gattribs->layer[b].glinfoindoex;
-               }
-               else if (type == CD_ORCO) {
-                       /* original coordinates */
-                       if (layer == -1) {
-                               layer = CustomData_get_layer_index(vdata, CD_ORCO);
-                       }
-                       attribs->totorco = 1;
-
-                       if (layer != -1) {
-                               attribs->orco.array = vdata->layers[layer].data;
-                               attribs->orco.em_offset = vdata->layers[layer].offset;
-                       }
-                       else {
-                               attribs->orco.array = NULL;
-                               attribs->orco.em_offset = -1;
-                       }
-
-                       attribs->orco.gl_index = gattribs->layer[b].glindex;
-                       attribs->orco.gl_texco = gattribs->layer[b].gltexco;
-                       attribs->orco.gl_info_index = gattribs->layer[b].glinfoindoex;
-               }
-       }
-}
-
-/**
- * Set vertex shader attribute inputs for a particular tessface vert
- *
- * \param a: tessface index
- * \param index: vertex index
- * \param vert: corner index (0, 1, 2, 3)
- * \param loop: absolute loop corner index
- */
-void DM_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index, int vert, int loop)
-{
-       const float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f};
-       int b;
-
-       UNUSED_VARS(a, vert);
-
-       /* orco texture coordinates */
-       if (attribs->totorco) {
-               /*const*/ float (*array)[3] = attribs->orco.array;
-               const float *orco = (array) ? array[index] : zero;
-
-               if (attribs->orco.gl_texco)
-                       glTexCoord3fv(orco);
-               else
-                       glVertexAttrib3fv(attribs->orco.gl_index, orco);
-       }
-
-       /* uv texture coordinates */
-       for (b = 0; b < attribs->tottface; b++) {
-               const float *uv;
-
-               if (attribs->tface[b].array) {
-                       const MLoopUV *mloopuv = &attribs->tface[b].array[loop];
-                       uv = mloopuv->uv;
-               }
-               else {
-                       uv = zero;
-               }
-
-               if (attribs->tface[b].gl_texco)
-                       glTexCoord2fv(uv);
-               else
-                       glVertexAttrib2fv(attribs->tface[b].gl_index, uv);
-       }
-
-       /* vertex colors */
-       for (b = 0; b < attribs->totmcol; b++) {
-               GLfloat col[4];
-
-               if (attribs->mcol[b].array) {
-                       const MLoopCol *cp = &attribs->mcol[b].array[loop];
-                       rgba_uchar_to_float(col, &cp->r);
-               }
-               else {
-                       zero_v4(col);
-               }
-
-               glVertexAttrib4fv(attribs->mcol[b].gl_index, col);
-       }
-
-       /* tangent for normal mapping */
-       for (b = 0; b < attribs->tottang; b++) {
-               if (attribs->tang[b].array) {
-                       /*const*/ float (*array)[4] = attribs->tang[b].array;
-                       const float *tang = (array) ? array[loop] : zero;
-                       glVertexAttrib4fv(attribs->tang[b].gl_index, tang);
-               }
-       }
-}
-
-void DM_draw_attrib_vertex_uniforms(const DMVertexAttribs *attribs)
-{
-       int i;
-       if (attribs->totorco) {
-               if (attribs->orco.gl_info_index != -1) {
-                       glUniform1i(attribs->orco.gl_info_index, 0);
-               }
-       }
-       for (i = 0; i < attribs->tottface; i++) {
-               if (attribs->tface[i].gl_info_index != -1) {
-                       glUniform1i(attribs->tface[i].gl_info_index, 0);
-               }
-       }
-       for (i = 0; i < attribs->totmcol; i++) {
-               if (attribs->mcol[i].gl_info_index != -1) {
-                       glUniform1i(attribs->mcol[i].gl_info_index, GPU_ATTR_INFO_SRGB);
-               }
-       }
-
-       for (i = 0; i < attribs->tottang; i++) {
-               if (attribs->tang[i].gl_info_index != -1) {
-                       glUniform1i(attribs->tang[i].gl_info_index, 0);
-               }
-       }
-}
-
 /* Set object's bounding box based on DerivedMesh min/max data */
 void DM_set_object_boundbox(Object *ob, DerivedMesh *dm)
 {
index aa8fd6f..924179d 100644 (file)
@@ -602,36 +602,8 @@ char *BKE_animdata_driver_path_hack(bContext *C, PointerRNA *ptr, PropertyRNA *p
                Object *ob = CTX_data_active_object(C);
 
                if (ob && id) {
-                       /* only id-types which can be remapped to go through objects should be considered */
-                       switch (GS(id->name)) {
-                               case ID_TE: /* textures */
-                               {
-                                       Material *ma = give_current_material(ob, ob->actcol);
-                                       Tex *tex = give_current_material_texture(ma);
-
-                                       /* assumes: texture will only be shown if it is active material's active texture it's ok */
-                                       if ((ID *)tex == id) {
-                                               char name_esc_ma[(sizeof(ma->id.name) - 2) * 2];
-                                               char name_esc_tex[(sizeof(tex->id.name) - 2) * 2];
-
-                                               BLI_strescape(name_esc_ma, ma->id.name + 2, sizeof(name_esc_ma));
-                                               BLI_strescape(name_esc_tex, tex->id.name + 2, sizeof(name_esc_tex));
-
-                                               /* create new path */
-                                               // TODO: use RNA path functions to construct step by step instead?
-                                               // FIXME: maybe this isn't even needed anymore...
-                                               path = BLI_sprintfN("material_slots[\"%s\"].material.texture_slots[\"%s\"].texture.%s",
-                                                                   name_esc_ma, name_esc_tex, basepath);
-
-                                               /* free old one */
-                                               if (basepath != base_path)
-                                                       MEM_freeN(basepath);
-                                       }
-                                       break;
-                               }
-                               default:
-                                       break;
-                       }
+                       /* TODO: after material textures were removed, this function serves
+                        * no purpose anymore, but could be used again so was not removed. */
 
                        /* fix RNA pointer, as we've now changed the ID root by changing the paths */
                        if (basepath != path) {
index e9a8de4..259c518 100644 (file)
@@ -580,14 +580,6 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int
                        }
                        break;
                }
-               case ID_TE:
-               {
-                       Tex *tex = (Tex *)id;
-                       if (tex->type == TEX_VOXELDATA && TEX_VD_IS_SOURCE_PATH(tex->vd->file_format)) {
-                               rewrite_path_fixed(tex->vd->source_path, visit_cb, absbase, bpath_user_data);
-                       }
-                       break;
-               }
                case ID_SCE:
                {
                        Scene *scene = (Scene *)id;
index 7676baa..2c5cdc3 100644 (file)
@@ -304,10 +304,7 @@ void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int win
        float pixsize, viewfac, sensor_size, dx, dy;
        int sensor_fit;
 
-       /* fields rendering */
        params->ycor = yasp / xasp;
-       if (params->use_fields)
-               params->ycor *= 2.0f;
 
        if (params->is_ortho) {
                /* orthographic camera */
@@ -349,18 +346,6 @@ void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int win
        viewplane.xmax += dx;
        viewplane.ymax += dy;
 
-       /* fields offset */
-       if (params->field_second) {
-               if (params->field_odd) {
-                       viewplane.ymin -= 0.5f * params->ycor;
-                       viewplane.ymax -= 0.5f * params->ycor;
-               }
-               else {
-                       viewplane.ymin += 0.5f * params->ycor;
-                       viewplane.ymax += 0.5f * params->ycor;
-               }
-       }
-
        /* the window matrix is used for clipping, and not changed during OSA steps */
        /* using an offset of +0.5 here would give clip errors on edges */
        viewplane.xmin *= pixsize;