2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2012-01-18 06:11:56 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
import bpy
|
|
|
|
from bpy.types import (
|
|
|
|
Menu,
|
|
|
|
Panel,
|
|
|
|
UIList,
|
|
|
|
)
|
2015-01-27 17:46:07 +11:00
|
|
|
from bpy.types import (
|
2017-03-20 09:43:18 +11:00
|
|
|
Brush,
|
|
|
|
FreestyleLineStyle,
|
|
|
|
ParticleSettings,
|
|
|
|
Texture,
|
|
|
|
)
|
2012-01-18 06:11:56 +00:00
|
|
|
|
2010-01-08 08:54:41 +00:00
|
|
|
from rna_prop_ui import PropertyPanel
|
2017-10-21 12:41:42 +11:00
|
|
|
from .properties_paint_common import brush_texture_settings
|
2012-05-15 04:50:47 +00:00
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_MT_specials(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Texture Specials"
|
2018-04-16 14:07:42 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
2010-03-09 09:17:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-03-29 05:37:34 +00:00
|
|
|
layout.operator("texture.slot_copy", icon='COPYDOWN')
|
|
|
|
layout.operator("texture.slot_paste", icon='PASTEDOWN')
|
2010-03-09 09:17:45 +00:00
|
|
|
|
|
|
|
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
class TEXTURE_UL_texslots(UIList):
|
2017-03-20 09:43:18 +11:00
|
|
|
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
|
|
|
slot = item
|
|
|
|
tex = slot.texture if slot else None
|
2018-07-25 14:01:01 +02:00
|
|
|
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
2013-11-23 20:37:23 +01:00
|
|
|
if tex:
|
|
|
|
layout.prop(tex, "name", text="", emboss=False, icon_value=icon)
|
|
|
|
else:
|
|
|
|
layout.label(text="", icon_value=icon)
|
2015-04-14 10:29:11 +10:00
|
|
|
elif self.layout_type == 'GRID':
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
layout.alignment = 'CENTER'
|
2013-02-08 16:01:21 +00:00
|
|
|
layout.label(text="", icon_value=icon)
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
|
|
|
|
|
2009-10-12 14:38:35 +00:00
|
|
|
def context_tex_datablock(context):
|
2009-11-14 13:35:44 +00:00
|
|
|
idblock = context.brush
|
2011-02-12 14:38:34 +00:00
|
|
|
if idblock:
|
|
|
|
return idblock
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2014-05-03 18:51:53 +09:00
|
|
|
idblock = context.line_style
|
|
|
|
if idblock:
|
|
|
|
return idblock
|
|
|
|
|
2011-02-12 14:38:34 +00:00
|
|
|
if context.particle_system:
|
|
|
|
idblock = context.particle_system.settings
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2009-11-14 13:35:44 +00:00
|
|
|
return idblock
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class TextureButtonsPanel:
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "texture"
|
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
|
|
|
class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
|
|
|
|
bl_label = "Preview"
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
tex = context.texture
|
2017-10-16 17:15:03 -02:00
|
|
|
return tex and (tex.type != 'NONE' or tex.use_nodes) and (context.engine in cls.COMPAT_ENGINES)
|
2010-08-09 01:37:09 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
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")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2018-06-05 16:35:20 +02:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
class TEXTURE_PT_context(TextureButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = ""
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
bl_context = "texture"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
tex = context.texture
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
space = context.space_data
|
2010-12-07 12:51:03 +00:00
|
|
|
pin_id = space.pin_id
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
use_pin_id = space.use_pin_id
|
|
|
|
user = context.texture_user
|
2010-12-07 12:51:03 +00:00
|
|
|
|
2018-07-15 01:15:32 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if not (use_pin_id and isinstance(pin_id, bpy.types.Texture)):
|
This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...
I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).
This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).
Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.
Thanks to Brecht for reviewing.
2013-05-17 07:10:10 +00:00
|
|
|
pin_id = None
|
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if not pin_id:
|
2018-07-15 01:15:32 +02:00
|
|
|
col.template_texture_user()
|
This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...
I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).
This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).
Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.
Thanks to Brecht for reviewing.
2013-05-17 07:10:10 +00:00
|
|
|
|
2018-07-15 01:15:32 +02:00
|
|
|
if user or pin_id:
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if pin_id:
|
|
|
|
col.template_ID(space, "pin_id")
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
propname = context.texture_user_property.identifier
|
|
|
|
col.template_ID(user, propname, new="texture.new")
|
|
|
|
|
|
|
|
if tex:
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.2)
|
2018-07-15 01:15:32 +02:00
|
|
|
split.label(text="Type")
|
2010-08-06 15:17:44 +00:00
|
|
|
split.prop(tex, "type", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
class TEXTURE_PT_node(TextureButtonsPanel, Panel):
|
|
|
|
bl_label = "Node"
|
|
|
|
bl_context = "texture"
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
node = context.texture_node
|
|
|
|
return node and (context.engine in cls.COMPAT_ENGINES)
|
2010-08-12 19:36:10 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
node = context.texture_node
|
|
|
|
ntree = node.id_data
|
|
|
|
layout.template_node_view(ntree, node, None)
|
2010-08-12 19:36:10 +00:00
|
|
|
|
2011-12-05 22:19:30 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
|
|
|
|
bl_label = "Mapping"
|
|
|
|
bl_context = "texture"
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
node = context.texture_node
|
|
|
|
# TODO(sergey): perform a faster/nicer check?
|
2018-12-18 15:01:03 +11:00
|
|
|
return node and hasattr(node, "texture_mapping") and (context.engine in cls.COMPAT_ENGINES)
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
|
|
|
node = context.texture_node
|
|
|
|
|
|
|
|
mapping = node.texture_mapping
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(mapping, "vector_type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = col.column(align=True)
|
|
|
|
col.prop(mapping, "mapping_x", text="Projection X")
|
|
|
|
col.prop(mapping, "mapping_y", text="Y")
|
|
|
|
col.prop(mapping, "mapping_z", text="Z")
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.column().prop(mapping, "translation")
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.column().prop(mapping, "rotation")
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.column().prop(mapping, "scale")
|
2010-01-08 08:54:41 +00:00
|
|
|
|
|
|
|
|
2009-08-17 18:37:58 +00:00
|
|
|
class TextureTypePanel(TextureButtonsPanel):
|
2010-08-09 01:37:09 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
tex = context.texture
|
2017-10-16 17:15:03 -02:00
|
|
|
engine = context.engine
|
2010-08-09 01:37:09 +00:00
|
|
|
return tex and ((tex.type == cls.tex_type and not tex.use_nodes) and (engine in cls.COMPAT_ENGINES))
|
2009-08-17 18:37:58 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_clouds(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Clouds"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'CLOUDS'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(tex, "noise_type", text="Type")
|
|
|
|
|
|
|
|
col.separator()
|
2009-11-12 15:41:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "cloud_type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "noise_depth", text="Depth")
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "nabla", text="Nabla")
|
2009-05-22 12:07:03 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_wood(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Wood"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'WOOD'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "wood_type")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis_2", text="Second Basis")
|
|
|
|
|
|
|
|
col = col.column()
|
|
|
|
col.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
|
|
|
|
col.prop(tex, "noise_type", text="Type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
sub = flow.column()
|
|
|
|
sub.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
|
|
|
|
sub.prop(tex, "noise_scale", text="Size")
|
|
|
|
sub.prop(tex, "turbulence")
|
|
|
|
sub.prop(tex, "nabla")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_marble(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Marble"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'MARBLE'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(tex, "marble_type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis_2", text="Second Basis")
|
|
|
|
col.prop(tex, "noise_type", text="Type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "noise_depth", text="Depth")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(tex, "turbulence")
|
|
|
|
col.prop(tex, "nabla")
|
2009-05-22 12:07:03 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_magic(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Magic"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'MAGIC'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_depth", text="Depth")
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "turbulence")
|
2009-05-22 12:07:03 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_blend(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Blend"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'BLEND'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "progression")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.active = (tex.progression in {'LINEAR', 'QUADRATIC', 'EASING', 'RADIAL'})
|
|
|
|
col.prop(tex, "use_flip_axis", text="Orientation")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_stucci(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Stucci"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'STUCCI'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
|
|
|
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.row().prop(tex, "stucci_type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_type", text="Type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "turbulence")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_image(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Image"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'IMAGE'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-09-16 18:47:42 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
def draw(self, context):
|
|
|
|
# TODO: maybe expose the template_ID from the template image here.
|
|
|
|
layout = self.layout
|
|
|
|
del layout
|
|
|
|
|
|
|
|
|
|
|
|
class TEXTURE_PT_image_settings(TextureTypePanel, Panel):
|
|
|
|
bl_label = "Settings"
|
|
|
|
bl_parent_id = 'TEXTURE_PT_image'
|
|
|
|
tex_type = 'IMAGE'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-21 12:57:55 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
tex = context.texture
|
|
|
|
layout.template_image(tex, "image", tex.image_user)
|
2009-07-21 12:57:55 +00:00
|
|
|
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2010-03-11 07:43:49 +00:00
|
|
|
def texture_filter_common(tex, layout):
|
2018-07-10 18:21:44 +02:00
|
|
|
layout.prop(tex, "filter_type", text="Filter Type")
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2011-03-07 13:23:45 +00:00
|
|
|
if tex.use_mipmap and tex.filter_type in {'AREA', 'EWA', 'FELINE'}:
|
2018-07-25 14:01:01 +02:00
|
|
|
col = layout.column()
|
2010-08-22 16:33:26 +00:00
|
|
|
if tex.filter_type == 'FELINE':
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "filter_lightprobes", text="Light Probes")
|
2010-03-14 23:26:17 +00:00
|
|
|
else:
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "filter_eccentricity", text="Eccentricity")
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
layout.prop(tex, "filter_size", text="Size")
|
|
|
|
layout.prop(tex, "use_filter_size_min", text="Minimum Size")
|
2010-03-11 07:43:49 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
|
2018-07-10 18:21:44 +02:00
|
|
|
bl_label = "Sampling"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-07-10 18:21:44 +02:00
|
|
|
bl_parent_id = 'TEXTURE_PT_image'
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'IMAGE'
|
2018-07-13 18:12:19 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-10 18:21:44 +02:00
|
|
|
layout.use_property_split = True
|
2018-07-25 14:01:01 +02:00
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "use_interpolation")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
col.separator()
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
col = flow.column()
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(tex, "use_mipmap")
|
2018-07-10 18:21:44 +02:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = tex.use_mipmap
|
|
|
|
sub.prop(tex, "use_mipmap_gauss", text="Gaussian Filter")
|
|
|
|
|
|
|
|
col.separator()
|
2009-05-22 12:07:03 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
texture_filter_common(tex, flow)
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
class TEXTURE_PT_image_alpha(TextureTypePanel, Panel):
|
|
|
|
bl_label = "Alpha"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = 'TEXTURE_PT_image'
|
2018-07-13 18:12:19 +02:00
|
|
|
tex_type = 'IMAGE'
|
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2018-07-10 18:21:44 +02:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
tex = context.texture
|
|
|
|
self.layout.prop(tex, "use_alpha", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = bool(tex.image and tex.image.use_alpha)
|
|
|
|
col.prop(tex, "use_calculate_alpha", text="Calculate")
|
|
|
|
col.prop(tex, "invert_alpha", text="Invert")
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
|
2018-07-10 18:21:44 +02:00
|
|
|
bl_label = "Mapping"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-07-10 18:21:44 +02:00
|
|
|
bl_parent_id = 'TEXTURE_PT_image'
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'IMAGE'
|
2018-07-13 18:12:19 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-10 18:21:44 +02:00
|
|
|
layout.use_property_split = True
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(tex, "use_flip_axis", text="Flip Axes")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
subcol = layout.column()
|
|
|
|
subcol.prop(tex, "extension") # use layout, to keep the same location in case of button cycling.
|
|
|
|
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if tex.extension == 'REPEAT':
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
col = flow.column()
|
2018-07-10 18:21:44 +02:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(tex, "repeat_x", text="Repeat X")
|
|
|
|
sub.prop(tex, "repeat_y", text="Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2018-07-10 18:21:44 +02:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = (tex.repeat_x > 1)
|
2018-07-25 14:01:01 +02:00
|
|
|
sub.prop(tex, "use_mirror_x", text="Mirror X")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = (tex.repeat_y > 1)
|
2018-07-25 14:01:01 +02:00
|
|
|
sub.prop(tex, "use_mirror_y", text="Y")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-10 18:21:44 +02:00
|
|
|
elif tex.extension == 'CHECKER':
|
2018-07-25 14:01:01 +02:00
|
|
|
subcol.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2018-07-10 18:21:44 +02:00
|
|
|
col.prop(tex, "checker_distance", text="Distance")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "use_checker_even", text="Tiles Even")
|
|
|
|
col.prop(tex, "use_checker_odd", text="Odd")
|
|
|
|
else:
|
|
|
|
del flow
|
|
|
|
|
|
|
|
|
|
|
|
class TEXTURE_PT_image_mapping_crop(TextureTypePanel, Panel):
|
|
|
|
bl_label = "Crop"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = 'TEXTURE_PT_image_mapping'
|
|
|
|
tex_type = 'IMAGE'
|
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
|
|
|
col = flow.column(align=True)
|
2016-02-01 00:47:10 +11:00
|
|
|
# col.prop(tex, "crop_rectangle")
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "crop_min_x", text="Minimum X")
|
|
|
|
col.prop(tex, "crop_min_y", text="Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(tex, "crop_max_x", text="Maximum X")
|
|
|
|
col.prop(tex, "crop_max_y", text="Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Musgrave"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'MUSGRAVE'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(tex, "musgrave_type")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "nabla")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "dimension_max", text="Dimension")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(tex, "lacunarity")
|
|
|
|
col.prop(tex, "octaves")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
2010-12-09 03:22:03 +00:00
|
|
|
musgrave_type = tex.musgrave_type
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
|
2011-03-07 13:23:45 +00:00
|
|
|
if musgrave_type in {'HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'}:
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(tex, "offset")
|
2015-05-28 18:05:29 +02:00
|
|
|
col.prop(tex, "noise_intensity", text="Intensity")
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2011-03-07 13:23:45 +00:00
|
|
|
if musgrave_type in {'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'}:
|
2010-12-09 03:22:03 +00:00
|
|
|
col.prop(tex, "gain")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Voronoi"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'VORONOI'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "distance_metric")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = tex.distance_metric == 'MINKOVSKY'
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(tex, "minkovsky_exponent", text="Exponent")
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
sub.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "color_mode")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "noise_intensity", text="Intensity")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "nabla")
|
|
|
|
|
|
|
|
|
|
|
|
class TEXTURE_PT_voronoi_feature_weights(TextureTypePanel, Panel):
|
|
|
|
bl_label = "Feature Weights"
|
|
|
|
bl_parent_id = "TEXTURE_PT_voronoi"
|
|
|
|
tex_type = 'VORONOI'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
|
|
|
|
|
|
|
tex = context.texture
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(tex, "weight_1", text="First", slider=True)
|
|
|
|
col.prop(tex, "weight_2", text="Second", slider=True)
|
|
|
|
|
|
|
|
sub = flow.column(align=True)
|
|
|
|
sub.prop(tex, "weight_3", text="Third", slider=True)
|
|
|
|
sub.prop(tex, "weight_4", text="Fourth", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Distorted Noise"
|
2009-10-31 19:31:45 +00:00
|
|
|
tex_type = 'DISTORTED_NOISE'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
tex = context.texture
|
2009-11-12 15:41:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "noise_basis", text="Noise Basis")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "noise_distortion", text="Distortion")
|
2009-11-14 13:35:44 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "distortion", text="Amount")
|
|
|
|
col.prop(tex, "noise_scale", text="Size")
|
|
|
|
col.prop(tex, "nabla")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
class TextureSlotPanel(TextureButtonsPanel):
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if not hasattr(context, "texture_slot"):
|
|
|
|
return False
|
2011-11-13 14:38:00 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
return (context.engine in cls.COMPAT_ENGINES)
|
2011-11-13 12:17:27 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Mapping"
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
idblock = context_tex_datablock(context)
|
2012-01-18 06:11:56 +00:00
|
|
|
if isinstance(idblock, Brush) and not context.sculpt_object:
|
2010-11-30 01:03:17 +00:00
|
|
|
return False
|
|
|
|
|
|
|
|
if not getattr(context, "texture_slot", None):
|
|
|
|
return False
|
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
engine = context.engine
|
2010-11-30 01:03:17 +00:00
|
|
|
return (engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True)
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
idblock = context_tex_datablock(context)
|
|
|
|
|
|
|
|
tex = context.texture_slot
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
if isinstance(idblock, Brush):
|
|
|
|
if context.sculpt_object or context.image_paint_object:
|
|
|
|
brush_texture_settings(layout, idblock, context.sculpt_object)
|
|
|
|
else:
|
|
|
|
col = flow.column()
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "texture_coords", text="Coordinates")
|
|
|
|
|
|
|
|
# Note: the ORCO case used to call ob.data, "texco_mesh" prop.
|
|
|
|
if tex.texture_coords == 'UV':
|
2010-11-30 01:03:17 +00:00
|
|
|
ob = context.object
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2010-11-30 01:03:17 +00:00
|
|
|
if ob and ob.type == 'MESH':
|
2018-08-24 10:51:53 +10:00
|
|
|
col.prop_search(tex, "uv_layer", ob.data, "uv_layers", text="Map")
|
2010-11-30 01:03:17 +00:00
|
|
|
else:
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "uv_layer", text="Map")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
elif tex.texture_coords == 'OBJECT':
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "object", text="Object")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2014-05-03 18:51:53 +09:00
|
|
|
elif tex.texture_coords == 'ALONG_STROKE':
|
2018-07-25 14:01:01 +02:00
|
|
|
col.prop(tex, "use_tips", text="Use Tips")
|
|
|
|
|
|
|
|
col.separator()
|
2014-05-03 18:51:53 +09:00
|
|
|
|
|
|
|
if isinstance(idblock, FreestyleLineStyle):
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "mapping", text="Projection")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "mapping_x", text="Mapping X")
|
|
|
|
col.prop(tex, "mapping_y", text="Y")
|
|
|
|
col.prop(tex, "mapping_z", text="Z")
|
2014-05-03 18:51:53 +09:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2014-05-03 18:51:53 +09:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column(align=True)
|
|
|
|
col.column().prop(tex, "offset")
|
|
|
|
|
|
|
|
col = flow.column(align=True)
|
|
|
|
col.column().prop(tex, "scale")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Influence"
|
2018-07-25 14:01:01 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
idblock = context_tex_datablock(context)
|
2012-01-18 06:11:56 +00:00
|
|
|
if isinstance(idblock, Brush):
|
2010-11-30 01:03:17 +00:00
|
|
|
return False
|
|
|
|
|
|
|
|
if not getattr(context, "texture_slot", None):
|
|
|
|
return False
|
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
engine = context.engine
|
2010-11-30 01:03:17 +00:00
|
|
|
return (engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-07-25 14:01:01 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
idblock = context_tex_datablock(context)
|
|
|
|
tex = context.texture_slot
|
|
|
|
|
2010-12-08 05:51:16 +00:00
|
|
|
def factor_but(layout, toggle, factor, name):
|
2010-11-30 01:03:17 +00:00
|
|
|
row = layout.row(align=True)
|
2018-07-25 14:01:01 +02:00
|
|
|
row.active = getattr(tex, toggle)
|
|
|
|
|
|
|
|
row.prop(tex, factor, text=name, slider=True)
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2018-07-25 14:01:01 +02:00
|
|
|
sub.prop(tex, toggle, text="")
|
2011-01-01 07:20:34 +00:00
|
|
|
return sub # XXX, temp. use_map_normal needs to override.
|
2010-11-30 01:03:17 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
if isinstance(idblock, ParticleSettings):
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
factor_but(col, "use_map_time", "time_factor", "General Time")
|
2011-09-21 15:18:38 +00:00
|
|
|
factor_but(col, "use_map_life", "life_factor", "Lifetime")
|
|
|
|
factor_but(col, "use_map_density", "density_factor", "Density")
|
|
|
|
factor_but(col, "use_map_size", "size_factor", "Size")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
factor_but(col, "use_map_velocity", "velocity_factor", "Physics Velocity")
|
2011-09-21 15:18:38 +00:00
|
|
|
factor_but(col, "use_map_damp", "damp_factor", "Damp")
|
|
|
|
factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
|
|
|
|
factor_but(col, "use_map_field", "field_factor", "Force Fields")
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
factor_but(col, "use_map_length", "length_factor", "Hair Length")
|
2011-09-21 15:18:38 +00:00
|
|
|
factor_but(col, "use_map_clump", "clump_factor", "Clump")
|
2018-02-15 11:22:44 +01:00
|
|
|
factor_but(col, "use_map_twist", "twist_factor", "Twist")
|
2011-02-16 02:25:03 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2015-01-14 12:29:19 +01:00
|
|
|
factor_but(col, "use_map_kink_amp", "kink_amp_factor", "Kink Amplitude")
|
2015-01-14 12:03:55 +01:00
|
|
|
factor_but(col, "use_map_kink_freq", "kink_freq_factor", "Kink Frequency")
|
2011-09-21 15:18:38 +00:00
|
|
|
factor_but(col, "use_map_rough", "rough_factor", "Rough")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2014-05-03 18:51:53 +09:00
|
|
|
elif isinstance(idblock, FreestyleLineStyle):
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2014-05-03 18:51:53 +09:00
|
|
|
factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
|
|
|
|
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
|
|
|
|
|
2012-01-18 06:11:56 +00:00
|
|
|
if not isinstance(idblock, ParticleSettings):
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "blend_type", text="Blend")
|
2011-02-12 14:38:34 +00:00
|
|
|
col.prop(tex, "use_rgb_to_intensity")
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2011-10-17 06:58:07 +00:00
|
|
|
# color is used on gray-scale textures even when use_rgb_to_intensity is disabled.
|
2011-02-12 14:38:34 +00:00
|
|
|
col.prop(tex, "color", text="")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(tex, "invert", text="Negative")
|
2011-02-12 14:38:34 +00:00
|
|
|
col.prop(tex, "use_stencil")
|
2010-11-30 01:03:17 +00:00
|
|
|
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
class TextureColorsPoll:
|
2018-07-10 18:22:16 +02:00
|
|
|
@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)
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
class TEXTURE_PT_colors(TextureButtonsPanel, TextureColorsPoll, Panel):
|
|
|
|
bl_label = "Colors"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2018-07-25 14:01:01 +02:00
|
|
|
|
2018-07-10 18:22:16 +02:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
2018-07-25 14:01:01 +02:00
|
|
|
flow = layout.grid_flow(row_major=False, columns=0, even_columns=False, even_rows=False, align=False)
|
2018-07-10 18:22:16 +02:00
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col = flow.column()
|
|
|
|
col.prop(tex, "use_clamp", text="Clamp")
|
|
|
|
|
|
|
|
col = flow.column(align=True)
|
|
|
|
col.prop(tex, "factor_red", text="Multiply R")
|
|
|
|
col.prop(tex, "factor_green", text="G")
|
|
|
|
col.prop(tex, "factor_blue", text="B")
|
2018-07-10 18:22:16 +02:00
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col = flow.column()
|
2018-07-10 18:22:16 +02:00
|
|
|
col.prop(tex, "intensity")
|
|
|
|
col.prop(tex, "contrast")
|
|
|
|
col.prop(tex, "saturation")
|
|
|
|
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
class TEXTURE_PT_colors_ramp(TextureButtonsPanel, TextureColorsPoll, Panel):
|
|
|
|
bl_label = "Color Ramp"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_parent_id = 'TEXTURE_PT_colors'
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2018-07-25 14:01:01 +02:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
tex = context.texture
|
|
|
|
self.layout.prop(tex, "use_color_ramp", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
tex = context.texture
|
|
|
|
|
|
|
|
# Note: TODO after creation of a new texture, the template_color_ramp will be blank.
|
|
|
|
# Possibly needs to be fixed in the template itself.
|
|
|
|
is_active = bool(tex and tex.use_color_ramp)
|
|
|
|
if is_active:
|
2018-07-10 18:22:16 +02:00
|
|
|
layout.template_color_ramp(tex, "color_ramp", expand=True)
|
2018-07-25 14:01:01 +02:00
|
|
|
else:
|
|
|
|
layout.alignment = 'RIGHT'
|
2018-09-04 18:44:05 +10:00
|
|
|
layout.label(text="Enable the Color Ramp first")
|
2018-07-10 18:22:16 +02:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
|
2018-11-26 19:00:01 +01:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
|
2010-08-12 19:36:10 +00:00
|
|
|
_context_path = "texture"
|
2012-01-18 06:11:56 +00:00
|
|
|
_property_type = Texture
|
2011-04-04 10:13:04 +00:00
|
|
|
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.texture and (context.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
|
|
|
|
classes = (
|
|
|
|
TEXTURE_MT_specials,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_UL_texslots,
|
|
|
|
TEXTURE_PT_preview,
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
TEXTURE_PT_context,
|
|
|
|
TEXTURE_PT_node,
|
|
|
|
TEXTURE_PT_node_mapping,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_PT_clouds,
|
|
|
|
TEXTURE_PT_wood,
|
|
|
|
TEXTURE_PT_marble,
|
|
|
|
TEXTURE_PT_magic,
|
|
|
|
TEXTURE_PT_blend,
|
|
|
|
TEXTURE_PT_stucci,
|
2017-03-18 20:03:24 +11:00
|
|
|
TEXTURE_PT_image,
|
2018-07-25 14:01:01 +02:00
|
|
|
TEXTURE_PT_image_settings,
|
2018-07-10 18:21:44 +02:00
|
|
|
TEXTURE_PT_image_alpha,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_PT_image_mapping,
|
2018-07-25 14:01:01 +02:00
|
|
|
TEXTURE_PT_image_mapping_crop,
|
|
|
|
TEXTURE_PT_image_sampling,
|
2017-03-18 20:03:24 +11:00
|
|
|
TEXTURE_PT_musgrave,
|
|
|
|
TEXTURE_PT_voronoi,
|
2018-07-25 14:01:01 +02:00
|
|
|
TEXTURE_PT_voronoi_feature_weights,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_PT_distortednoise,
|
2018-07-25 14:01:01 +02:00
|
|
|
TEXTURE_PT_influence,
|
|
|
|
TEXTURE_PT_mapping,
|
2018-07-10 18:22:16 +02:00
|
|
|
TEXTURE_PT_colors,
|
2018-07-25 14:01:01 +02:00
|
|
|
TEXTURE_PT_colors_ramp,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_PT_custom_props,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|