2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-01-20 11:09:26 +00:00
|
|
|
* 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
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2009-01-20 11:09:26 +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.
|
|
|
|
|
*
|
|
|
|
|
* 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-01-20 11:09:26 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup edrend
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2009-01-20 11:09:26 +00:00
|
|
|
|
2013-12-17 23:42:38 +06:00
|
|
|
struct ScrArea;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct bContext;
|
|
|
|
|
struct wmOperatorType;
|
2009-01-20 11:09:26 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
/* render_shading.c */
|
|
|
|
|
void OBJECT_OT_material_slot_add(struct wmOperatorType *ot);
|
|
|
|
|
void OBJECT_OT_material_slot_remove(struct wmOperatorType *ot);
|
|
|
|
|
void OBJECT_OT_material_slot_assign(struct wmOperatorType *ot);
|
|
|
|
|
void OBJECT_OT_material_slot_select(struct wmOperatorType *ot);
|
|
|
|
|
void OBJECT_OT_material_slot_deselect(struct wmOperatorType *ot);
|
2009-10-07 16:32:55 +00:00
|
|
|
void OBJECT_OT_material_slot_copy(struct wmOperatorType *ot);
|
2015-04-28 07:24:56 +10:00
|
|
|
void OBJECT_OT_material_slot_move(struct wmOperatorType *ot);
|
2019-07-31 12:04:52 -07:00
|
|
|
void OBJECT_OT_material_slot_remove_unused(struct wmOperatorType *ot);
|
2009-01-20 11:09:26 +00:00
|
|
|
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void MATERIAL_OT_new(struct wmOperatorType *ot);
|
UI: Redesigned data-block selectors
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
2020-12-18 18:12:11 +01:00
|
|
|
void MATERIAL_OT_duplicate(struct wmOperatorType *ot);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void TEXTURE_OT_new(struct wmOperatorType *ot);
|
UI: Redesigned data-block selectors
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
2020-12-18 18:12:11 +01:00
|
|
|
void TEXTURE_OT_duplicate(struct wmOperatorType *ot);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void WORLD_OT_new(struct wmOperatorType *ot);
|
UI: Redesigned data-block selectors
The previous design is rather old and has a couple of problems:
* Scalability: The current solution of adding little icon buttons next to the
data-block name field doesn't scale well. It only works if there's a small
number of operations. We need to be able to place more items there for better
data-block management. Especially with the introduction of library overrides.
* Discoverability: It's not obvious what some of the icons do. They appear and
disappear, but it's not obvious why some are available at times and others
not.
* Unclear Status: Currently their library status (linked, indirectly linked,
broken link, library override) isn't really clear.
* Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to
invoke alternative behaviors. This is not a usual pattern in Blender.
This patch does the following changes:
* Adds a menu to the right of the name button to access all kinds of operations
(create, delete, unlink, user management, library overrides, etc).
* Make good use of the "disabled hint" for tooltips, to explain why buttons are
disabled. The UI team wants to establish this as a good practise.
* Use superimposed icons for duplicate and unlink, rather than extra buttons
(uses less space, looks less distracting and is a nice + consistent design
language).
* Remove fake user and user count button, they are available from the menu now.
* Support tooltips for superimposed icons (committed mouse hover feedback to
master already).
* Slightly increase size of the name button - it was already a bit small
before, and the move from real buttons to superimposed icons reduces usable
space for the name itself.
* More clearly differentiate between duplicate and creating a new data-block.
The latter is only available in the menu.
* Display library status icon on the left (linked, missing library, overridden,
asset)
* Disables "Make Single User" button - in review we weren't sure if there are
good use-cases for it, so better to see if we can remove it.
Note that I do expect some aspects of this design to change still. I think some
changes are problematic, but others disagreed. I will open a feedback thread on
devtalk to see what others think.
Differential Revision: https://developer.blender.org/D8554
Reviewed by: Bastien Montagne
Design discussed and agreed on with the UI team, also see T79959.
2020-12-18 18:12:11 +01:00
|
|
|
void WORLD_OT_duplicate(struct wmOperatorType *ot);
|
2009-01-20 11:09:26 +00:00
|
|
|
|
2010-01-28 17:31:11 +00:00
|
|
|
void MATERIAL_OT_copy(struct wmOperatorType *ot);
|
|
|
|
|
void MATERIAL_OT_paste(struct wmOperatorType *ot);
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
void SCENE_OT_view_layer_add(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_view_layer_remove(struct wmOperatorType *ot);
|
2020-12-04 08:13:54 +01:00
|
|
|
void SCENE_OT_view_layer_add_aov(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_view_layer_remove_aov(struct wmOperatorType *ot);
|
2012-12-20 07:57:26 +00:00
|
|
|
|
2018-07-10 15:02:25 +02:00
|
|
|
void SCENE_OT_light_cache_bake(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_light_cache_free(struct wmOperatorType *ot);
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
void SCENE_OT_render_view_add(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_render_view_remove(struct wmOperatorType *ot);
|
|
|
|
|
|
2012-12-20 07:57:26 +00:00
|
|
|
#ifdef WITH_FREESTYLE
|
2009-10-07 05:16:23 +00:00
|
|
|
void SCENE_OT_freestyle_module_add(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_module_remove(struct wmOperatorType *ot);
|
2010-06-25 22:45:42 +00:00
|
|
|
void SCENE_OT_freestyle_module_move(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_lineset_add(struct wmOperatorType *ot);
|
2011-11-13 21:55:13 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_copy(struct wmOperatorType *ot);
|
2011-11-20 23:44:50 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_paste(struct wmOperatorType *ot);
|
2010-06-25 22:45:42 +00:00
|
|
|
void SCENE_OT_freestyle_lineset_remove(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_lineset_move(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_linestyle_new(struct wmOperatorType *ot);
|
2010-07-20 17:57:33 +00:00
|
|
|
void SCENE_OT_freestyle_color_modifier_add(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_alpha_modifier_add(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_thickness_modifier_add(struct wmOperatorType *ot);
|
2011-08-19 14:05:11 +00:00
|
|
|
void SCENE_OT_freestyle_geometry_modifier_add(struct wmOperatorType *ot);
|
2010-07-20 17:57:33 +00:00
|
|
|
void SCENE_OT_freestyle_modifier_remove(struct wmOperatorType *ot);
|
|
|
|
|
void SCENE_OT_freestyle_modifier_move(struct wmOperatorType *ot);
|
2012-08-02 20:30:23 +00:00
|
|
|
void SCENE_OT_freestyle_modifier_copy(struct wmOperatorType *ot);
|
2014-06-28 19:18:47 +09:00
|
|
|
void SCENE_OT_freestyle_stroke_material_create(struct wmOperatorType *ot);
|
2012-12-20 07:57:26 +00:00
|
|
|
#endif
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
|
2010-03-29 05:37:34 +00:00
|
|
|
void TEXTURE_OT_slot_copy(struct wmOperatorType *ot);
|
|
|
|
|
void TEXTURE_OT_slot_paste(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
void TEXTURE_OT_slot_move(struct wmOperatorType *ot);
|
|
|
|
|
|
2010-03-08 16:36:53 +00:00
|
|
|
/* render_internal.c */
|
|
|
|
|
void RENDER_OT_render(struct wmOperatorType *ot);
|
2015-10-27 19:00:51 +05:00
|
|
|
void RENDER_OT_shutter_curve_preset(struct wmOperatorType *ot);
|
2010-03-08 16:36:53 +00:00
|
|
|
|
2011-05-19 11:34:11 +00:00
|
|
|
/* render_view.c */
|
2015-10-07 00:27:27 +11:00
|
|
|
struct ScrArea *render_view_open(struct bContext *C, int mx, int my, struct ReportList *reports);
|
2011-05-19 11:34:11 +00:00
|
|
|
|
|
|
|
|
void RENDER_OT_view_show(struct wmOperatorType *ot);
|
|
|
|
|
void RENDER_OT_view_cancel(struct wmOperatorType *ot);
|
2009-10-12 16:00:39 +00:00
|
|
|
|
2010-03-08 16:36:53 +00:00
|
|
|
/* render_opengl.c */
|
|
|
|
|
void RENDER_OT_opengl(struct wmOperatorType *ot);
|