Blender  V2.93
COM_defines.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #pragma once
20 
22 
27 enum class DataType {
29  Value = 0,
31  Vector = 1,
33  Color = 2,
34 };
35 
39 constexpr int COM_data_type_num_channels(const DataType datatype)
40 {
41  switch (datatype) {
42  case DataType::Value:
43  return 1;
44  case DataType::Vector:
45  return 3;
46  case DataType::Color:
47  default:
48  return 4;
49  }
50 }
51 
54 
55 // configurable items
56 
57 // chunk size determination
58 // #define COM_DEBUG
59 
60 // chunk order
65 enum class ChunkOrdering {
67  CenterOut = 0,
69  Random = 1,
71  TopDown = 2,
73  RuleOfThirds = 3,
74 
76 };
77 
78 constexpr float COM_PREVIEW_SIZE = 140.f;
79 constexpr float COM_RULE_OF_THIRDS_DIVIDER = 100.0f;
80 constexpr float COM_BLUR_BOKEH_PIXELS = 512;
81 
82 } // namespace blender::compositor
ChunkOrdering
The order of chunks to be scheduled.
Definition: COM_defines.h:65
@ RuleOfThirds
experimental ordering with 9 hot-spots.
@ CenterOut
order from a distance to centerX/centerY
DataType
possible data types for sockets
Definition: COM_defines.h:27
@ Vector
Vector data type.
constexpr int COM_DATA_TYPE_VALUE_CHANNELS
Definition: COM_defines.h:52
constexpr int COM_DATA_TYPE_COLOR_CHANNELS
Definition: COM_defines.h:53
constexpr float COM_PREVIEW_SIZE
Definition: COM_defines.h:78
constexpr float COM_RULE_OF_THIRDS_DIVIDER
Definition: COM_defines.h:79
constexpr float COM_BLUR_BOKEH_PIXELS
Definition: COM_defines.h:80
constexpr int COM_data_type_num_channels(const DataType datatype)
Definition: COM_defines.h:39