Merge branch 'master' into sculpt-dev

This commit is contained in:
Pablo Dobarro 2021-03-24 20:55:05 +01:00
commit 20f4fe138e
317 changed files with 8333 additions and 1154 deletions

View File

@ -21,6 +21,7 @@
#include <assert.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -396,6 +396,10 @@ static void add_uvs(AlembicProcedural *proc,
ccl::set<chrono_t> times = get_relevant_sample_times(proc, time_sampling, uvs.getNumSamples());
/* Keys used to determine if the UVs do actually change over time. */
ArraySample::Key previous_indices_key;
ArraySample::Key previous_values_key;
foreach (chrono_t time, times) {
if (progress.get_cancel()) {
return;
@ -422,21 +426,32 @@ static void add_uvs(AlembicProcedural *proc,
float2 *data_float2 = reinterpret_cast<float2 *>(data.data());
const unsigned int *indices = uvsample.getIndices()->get();
const V2f *values = uvsample.getVals()->get();
const ArraySample::Key indices_key = uvsample.getIndices()->getKey();
const ArraySample::Key values_key = uvsample.getVals()->getKey();
for (const int3 &loop : *triangles_loops) {
unsigned int v0 = indices[loop.x];
unsigned int v1 = indices[loop.y];
unsigned int v2 = indices[loop.z];
if (indices_key == previous_indices_key && values_key == previous_values_key) {
attr.data.reuse_data_for_last_time(time);
}
else {
const unsigned int *indices = uvsample.getIndices()->get();
const V2f *values = uvsample.getVals()->get();
data_float2[0] = make_float2(values[v0][0], values[v0][1]);
data_float2[1] = make_float2(values[v1][0], values[v1][1]);
data_float2[2] = make_float2(values[v2][0], values[v2][1]);
data_float2 += 3;
for (const int3 &loop : *triangles_loops) {
unsigned int v0 = indices[loop.x];
unsigned int v1 = indices[loop.y];
unsigned int v2 = indices[loop.z];
data_float2[0] = make_float2(values[v0][0], values[v0][1]);
data_float2[1] = make_float2(values[v1][0], values[v1][1]);
data_float2[2] = make_float2(values[v2][0], values[v2][1]);
data_float2 += 3;
}
attr.data.add_data(data, time);
}
attr.data.add_data(data, time);
previous_indices_key = indices_key;
previous_values_key = values_key;
}
}
@ -736,6 +751,11 @@ void AlembicObject::load_all_data(AlembicProcedural *proc,
ccl::set<chrono_t> times = get_relevant_sample_times(
proc, *time_sampling, schema.getNumSamples());
/* Key used to determine if the triangles change over time, if the key is the same as the
* last one, we can avoid creating a new entry in the cache and simply point to the last
* frame. */
ArraySample::Key previous_key;
/* read topology */
foreach (chrono_t time, times) {
if (progress.get_cancel()) {
@ -747,22 +767,27 @@ void AlembicObject::load_all_data(AlembicProcedural *proc,
add_positions(sample.getPositions(), time, cached_data);
/* Only copy triangles for other frames if the topology is changing over time as well.
*
* TODO(@kevindietrich): even for dynamic simulations, this is a waste of memory and
* processing time if only the positions are changing in a subsequence of frames but we
* cannot optimize in this current system if the attributes are changing over time as well,
* as we need valid data for each time point. This can be solved by using reference counting
* on the ccl::array and simply share the array across frames. */
/* Only copy triangles for other frames if the topology is changing over time as well. */
if (schema.getTopologyVariance() != kHomogenousTopology || cached_data.triangles.size() == 0) {
/* start by reading the face sets (per face shader), as we directly split polygons to
* triangles
*/
array<int> polygon_to_shader;
read_face_sets(schema, polygon_to_shader, iss);
const ArraySample::Key key = sample.getFaceIndices()->getKey();
add_triangles(
sample.getFaceCounts(), sample.getFaceIndices(), time, cached_data, polygon_to_shader);
if (key == previous_key) {
cached_data.triangles.reuse_data_for_last_time(time);
cached_data.triangles_loops.reuse_data_for_last_time(time);
cached_data.shader.reuse_data_for_last_time(time);
}
else {
/* start by reading the face sets (per face shader), as we directly split polygons to
* triangles
*/
array<int> polygon_to_shader;
read_face_sets(schema, polygon_to_shader, iss);
add_triangles(
sample.getFaceCounts(), sample.getFaceIndices(), time, cached_data, polygon_to_shader);
}
previous_key = key;
}
if (normals.valid()) {

View File

@ -128,12 +128,25 @@ template<typename T> class CacheLookupResult {
* The data is supposed to be stored in chronological order, and is looked up using the current
* animation time in seconds using the TimeSampling from the Alembic property. */
template<typename T> class DataStore {
struct DataTimePair {
/* Holds information to map a cache entry for a given time to an index into the data array. */
struct TimeIndexPair {
/* Frame time for this entry. */
double time = 0;
T data{};
/* Frame time for the data pointed to by `index`. */
double source_time = 0;
/* Index into the data array. */
size_t index = 0;
};
vector<DataTimePair> data{};
/* This is the actual data that is stored. We deduplicate data across frames to avoid storing
* values if they have not changed yet (e.g. the triangles for a building before fracturing, or a
* fluid simulation before a break or splash) */
vector<T> data{};
/* This is used to map they entry for a given time to an index into the data array, multiple
* frames can point to the same index. */
vector<TimeIndexPair> index_data_map{};
Alembic::AbcCoreAbstract::TimeSampling time_sampling{};
double last_loaded_time = std::numeric_limits<double>::max();
@ -157,17 +170,21 @@ template<typename T> class DataStore {
return CacheLookupResult<T>::no_data_found_for_time();
}
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, data.size());
DataTimePair &data_pair = data[index_pair.first];
const TimeIndexPair &index = get_index_for_time(time);
if (last_loaded_time == data_pair.time) {
if (index.index == -1ul) {
return CacheLookupResult<T>::no_data_found_for_time();
}
if (last_loaded_time == index.time || last_loaded_time == index.source_time) {
return CacheLookupResult<T>::already_loaded();
}
last_loaded_time = data_pair.time;
last_loaded_time = index.source_time;
return CacheLookupResult<T>::new_data(&data_pair.data);
assert(index.index < data.size());
return CacheLookupResult<T>::new_data(&data[index.index]);
}
/* get the data for the specified time, but do not check if the data was already loaded for this
@ -178,22 +195,34 @@ template<typename T> class DataStore {
return CacheLookupResult<T>::no_data_found_for_time();
}
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, data.size());
DataTimePair &data_pair = data[index_pair.first];
return CacheLookupResult<T>::new_data(&data_pair.data);
const TimeIndexPair &index = get_index_for_time(time);
if (index.index == -1ul) {
return CacheLookupResult<T>::no_data_found_for_time();
}
assert(index.index < data.size());
return CacheLookupResult<T>::new_data(&data[index.index]);
}
void add_data(T &data_, double time)
{
index_data_map.push_back({time, time, data.size()});
if constexpr (is_array<T>::value) {
data.emplace_back();
data.back().data.steal_data(data_);
data.back().time = time;
data.back().steal_data(data_);
return;
}
data.push_back({time, data_});
data.push_back(data_);
}
void reuse_data_for_last_time(double time)
{
const TimeIndexPair &data_index = index_data_map.back();
index_data_map.push_back({time, data_index.source_time, data_index.index});
}
bool is_constant() const
@ -232,6 +261,14 @@ template<typename T> class DataStore {
T value = result.get_data();
node->set(*socket, value);
}
private:
const TimeIndexPair &get_index_for_time(double time) const
{
std::pair<size_t, Alembic::Abc::chrono_t> index_pair;
index_pair = time_sampling.getNearIndex(time, index_data_map.size());
return index_data_map[index_pair.first];
}
};
/* Actual cache for the stored data.

View File

@ -1917,9 +1917,12 @@ void GeometryManager::device_update(Device *device,
}
}
/* update the bvh even when there is no geometry so the kernel bvh data is still valid,
* especially when removing all of the objects during interactive renders */
bool need_update_scene_bvh = (scene->bvh == nullptr);
/* Update the BVH even when there is no geometry so the kernel's BVH data is still valid,
* especially when removing all of the objects during interactive renders.
* Also update the BVH if the transformations change, we cannot rely on tagging the Geometry
* as modified in this case, as we may accumulate displacement if the vertices do not also
* change. */
bool need_update_scene_bvh = (scene->bvh == nullptr || (update_flags & TRANSFORM_MODIFIED) != 0);
{
scoped_callback_timer timer([scene](double time) {
if (scene->update_stats) {
@ -1961,7 +1964,6 @@ void GeometryManager::device_update(Device *device,
scene->update_stats->geometry.times.add_entry({"device_update (compute bounds)", time});
}
});
vector<Object *> volume_objects;
foreach (Object *object, scene->objects) {
object->compute_bounds(motion_blur);
}

View File

@ -189,6 +189,8 @@ class GeometryManager {
GEOMETRY_ADDED = MESH_ADDED | HAIR_ADDED,
GEOMETRY_REMOVED = MESH_REMOVED | HAIR_REMOVED,
TRANSFORM_MODIFIED = (1 << 10),
/* tag everything in the manager for an update */
UPDATE_ALL = ~0u,

View File

@ -221,16 +221,7 @@ void Object::tag_update(Scene *scene)
if (geometry) {
if (tfm_is_modified()) {
/* tag the geometry as modified so the BVH is updated, but do not tag everything as modified
*/
if (geometry->is_mesh() || geometry->is_volume()) {
Mesh *mesh = static_cast<Mesh *>(geometry);
mesh->tag_verts_modified();
}
else if (geometry->is_hair()) {
Hair *hair = static_cast<Hair *>(geometry);
hair->tag_curve_keys_modified();
}
flag |= ObjectManager::TRANSFORM_MODIFIED;
}
foreach (Node *node, geometry->get_used_shaders()) {
@ -923,6 +914,10 @@ void ObjectManager::tag_update(Scene *scene, uint32_t flag)
geometry_flag |= (GeometryManager::GEOMETRY_ADDED | GeometryManager::GEOMETRY_REMOVED);
}
if ((flag & TRANSFORM_MODIFIED) != 0) {
geometry_flag |= GeometryManager::TRANSFORM_MODIFIED;
}
scene->geometry_manager->tag_update(scene, geometry_flag);
}

View File

@ -133,6 +133,7 @@ class ObjectManager {
OBJECT_REMOVED = (1 << 4),
OBJECT_MODIFIED = (1 << 5),
HOLDOUT_MODIFIED = (1 << 6),
TRANSFORM_MODIFIED = (1 << 7),
/* tag everything in the manager for an update */
UPDATE_ALL = ~0u,

View File

@ -49,8 +49,6 @@
#ifndef __MEM_GUARDEDALLOC_H__
#define __MEM_GUARDEDALLOC_H__
#include <stdio.h> /* needed for FILE* */
/* Needed for uintptr_t and attributes, exception, don't use BLI anywhere else in `MEM_*` */
#include "../../source/blender/blenlib/BLI_compiler_attrs.h"
#include "../../source/blender/blenlib/BLI_sys_types.h"

View File

@ -18,6 +18,7 @@
* \ingroup MEM
*/
#include <cstdio> /* Needed for `printf` on WIN32/APPLE. */
#include <cstdlib>
#include "MEM_guardedalloc.h"

View File

@ -25,6 +25,7 @@
#include <stdarg.h>
#include <stddef.h> /* offsetof */
#include <stdio.h> /* printf */
#include <stdlib.h>
#include <string.h> /* memcpy */
#include <sys/types.h>

View File

@ -21,6 +21,7 @@
*/
#include <stdarg.h>
#include <stdio.h> /* printf */
#include <stdlib.h>
#include <string.h> /* memcpy */
#include <sys/types.h>

View File

@ -469,6 +469,8 @@ class TOPBAR_MT_file_import(Menu):
if bpy.app.build_options.alembic:
self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
self.layout.operator("wm.gpencil_import_svg", text="SVG as Grease Pencil")
class TOPBAR_MT_file_export(Menu):
bl_idname = "TOPBAR_MT_file_export"
@ -485,6 +487,13 @@ class TOPBAR_MT_file_export(Menu):
self.layout.operator(
"wm.usd_export", text="Universal Scene Description (.usd, .usdc, .usda)")
# Pugixml lib dependency
if bpy.app.build_options.pugixml:
self.layout.operator("wm.gpencil_export_svg", text="Grease Pencil as SVG")
# Haru lib dependency
if bpy.app.build_options.haru:
self.layout.operator("wm.gpencil_export_pdf", text="Grease Pencil as PDF")
class TOPBAR_MT_file_external_data(Menu):
bl_label = "External Data"

View File

@ -39,7 +39,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 13
#define BLENDER_FILE_SUBVERSION 14
/* Minimum Blender version that supports reading file written with the current
* version. Older Blender versions will test this and show a warning if the file

View File

@ -27,10 +27,10 @@
extern "C" {
#endif
struct BoundBox;
struct Depsgraph;
struct Main;
struct Object;
struct RegionView3D;
struct Scene;
struct bGPDcurve;
struct bGPDframe;
@ -173,6 +173,20 @@ void BKE_gpencil_stroke_uniform_subdivide(struct bGPdata *gpd,
const uint32_t target_number,
const bool select);
void BKE_gpencil_stroke_to_view_space(struct RegionView3D *rv3d,
struct bGPDstroke *gps,
const float diff_mat[4][4]);
void BKE_gpencil_stroke_from_view_space(struct RegionView3D *rv3d,
struct bGPDstroke *gps,
const float diff_mat[4][4]);
struct bGPDstroke *BKE_gpencil_stroke_perimeter_from_view(struct RegionView3D *rv3d,
struct bGPdata *gpd,
const struct bGPDlayer *gpl,
struct bGPDstroke *gps,
const int subdivisions,
const float diff_mat[4][4]);
float BKE_gpencil_stroke_average_pressure_get(struct bGPDstroke *gps);
bool BKE_gpencil_stroke_is_pressure_constant(struct bGPDstroke *gps);
#ifdef __cplusplus
}
#endif

View File

@ -664,7 +664,7 @@ bool BKE_appdir_folder_id_ex(const int folder_id,
return false;
default:
BLI_assert(0);
BLI_assert_unreachable();
break;
}
@ -719,7 +719,7 @@ const char *BKE_appdir_folder_id_user_notest(const int folder_id, const char *su
get_path_user_ex(path, sizeof(path), "scripts", subfolder, version, check_is_dir);
break;
default:
BLI_assert(0);
BLI_assert_unreachable();
break;
}

View File

@ -1691,7 +1691,7 @@ void BKE_bone_parent_transform_calc_from_matrices(int bone_flag,
break;
default:
BLI_assert(false);
BLI_assert_unreachable();
}
}
/* If removing parent pose rotation: */
@ -1723,7 +1723,7 @@ void BKE_bone_parent_transform_calc_from_matrices(int bone_flag,
break;
default:
BLI_assert(false);
BLI_assert_unreachable();
}
}

View File

@ -1374,7 +1374,7 @@ void BKE_histogram_update_sample_line(Histogram *hist,
rgba[3] = 1.0f;
break;
default:
BLI_assert(0);
BLI_assert_unreachable();
}
hist->data_luma[i] = IMB_colormanagement_get_luminance(rgba);
@ -1476,7 +1476,7 @@ static void scopes_update_cb(void *__restrict userdata,
rgba[3] = 1.0f;
break;
default:
BLI_assert(0);
BLI_assert_unreachable();
}
}
else {

View File

@ -936,7 +936,7 @@ static void update_velocities(FluidEffectorSettings *fes,
}
else {
/* Should never reach this block. */
BLI_assert(false);
BLI_assert_unreachable();
}
}
else {

View File

@ -46,9 +46,11 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_curve.h"
@ -3460,4 +3462,555 @@ void BKE_gpencil_stroke_uniform_subdivide(bGPdata *gpd,
BKE_gpencil_stroke_geometry_update(gpd, gps);
}
/**
* Stroke to view space
* Transforms a stroke to view space. This allows for manipulations in 2D but also easy conversion
* back to 3D.
* Note: also takes care of parent space transform
*/
void BKE_gpencil_stroke_to_view_space(RegionView3D *rv3d,
bGPDstroke *gps,
const float diff_mat[4][4])
{
for (int i = 0; i < gps->totpoints; i++) {
bGPDspoint *pt = &gps->points[i];
/* Point to parent space. */
mul_v3_m4v3(&pt->x, diff_mat, &pt->x);
/* point to view space */
mul_m4_v3(rv3d->viewmat, &pt->x);
}
}
/**
* Stroke from view space
* Transforms a stroke from view space back to world space. Inverse of
* BKE_gpencil_stroke_to_view_space
* Note: also takes care of parent space transform
*/
void BKE_gpencil_stroke_from_view_space(RegionView3D *rv3d,
bGPDstroke *gps,
const float diff_mat[4][4])
{
float inverse_diff_mat[4][4];
invert_m4_m4(inverse_diff_mat, diff_mat);
for (int i = 0; i < gps->totpoints; i++) {
bGPDspoint *pt = &gps->points[i];
mul_v3_m4v3(&pt->x, rv3d->viewinv, &pt->x);
mul_m4_v3(inverse_diff_mat, &pt->x);
}
}
/* ----------------------------------------------------------------------------- */
/* Stroke to perimeter */
typedef struct tPerimeterPoint {
struct tPerimeterPoint *next, *prev;
float x, y, z;
} tPerimeterPoint;
static tPerimeterPoint *new_perimeter_point(const float pt[3])
{
tPerimeterPoint *new_pt = MEM_callocN(sizeof(tPerimeterPoint), __func__);
copy_v3_v3(&new_pt->x, pt);
return new_pt;
}
static int generate_arc_from_point_to_point(ListBase *list,
tPerimeterPoint *from,
tPerimeterPoint *to,
float center_pt[3],
int subdivisions,
bool clockwise)
{
float vec_from[2];
float vec_to[2];
sub_v2_v2v2(vec_from, &from->x, center_pt);
sub_v2_v2v2(vec_to, &to->x, center_pt);
if (is_zero_v2(vec_from) || is_zero_v2(vec_to)) {
return 0;
}
float dot = dot_v2v2(vec_from, vec_to);
float det = cross_v2v2(vec_from, vec_to);
float angle = clockwise ? M_PI - atan2f(-det, -dot) : atan2f(-det, -dot) + M_PI;
/* Number of points is 2^(n+1) + 1 on half a circle (n=subdivisions)
* so we multiply by (angle / pi) to get the right amount of
* points to insert. */
int num_points = (int)(((1 << (subdivisions + 1)) - 1) * (angle / M_PI));
if (num_points > 0) {
float angle_incr = angle / (float)num_points;
float vec_p[3];
float vec_t[3];
float tmp_angle;
tPerimeterPoint *last_point;
if (clockwise) {
last_point = to;
copy_v2_v2(vec_t, vec_to);
}
else {
last_point = from;
copy_v2_v2(vec_t, vec_from);
}
for (int i = 0; i < num_points - 1; i++) {
tmp_angle = (i + 1) * angle_incr;
rotate_v2_v2fl(vec_p, vec_t, tmp_angle);
add_v2_v2(vec_p, center_pt);
vec_p[2] = center_pt[2];
tPerimeterPoint *new_point = new_perimeter_point(vec_p);
if (clockwise) {
BLI_insertlinkbefore(list, last_point, new_point);
}
else {
BLI_insertlinkafter(list, last_point, new_point);
}
last_point = new_point;
}
return num_points - 1;
}
return 0;
}
static int generate_semi_circle_from_point_to_point(ListBase *list,
tPerimeterPoint *from,
tPerimeterPoint *to,
int subdivisions)
{
int num_points = (1 << (subdivisions + 1)) + 1;
float center_pt[3];
interp_v3_v3v3(center_pt, &from->x, &to->x, 0.5f);
float vec_center[2];
sub_v2_v2v2(vec_center, &from->x, center_pt);
if (is_zero_v2(vec_center)) {
return 0;
}
float vec_p[3];
float angle_incr = M_PI / ((float)num_points - 1);
tPerimeterPoint *last_point = from;
for (int i = 1; i < num_points; i++) {
float angle = i * angle_incr;
/* Rotate vector around point to get perimeter points. */
rotate_v2_v2fl(vec_p, vec_center, angle);
add_v2_v2(vec_p, center_pt);
vec_p[2] = center_pt[2];
tPerimeterPoint *new_point = new_perimeter_point(vec_p);
BLI_insertlinkafter(list, last_point, new_point);
last_point = new_point;
}
return num_points - 1;
}
static int generate_perimeter_cap(const float point[4],
const float other_point[4],
float radius,
ListBase *list,
int subdivisions,
short cap_type)
{
float cap_vec[2];
sub_v2_v2v2(cap_vec, other_point, point);
normalize_v2(cap_vec);
float cap_nvec[2];
if (is_zero_v2(cap_vec)) {
cap_nvec[0] = 0;
cap_nvec[1] = radius;
}
else {
cap_nvec[0] = -cap_vec[1];
cap_nvec[1] = cap_vec[0];
mul_v2_fl(cap_nvec, radius);
}
float cap_nvec_inv[2];
negate_v2_v2(cap_nvec_inv, cap_nvec);
float vec_perimeter[3];
copy_v3_v3(vec_perimeter, point);
add_v2_v2(vec_perimeter, cap_nvec);
float vec_perimeter_inv[3];
copy_v3_v3(vec_perimeter_inv, point);
add_v2_v2(vec_perimeter_inv, cap_nvec_inv);
tPerimeterPoint *p_pt = new_perimeter_point(vec_perimeter);
tPerimeterPoint *p_pt_inv = new_perimeter_point(vec_perimeter_inv);
BLI_addtail(list, p_pt);
BLI_addtail(list, p_pt_inv);
int num_points = 0;
if (cap_type == GP_STROKE_CAP_ROUND) {
num_points += generate_semi_circle_from_point_to_point(list, p_pt, p_pt_inv, subdivisions);
}
return num_points + 2;
}
/**
* Calculate the perimeter (outline) of a stroke as list of tPerimeterPoint.
* \param subdivisions: Number of subdivions for the start and end caps
* \return: list of tPerimeterPoint
*/
static ListBase *gpencil_stroke_perimeter_ex(const bGPdata *gpd,
const bGPDlayer *gpl,
const bGPDstroke *gps,
int subdivisions,
int *r_num_perimeter_points)
{
/* sanity check */
if (gps->totpoints < 1) {
return NULL;
}
float defaultpixsize = 1000.0f / gpd->pixfactor;
float stroke_radius = ((gps->thickness + gpl->line_change) / defaultpixsize) / 2.0f;
ListBase *perimeter_right_side = MEM_callocN(sizeof(ListBase), __func__);
ListBase *perimeter_left_side = MEM_callocN(sizeof(ListBase), __func__);
int num_perimeter_points = 0;
bGPDspoint *first = &gps->points[0];
bGPDspoint *last = &gps->points[gps->totpoints - 1];
float first_radius = stroke_radius * first->pressure;
float last_radius = stroke_radius * last->pressure;
bGPDspoint *first_next;
bGPDspoint *last_prev;
if (gps->totpoints > 1) {
first_next = &gps->points[1];
last_prev = &gps->points[gps->totpoints - 2];
}
else {
first_next = first;
last_prev = last;
}
float first_pt[3];
float last_pt[3];
float first_next_pt[3];
float last_prev_pt[3];
copy_v3_v3(first_pt, &first->x);
copy_v3_v3(last_pt, &last->x);
copy_v3_v3(first_next_pt, &first_next->x);
copy_v3_v3(last_prev_pt, &last_prev->x);
/* edgecase if single point */
if (gps->totpoints == 1) {
first_next_pt[0] += 1.0f;
last_prev_pt[0] -= 1.0f;
}
/* generate points for start cap */
num_perimeter_points += generate_perimeter_cap(
first_pt, first_next_pt, first_radius, perimeter_right_side, subdivisions, gps->caps[0]);
/* generate perimeter points */
float curr_pt[3], next_pt[3], prev_pt[3];
float vec_next[2], vec_prev[2];
float nvec_next[2], nvec_prev[2];
float nvec_next_pt[3], nvec_prev_pt[3];
float vec_tangent[2];
float vec_miter_left[2], vec_miter_right[2];
float miter_left_pt[3], miter_right_pt[3];
for (int i = 1; i < gps->totpoints - 1; i++) {
bGPDspoint *curr = &gps->points[i];
bGPDspoint *prev = &gps->points[i - 1];
bGPDspoint *next = &gps->points[i + 1];
float radius = stroke_radius * curr->pressure;
copy_v3_v3(curr_pt, &curr->x);
copy_v3_v3(next_pt, &next->x);
copy_v3_v3(prev_pt, &prev->x);
sub_v2_v2v2(vec_prev, curr_pt, prev_pt);
sub_v2_v2v2(vec_next, next_pt, curr_pt);
float prev_length = len_v2(vec_prev);
float next_length = len_v2(vec_next);
if (normalize_v2(vec_prev) == 0.0f) {
vec_prev[0] = 1.0f;
vec_prev[1] = 0.0f;
}
if (normalize_v2(vec_next) == 0.0f) {
vec_next[0] = 1.0f;
vec_next[1] = 0.0f;
}
nvec_prev[0] = -vec_prev[1];
nvec_prev[1] = vec_prev[0];
nvec_next[0] = -vec_next[1];
nvec_next[1] = vec_next[0];
add_v2_v2v2(vec_tangent, vec_prev, vec_next);
if (normalize_v2(vec_tangent) == 0.0f) {
copy_v2_v2(vec_tangent, nvec_prev);
}
vec_miter_left[0] = -vec_tangent[1];
vec_miter_left[1] = vec_tangent[0];
/* calculate miter length */
float an1 = dot_v2v2(vec_miter_left, nvec_prev);
if (an1 == 0.0f) {
an1 = 1.0f;
}
float miter_length = radius / an1;
if (miter_length <= 0.0f) {
miter_length = 0.01f;
}
normalize_v2_length(vec_miter_left, miter_length);
copy_v2_v2(vec_miter_right, vec_miter_left);
negate_v2(vec_miter_right);
float angle = dot_v2v2(vec_next, nvec_prev);
/* add two points if angle is close to beeing straight */
if (fabsf(angle) < 0.0001f) {
normalize_v2_length(nvec_prev, radius);
normalize_v2_length(nvec_next, radius);
copy_v3_v3(nvec_prev_pt, curr_pt);
add_v2_v2(nvec_prev_pt, nvec_prev);
copy_v3_v3(nvec_next_pt, curr_pt);
negate_v2(nvec_next);
add_v2_v2(nvec_next_pt, nvec_next);
tPerimeterPoint *normal_prev = new_perimeter_point(nvec_prev_pt);
tPerimeterPoint *normal_next = new_perimeter_point(nvec_next_pt);
BLI_addtail(perimeter_left_side, normal_prev);
BLI_addtail(perimeter_right_side, normal_next);
num_perimeter_points += 2;
}
else {
/* bend to the left */
if (angle < 0.0f) {
normalize_v2_length(nvec_prev, radius);
normalize_v2_length(nvec_next, radius);
copy_v3_v3(nvec_prev_pt, curr_pt);
add_v2_v2(nvec_prev_pt, nvec_prev);
copy_v3_v3(nvec_next_pt, curr_pt);
add_v2_v2(nvec_next_pt, nvec_next);
tPerimeterPoint *normal_prev = new_perimeter_point(nvec_prev_pt);
tPerimeterPoint *normal_next = new_perimeter_point(nvec_next_pt);
BLI_addtail(perimeter_left_side, normal_prev);
BLI_addtail(perimeter_left_side, normal_next);
num_perimeter_points += 2;
num_perimeter_points += generate_arc_from_point_to_point(
perimeter_left_side, normal_prev, normal_next, curr_pt, subdivisions, true);
if (miter_length < prev_length && miter_length < next_length) {
copy_v3_v3(miter_right_pt, curr_pt);
add_v2_v2(miter_right_pt, vec_miter_right);
}
else {
copy_v3_v3(miter_right_pt, curr_pt);
negate_v2(nvec_next);
add_v2_v2(miter_right_pt, nvec_next);
}
tPerimeterPoint *miter_right = new_perimeter_point(miter_right_pt);
BLI_addtail(perimeter_right_side, miter_right);
num_perimeter_points++;
}
/* bend to the right */
else {
normalize_v2_length(nvec_prev, -radius);
normalize_v2_length(nvec_next, -radius);
copy_v3_v3(nvec_prev_pt, curr_pt);
add_v2_v2(nvec_prev_pt, nvec_prev);
copy_v3_v3(nvec_next_pt, curr_pt);
add_v2_v2(nvec_next_pt, nvec_next);
tPerimeterPoint *normal_prev = new_perimeter_point(nvec_prev_pt);
tPerimeterPoint *normal_next = new_perimeter_point(nvec_next_pt);
BLI_addtail(perimeter_right_side, normal_prev);
BLI_addtail(perimeter_right_side, normal_next);
num_perimeter_points += 2;
num_perimeter_points += generate_arc_from_point_to_point(
perimeter_right_side, normal_prev, normal_next, curr_pt, subdivisions, false);
if (miter_length < prev_length && miter_length < next_length) {
copy_v3_v3(miter_left_pt, curr_pt);
add_v2_v2(miter_left_pt, vec_miter_left);
}
else {
copy_v3_v3(miter_left_pt, curr_pt);
negate_v2(nvec_prev);
add_v2_v2(miter_left_pt, nvec_prev);
}
tPerimeterPoint *miter_left = new_perimeter_point(miter_left_pt);
BLI_addtail(perimeter_left_side, miter_left);
num_perimeter_points++;
}
}
}
/* generate points for end cap */
num_perimeter_points += generate_perimeter_cap(
last_pt, last_prev_pt, last_radius, perimeter_right_side, subdivisions, gps->caps[1]);
/* merge both sides to one list */
BLI_listbase_reverse(perimeter_right_side);
BLI_movelisttolist(perimeter_left_side,
perimeter_right_side); // perimeter_left_side contains entire list
ListBase *perimeter_list = perimeter_left_side;
/* close by creating a point close to the first (make a small gap) */
float close_pt[3];
tPerimeterPoint *close_first = (tPerimeterPoint *)perimeter_list->first;
tPerimeterPoint *close_last = (tPerimeterPoint *)perimeter_list->last;
interp_v3_v3v3(close_pt, &close_last->x, &close_first->x, 0.99f);
if (compare_v3v3(close_pt, &close_first->x, FLT_EPSILON) == false) {
tPerimeterPoint *close_p_pt = new_perimeter_point(close_pt);
BLI_addtail(perimeter_list, close_p_pt);
num_perimeter_points++;
}
/* free temp data */
BLI_freelistN(perimeter_right_side);
MEM_freeN(perimeter_right_side);
*r_num_perimeter_points = num_perimeter_points;
return perimeter_list;
}
/**
* Calculates the perimeter of a stroke projected from the view and
* returns it as a new stroke.
* \param subdivisions: Number of subdivions for the start and end caps
* \return: bGPDstroke pointer to stroke perimeter
*/
bGPDstroke *BKE_gpencil_stroke_perimeter_from_view(struct RegionView3D *rv3d,
bGPdata *gpd,
const bGPDlayer *gpl,
bGPDstroke *gps,
const int subdivisions,
const float diff_mat[4][4])
{
if (gps->totpoints == 0) {
return NULL;
}
bGPDstroke *gps_temp = BKE_gpencil_stroke_duplicate(gps, true, false);
const bool cyclic = ((gps_temp->flag & GP_STROKE_CYCLIC) != 0);
/* If Cyclic, add a new point. */
if (cyclic && (gps_temp->totpoints > 1)) {
gps_temp->totpoints++;
gps_temp->points = MEM_recallocN(gps_temp->points,
sizeof(*gps_temp->points) * gps_temp->totpoints);
bGPDspoint *pt_src = &gps_temp->points[0];
bGPDspoint *pt_dst = &gps_temp->points[gps_temp->totpoints - 1];
copy_v3_v3(&pt_dst->x, &pt_src->x);
pt_dst->pressure = pt_src->pressure;
pt_dst->strength = pt_src->strength;
pt_dst->uv_fac = 1.0f;
pt_dst->uv_rot = 0;
}
BKE_gpencil_stroke_to_view_space(rv3d, gps_temp, diff_mat);
int num_perimeter_points = 0;
ListBase *perimeter_points = gpencil_stroke_perimeter_ex(
gpd, gpl, gps_temp, subdivisions, &num_perimeter_points);
if (num_perimeter_points == 0) {
return NULL;
}
/* Create new stroke. */
bGPDstroke *perimeter_stroke = BKE_gpencil_stroke_new(gps_temp->mat_nr, num_perimeter_points, 1);
int i = 0;
LISTBASE_FOREACH_INDEX (tPerimeterPoint *, curr, perimeter_points, i) {
bGPDspoint *pt = &perimeter_stroke->points[i];
copy_v3_v3(&pt->x, &curr->x);
pt->pressure = 0.0f;
pt->strength = 1.0f;
pt->flag |= GP_SPOINT_SELECT;
}
BKE_gpencil_stroke_from_view_space(rv3d, perimeter_stroke, diff_mat);
/* Free temp data. */
BLI_freelistN(perimeter_points);
MEM_freeN(perimeter_points);
/* Triangles cache needs to be recalculated. */
BKE_gpencil_stroke_geometry_update(gpd, perimeter_stroke);
perimeter_stroke->flag |= GP_STROKE_SELECT | GP_STROKE_CYCLIC;
BKE_gpencil_free_stroke(gps_temp);
return perimeter_stroke;
}
/** Get average pressure. */
float BKE_gpencil_stroke_average_pressure_get(bGPDstroke *gps)
{
if (gps->totpoints == 1) {
return gps->points[0].pressure;
}
float tot = 0.0f;
for (int i = 0; i < gps->totpoints; i++) {
const bGPDspoint *pt = &gps->points[i];
tot += pt->pressure;
}
return tot / (float)gps->totpoints;
}
/** Check if the thickness of the stroke is constant. */
bool BKE_gpencil_stroke_is_pressure_constant(bGPDstroke *gps)
{
if (gps->totpoints == 1) {
return true;
}
const float first_pressure = gps->points[0].pressure;
for (int i = 0; i < gps->totpoints; i++) {
const bGPDspoint *pt = &gps->points[i];
if (pt->pressure != first_pressure) {
return false;
}
}
return true;
}
/** \} */

View File

@ -19,6 +19,7 @@
*/
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include "RNA_types.h"

View File

@ -182,7 +182,7 @@ void BKE_main_free(Main *mainvar)
BKE_id_free_ex(mainvar, id, free_flag, false);
break;
default:
BLI_assert(0);
BLI_assert_unreachable();
break;
}
#endif

View File

@ -148,7 +148,7 @@ bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3])
case ME_WRAPPER_TYPE_MDATA:
return BKE_mesh_minmax(me, min, max);
}
BLI_assert(0);
BLI_assert_unreachable();
return false;
}
@ -189,7 +189,7 @@ void BKE_mesh_wrapper_vert_coords_copy(const Mesh *me,
return;
}
}
BLI_assert(0);
BLI_assert_unreachable();
}
void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me,
@ -226,7 +226,7 @@ void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me,
return;
}
}
BLI_assert(0);
BLI_assert_unreachable();
}
/** \} */
@ -243,7 +243,7 @@ int BKE_mesh_wrapper_vert_len(const Mesh *me)
case ME_WRAPPER_TYPE_MDATA:
return me->totvert;
}
BLI_assert(0);
BLI_assert_unreachable();
return -1;
}
@ -255,7 +255,7 @@ int BKE_mesh_wrapper_edge_len(const Mesh *me)
case ME_WRAPPER_TYPE_MDATA:
return me->totedge;
}
BLI_assert(0);
BLI_assert_unreachable();
return -1;
}
@ -267,7 +267,7 @@ int BKE_mesh_wrapper_loop_len(const Mesh *me)
case ME_WRAPPER_TYPE_MDATA:
return me->totloop;
}
BLI_assert(0);
BLI_assert_unreachable();
return -1;
}
@ -279,7 +279,7 @@ int BKE_mesh_wrapper_poly_len(const Mesh *me)
case ME_WRAPPER_TYPE_MDATA:
return me->totpoly;
}
BLI_assert(0);
BLI_assert_unreachable();
return -1;
}

View File

@ -1858,7 +1858,7 @@ bool BKE_object_data_is_in_editmode(const ID *id)
case ID_AR:
return ((const bArmature *)id)->edbo != NULL;
default:
BLI_assert(0);
BLI_assert_unreachable();
return false;
}
}
@ -1905,7 +1905,7 @@ char *BKE_object_data_editmode_flush_ptr_get(struct ID *id)
return &arm->needs_flush_to_id;
}
default:
BLI_assert(0);
BLI_assert_unreachable();
return NULL;
}
return NULL;

View File

@ -656,7 +656,7 @@ void BKE_paint_runtime_init(const ToolSettings *ts, Paint *paint)
paint->runtime.ob_mode = OB_MODE_WEIGHT_GPENCIL;
}
else {
BLI_assert(0);
BLI_assert_unreachable();
}
}

View File

@ -22,6 +22,7 @@
*/
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -20,6 +20,7 @@
* Used by ED_undo.h, internal implementation.
*/
#include <stdio.h>
#include <string.h>
#include "CLG_log.h"

View File

@ -18,6 +18,7 @@
* \ingroup bke
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -23,6 +23,7 @@
*/
#include <ctype.h> /* for tolower */
#include <stdio.h>
#include <string.h>
#include "MEM_guardedalloc.h"

View File

@ -22,6 +22,7 @@
* \ingroup bli
*/
#include <stdio.h>
#include <stdlib.h> /* malloc */
#include <string.h>

View File

@ -24,6 +24,7 @@
*/
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -25,6 +25,7 @@
#include <inttypes.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

View File

@ -432,9 +432,11 @@ int BLI_string_search_query(StringSearch *search, const char *query, void ***r_d
{
using namespace blender;
const StringRef query_str = query;
LinearAllocator<> allocator;
Vector<StringRef, 64> query_words;
string_search::extract_normalized_words(query, allocator, query_words);
string_search::extract_normalized_words(query_str, allocator, query_words);
/* Compute score of every result. */
MultiValueMap<int, int> result_indices_by_score;
@ -457,7 +459,7 @@ int BLI_string_search_query(StringSearch *search, const char *query, void ***r_d
Vector<int> sorted_result_indices;
for (const int score : found_scores) {
MutableSpan<int> indices = result_indices_by_score.lookup(score);
if (score == found_scores[0]) {
if (score == found_scores[0] && !query_str.is_empty()) {
/* Sort items with best score by length. Shorter items are more likely the ones you are
* looking for. This also ensures that exact matches will be at the top, even if the query is
* a substring of another item. */

View File

@ -53,6 +53,7 @@
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_brush.h"
#include "BKE_attribute.h"
#include "BKE_collection.h"
#include "BKE_colortools.h"
#include "BKE_cryptomatte.h"
@ -1906,6 +1907,25 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
if (!MAIN_VERSION_ATLEAST(bmain, 293, 14)) {
if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "diff_fac")) {
LISTBASE_FOREACH (Light *, light, &bmain->lights) {
light->diff_fac = 1.0f;
light->volume_fac = 1.0f;
}
}
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
if (ntree->type == NTREE_GEOMETRY) {
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->type == GEO_NODE_ATTRIBUTE_FILL) {
node->custom2 = ATTR_DOMAIN_AUTO;
}
}
}
}
}
/**
* Versioning code until next subversion bump goes here.
*
@ -1929,19 +1949,5 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
if (ntree->type == NTREE_GEOMETRY) {
version_node_socket_name(ntree, GEO_NODE_ATTRIBUTE_PROXIMITY, "Location", "Position");
}
}
FOREACH_NODETREE_END;
if (!DNA_struct_elem_find(fd->filesdna, "Light", "float", "diff_fac")) {
LISTBASE_FOREACH (Light *, light, &bmain->lights) {
light->diff_fac = 1.0f;
light->volume_fac = 1.0f;
}
}
}
}

View File

@ -33,7 +33,7 @@ class CPUDevice : public Device {
* \brief execute a WorkPackage
* \param work: the WorkPackage to execute
*/
void execute(WorkPackage *work);
void execute(WorkPackage *work) override;
int thread_id()
{

View File

@ -36,21 +36,6 @@ class Device {
{
}
/**
* \brief initialize the device
*/
virtual bool initialize()
{
return true;
}
/**
* \brief deinitialize the device
*/
virtual void deinitialize()
{
}
/**
* \brief execute a WorkPackage
* \param work: the WorkPackage to execute

View File

@ -65,7 +65,7 @@ ExecutionGroup::ExecutionGroup()
this->m_executionStartTime = 0;
}
CompositorPriority ExecutionGroup::getRenderPriotrity()
CompositorPriority ExecutionGroup::getRenderPriority()
{
return this->getOutputOperation()->getRenderPriority();
}
@ -130,9 +130,7 @@ void ExecutionGroup::initExecution()
if (this->m_chunks_len != 0) {
m_chunk_execution_states.resize(this->m_chunks_len);
for (int index = 0; index < this->m_chunks_len; index++) {
m_chunk_execution_states[index] = eChunkExecutionState::NOT_SCHEDULED;
}
m_chunk_execution_states.fill(eChunkExecutionState::NOT_SCHEDULED);
}
unsigned int max_offset = 0;
@ -185,7 +183,6 @@ void ExecutionGroup::determineNumberOfChunks()
blender::Array<unsigned int> ExecutionGroup::determine_chunk_execution_order() const
{
int index;
blender::Array<unsigned int> chunk_order(m_chunks_len);
for (int chunk_index = 0; chunk_index < this->m_chunks_len; chunk_index++) {
chunk_order[chunk_index] = chunk_index;
@ -205,7 +202,7 @@ blender::Array<unsigned int> ExecutionGroup::determine_chunk_execution_order() c
const int border_width = BLI_rcti_size_x(&this->m_viewerBorder);
const int border_height = BLI_rcti_size_y(&this->m_viewerBorder);
int index;
switch (order_type) {
case ChunkOrdering::Random: {
static blender::RandomNumberGenerator rng;
@ -303,7 +300,6 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
this->m_chunks_finished = 0;
this->m_bTree = bTree;
unsigned int index;
blender::Array<unsigned int> chunk_order = determine_chunk_execution_order();
@ -320,7 +316,8 @@ void ExecutionGroup::execute(ExecutionSystem *graph)
finished = true;
int numberEvaluated = 0;
for (index = startIndex; index < this->m_chunks_len && numberEvaluated < maxNumberEvaluated;
for (int index = startIndex;
index < this->m_chunks_len && numberEvaluated < maxNumberEvaluated;
index++) {
chunk_index = chunk_order[index];
int yChunk = chunk_index / this->m_x_chunks_len;

View File

@ -424,7 +424,7 @@ class ExecutionGroup {
* \brief get the Render priority of this ExecutionGroup
* \see ExecutionSystem.execute
*/
CompositorPriority getRenderPriotrity();
CompositorPriority getRenderPriority();
/**
* \brief set border for viewer operation

View File

@ -71,7 +71,6 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
builder.convertToOperations(this);
}
unsigned int index;
unsigned int resolution[2];
rctf *viewer_border = &editingtree->viewer_border;
@ -81,10 +80,9 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | Determining resolution"));
for (index = 0; index < this->m_groups.size(); index++) {
for (ExecutionGroup *executionGroup : m_groups) {
resolution[0] = 0;
resolution[1] = 0;
ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->determineResolution(resolution);
if (rendering) {
@ -108,14 +106,12 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
ExecutionSystem::~ExecutionSystem()
{
unsigned int index;
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
for (NodeOperation *operation : m_operations) {
delete operation;
}
this->m_operations.clear();
for (index = 0; index < this->m_groups.size(); index++) {
ExecutionGroup *group = this->m_groups[index];
for (ExecutionGroup *group : m_groups) {
delete group;
}
this->m_groups.clear();
@ -128,92 +124,98 @@ void ExecutionSystem::set_operations(const blender::Vector<NodeOperation *> &ope
m_groups = groups;
}
void ExecutionSystem::execute()
static void update_read_buffer_offset(blender::Vector<NodeOperation *> &operations)
{
const bNodeTree *editingtree = this->m_context.getbNodeTree();
editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | Initializing execution"));
DebugInfo::execute_started(this);
unsigned int order = 0;
for (NodeOperation *operation : m_operations) {
for (NodeOperation *operation : operations) {
if (operation->isReadBufferOperation()) {
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
readOperation->setOffset(order);
order++;
}
}
unsigned int index;
}
// First allocale all write buffer
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
static void init_write_operations_for_execution(blender::Vector<NodeOperation *> &operations,
const bNodeTree *bTree)
{
for (NodeOperation *operation : operations) {
if (operation->isWriteBufferOperation()) {
operation->setbNodeTree(this->m_context.getbNodeTree());
operation->setbNodeTree(bTree);
operation->initExecution();
}
}
// Connect read buffers to their write buffers
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
}
static void link_write_buffers(blender::Vector<NodeOperation *> &operations)
{
for (NodeOperation *operation : operations) {
if (operation->isReadBufferOperation()) {
ReadBufferOperation *readOperation = (ReadBufferOperation *)operation;
ReadBufferOperation *readOperation = static_cast<ReadBufferOperation *>(operation);
readOperation->updateMemoryBuffer();
}
}
// initialize other operations
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
}
static void init_non_write_operations_for_execution(blender::Vector<NodeOperation *> &operations,
const bNodeTree *bTree)
{
for (NodeOperation *operation : operations) {
if (!operation->isWriteBufferOperation()) {
operation->setbNodeTree(this->m_context.getbNodeTree());
operation->setbNodeTree(bTree);
operation->initExecution();
}
}
for (index = 0; index < this->m_groups.size(); index++) {
ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->setChunksize(this->m_context.getChunksize());
executionGroup->initExecution();
}
static void init_execution_groups_for_execution(blender::Vector<ExecutionGroup *> &groups,
const int chunk_size)
{
for (ExecutionGroup *execution_group : groups) {
execution_group->setChunksize(chunk_size);
execution_group->initExecution();
}
}
void ExecutionSystem::execute()
{
const bNodeTree *editingtree = this->m_context.getbNodeTree();
editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | Initializing execution"));
DebugInfo::execute_started(this);
update_read_buffer_offset(m_operations);
init_write_operations_for_execution(m_operations, m_context.getbNodeTree());
link_write_buffers(m_operations);
init_non_write_operations_for_execution(m_operations, m_context.getbNodeTree());
init_execution_groups_for_execution(m_groups, m_context.getChunksize());
WorkScheduler::start(this->m_context);
execute_groups(CompositorPriority::High);
if (!this->getContext().isFastCalculation()) {
execute_groups(CompositorPriority::Medium);
execute_groups(CompositorPriority::Low);
}
WorkScheduler::finish();
WorkScheduler::stop();
editingtree->stats_draw(editingtree->sdh, TIP_("Compositing | De-initializing execution"));
for (index = 0; index < this->m_operations.size(); index++) {
NodeOperation *operation = this->m_operations[index];
for (NodeOperation *operation : m_operations) {
operation->deinitExecution();
}
for (index = 0; index < this->m_groups.size(); index++) {
ExecutionGroup *executionGroup = this->m_groups[index];
executionGroup->deinitExecution();
for (ExecutionGroup *execution_group : m_groups) {
execution_group->deinitExecution();
}
}
void ExecutionSystem::execute_groups(CompositorPriority priority)
{
blender::Vector<ExecutionGroup *> execution_groups = find_output_execution_groups(priority);
for (ExecutionGroup *group : execution_groups) {
group->execute(this);
}
}
blender::Vector<ExecutionGroup *> ExecutionSystem::find_output_execution_groups(
CompositorPriority priority) const
{
blender::Vector<ExecutionGroup *> result;
for (ExecutionGroup *group : m_groups) {
if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
result.append(group);
for (ExecutionGroup *execution_group : m_groups) {
if (execution_group->isOutputExecutionGroup() &&
execution_group->getRenderPriority() == priority) {
execution_group->execute(this);
}
}
return result;
}

View File

@ -135,12 +135,6 @@ class ExecutionSystem {
blender::Vector<ExecutionGroup *> m_groups;
private: // methods
/**
* find all execution group with output nodes
*/
blender::Vector<ExecutionGroup *> find_output_execution_groups(
CompositorPriority priority) const;
public:
/**
* \brief Create a new ExecutionSystem and initialize it with the

View File

@ -44,16 +44,6 @@ class MemoryProxy {
*/
ExecutionGroup *m_executor;
/**
* \brief datatype of this MemoryProxy
*/
/* DataType m_datatype; */ /* UNUSED */
/**
* \brief channel information of this buffer
*/
/* ChannelInfo m_channelInfo[COM_NUMBER_OF_CHANNELS]; */ /* UNUSED */
/**
* \brief the allocated memory
*/

View File

@ -43,16 +43,12 @@ OpenCLDevice::OpenCLDevice(cl_context context,
this->m_program = program;
this->m_queue = nullptr;
this->m_vendorID = vendorId;
}
bool OpenCLDevice::initialize()
{
cl_int error;
this->m_queue = clCreateCommandQueue(this->m_context, this->m_device, 0, &error);
return false;
}
void OpenCLDevice::deinitialize()
OpenCLDevice::~OpenCLDevice()
{
if (this->m_queue) {
clReleaseCommandQueue(this->m_queue);

View File

@ -65,26 +65,13 @@ class OpenCLDevice : public Device {
* \param vendorID:
*/
OpenCLDevice(cl_context context, cl_device_id device, cl_program program, cl_int vendorId);
/**
* \brief initialize the device
* During initialization the OpenCL cl_command_queue is created
* the command queue is stored in the field queue.
* \see queue
*/
bool initialize();
/**
* \brief de-initialize the device
* During de-initialization the command queue is cleared
*/
void deinitialize();
~OpenCLDevice();
/**
* \brief execute a WorkPackage
* \param work: the WorkPackage to execute
*/
void execute(WorkPackage *work);
void execute(WorkPackage *work) override;
/**
* \brief determine an image format

View File

@ -36,23 +36,23 @@ class SingleThreadedOperation : public NodeOperation {
/**
* The inner loop of this operation.
*/
void executePixel(float output[4], int x, int y, void *data);
void executePixel(float output[4], int x, int y, void *data) override;
/**
* Initialize the execution
*/
void initExecution();
void initExecution() override;
/**
* Deinitialize the execution
*/
void deinitExecution();
void deinitExecution() override;
void *initializeTileData(rcti *rect);
void *initializeTileData(rcti *rect) override;
virtual MemoryBuffer *createMemoryBuffer(rcti *rect) = 0;
int isSingleThreaded()
int isSingleThreaded() override
{
return true;
}

View File

@ -70,7 +70,7 @@ static struct {
/** \brief list of all CPUDevices. for every hardware thread an instance of CPUDevice is
* created
*/
blender::Vector<CPUDevice *> devices;
blender::Vector<CPUDevice> devices;
/** \brief list of all thread for every CPUDevice in cpudevices a thread exists. */
ListBase threads;
@ -89,7 +89,7 @@ static struct {
cl_program program;
/** \brief list of all OpenCLDevices. for every OpenCL GPU device an instance of OpenCLDevice
* is created. */
blender::Vector<OpenCLDevice *> devices;
blender::Vector<OpenCLDevice> devices;
/** \brief list of all thread for every GPUDevice in cpudevices a thread exists. */
ListBase threads;
/** \brief all scheduled work for the GPU. */
@ -130,9 +130,8 @@ static void opencl_start(CompositorContext &context)
BLI_threadpool_init(&g_work_scheduler.opencl.threads,
thread_execute_gpu,
g_work_scheduler.opencl.devices.size());
for (int index = 0; index < g_work_scheduler.opencl.devices.size(); index++) {
Device *device = g_work_scheduler.opencl.devices[index];
BLI_threadpool_insert(&g_work_scheduler.opencl.threads, device);
for (Device &device : g_work_scheduler.opencl.devices) {
BLI_threadpool_insert(&g_work_scheduler.opencl.threads, &device);
}
g_work_scheduler.opencl.active = true;
}
@ -263,12 +262,10 @@ static void opencl_initialize(const bool use_opencl)
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error2, clewErrorString(error2));
}
OpenCLDevice *clDevice = new OpenCLDevice(g_work_scheduler.opencl.context,
device,
g_work_scheduler.opencl.program,
vendorID);
clDevice->initialize();
g_work_scheduler.opencl.devices.append(clDevice);
g_work_scheduler.opencl.devices.append(OpenCLDevice(g_work_scheduler.opencl.context,
device,
g_work_scheduler.opencl.program,
vendorID));
}
}
MEM_freeN(cldevices);
@ -282,25 +279,19 @@ static void opencl_initialize(const bool use_opencl)
static void opencl_deinitialize()
{
/* Deinitialize OpenCL GPU's. */
if (g_work_scheduler.opencl.initialized) {
Device *device;
while (!g_work_scheduler.opencl.devices.is_empty()) {
device = g_work_scheduler.opencl.devices.pop_last();
device->deinitialize();
delete device;
}
if (g_work_scheduler.opencl.program) {
clReleaseProgram(g_work_scheduler.opencl.program);
g_work_scheduler.opencl.program = nullptr;
}
if (g_work_scheduler.opencl.context) {
clReleaseContext(g_work_scheduler.opencl.context);
g_work_scheduler.opencl.context = nullptr;
}
g_work_scheduler.opencl.devices.clear_and_make_inline();
g_work_scheduler.opencl.initialized = false;
if (g_work_scheduler.opencl.program) {
clReleaseProgram(g_work_scheduler.opencl.program);
g_work_scheduler.opencl.program = nullptr;
}
if (g_work_scheduler.opencl.context) {
clReleaseContext(g_work_scheduler.opencl.context);
g_work_scheduler.opencl.context = nullptr;
}
g_work_scheduler.opencl.initialized = false;
}
/* \} */
@ -346,9 +337,8 @@ static void threading_model_queue_start()
BLI_threadpool_init(&g_work_scheduler.queue.threads,
threading_model_queue_execute,
g_work_scheduler.queue.devices.size());
for (int index = 0; index < g_work_scheduler.queue.devices.size(); index++) {
Device *device = g_work_scheduler.queue.devices[index];
BLI_threadpool_insert(&g_work_scheduler.queue.threads, device);
for (Device &device : g_work_scheduler.queue.devices) {
BLI_threadpool_insert(&g_work_scheduler.queue.threads, &device);
}
}
@ -369,25 +359,17 @@ static void threading_model_queue_initialize(const int num_cpu_threads)
{
/* Reinitialize if number of threads doesn't match. */
if (g_work_scheduler.queue.devices.size() != num_cpu_threads) {
Device *device;
while (!g_work_scheduler.queue.devices.is_empty()) {
device = g_work_scheduler.queue.devices.pop_last();
device->deinitialize();
delete device;
}
g_work_scheduler.queue.devices.clear();
if (g_work_scheduler.queue.initialized) {
BLI_thread_local_delete(g_thread_device);
g_work_scheduler.queue.initialized = false;
}
g_work_scheduler.queue.initialized = false;
}
/* Initialize CPU threads. */
if (!g_work_scheduler.queue.initialized) {
for (int index = 0; index < num_cpu_threads; index++) {
CPUDevice *device = new CPUDevice(index);
device->initialize();
g_work_scheduler.queue.devices.append(device);
g_work_scheduler.queue.devices.append(CPUDevice(index));
}
BLI_thread_local_create(g_thread_device);
g_work_scheduler.queue.initialized = true;
@ -397,12 +379,8 @@ static void threading_model_queue_deinitialize()
{
/* deinitialize CPU threads */
if (g_work_scheduler.queue.initialized) {
Device *device;
while (!g_work_scheduler.queue.devices.is_empty()) {
device = g_work_scheduler.queue.devices.pop_last();
device->deinitialize();
delete device;
}
g_work_scheduler.queue.devices.clear_and_make_inline();
BLI_thread_local_delete(g_thread_device);
g_work_scheduler.queue.initialized = false;
}

View File

@ -29,5 +29,6 @@ class AlphaOverNode : public Node {
AlphaOverNode(bNode *editorNode) : Node(editorNode)
{
}
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BilateralBlurNode : public Node {
public:
BilateralBlurNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BlurNode : public Node {
public:
BlurNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BokehBlurNode : public Node {
public:
BokehBlurNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BokehImageNode : public Node {
public:
BokehImageNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BoxMaskNode : public Node {
public:
BoxMaskNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class BrightnessNode : public Node {
public:
BrightnessNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ChannelMatteNode : public Node {
public:
ChannelMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ChromaMatteNode : public Node {
public:
ChromaMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorBalanceNode : public Node {
public:
ColorBalanceNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorCorrectionNode : public Node {
public:
ColorCorrectionNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorCurveNode : public Node {
public:
ColorCurveNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ExposureNode : public Node {
public:
ExposureNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorMatteNode : public Node {
public:
ColorMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorNode : public Node {
public:
ColorNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorRampNode : public Node {
public:
ColorRampNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorSpillNode : public Node {
public:
ColorSpillNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class ColorToBWNode : public Node {
public:
ColorToBWNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -23,7 +23,8 @@
class CombineColorNode : public Node {
public:
CombineColorNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
protected:
virtual NodeOperation *getColorConverter(const CompositorContext &context) const = 0;
@ -35,7 +36,7 @@ class CombineRGBANode : public CombineColorNode {
{
}
NodeOperation *getColorConverter(const CompositorContext &context) const;
NodeOperation *getColorConverter(const CompositorContext &context) const override;
};
class CombineHSVANode : public CombineColorNode {
@ -44,7 +45,7 @@ class CombineHSVANode : public CombineColorNode {
{
}
NodeOperation *getColorConverter(const CompositorContext &context) const;
NodeOperation *getColorConverter(const CompositorContext &context) const override;
};
class CombineYCCANode : public CombineColorNode {
@ -53,7 +54,7 @@ class CombineYCCANode : public CombineColorNode {
{
}
NodeOperation *getColorConverter(const CompositorContext &context) const;
NodeOperation *getColorConverter(const CompositorContext &context) const override;
};
class CombineYUVANode : public CombineColorNode {
@ -62,5 +63,5 @@ class CombineYUVANode : public CombineColorNode {
{
}
NodeOperation *getColorConverter(const CompositorContext &context) const;
NodeOperation *getColorConverter(const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class CompositorNode : public Node {
public:
CompositorNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -29,5 +29,6 @@ class ConvertAlphaNode : public Node {
ConvertAlphaNode(bNode *editorNode) : Node(editorNode)
{
}
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -28,5 +28,6 @@
class CornerPinNode : public Node {
public:
CornerPinNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class CropNode : public Node {
public:
CropNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -36,7 +36,8 @@ class CryptomatteBaseNode : public Node {
}
public:
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
protected:
virtual CryptomatteOperation *create_cryptomatte_operation(

View File

@ -27,5 +27,6 @@
class DefocusNode : public Node {
public:
DefocusNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DenoiseNode : public Node {
public:
DenoiseNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DespeckleNode : public Node {
public:
DespeckleNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DifferenceMatteNode : public Node {
public:
DifferenceMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -30,5 +30,6 @@ class DilateErodeNode : public Node {
public:
DilateErodeNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DirectionalBlurNode : public Node {
public:
DirectionalBlurNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DisplaceNode : public Node {
public:
DisplaceNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DistanceMatteNode : public Node {
public:
DistanceMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class DoubleEdgeMaskNode : public Node {
public:
DoubleEdgeMaskNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class EllipseMaskNode : public Node {
public:
EllipseMaskNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class FilterNode : public Node {
public:
FilterNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class FlipNode : public Node {
public:
FlipNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class GammaNode : public Node {
public:
GammaNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class GlareNode : public Node {
public:
GlareNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class HueSaturationValueCorrectNode : public Node {
public:
HueSaturationValueCorrectNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class HueSaturationValueNode : public Node {
public:
HueSaturationValueNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class IDMaskNode : public Node {
public:
IDMaskNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -44,5 +44,6 @@ class ImageNode : public Node {
public:
ImageNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class InpaintNode : public Node {
public:
InpaintNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class InvertNode : public Node {
public:
InvertNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -55,5 +55,6 @@ class KeyingNode : public Node {
public:
KeyingNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -28,5 +28,6 @@
class KeyingScreenNode : public Node {
public:
KeyingScreenNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class LensDistortionNode : public Node {
public:
LensDistortionNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class LuminanceMatteNode : public Node {
public:
LuminanceMatteNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class MapRangeNode : public Node {
public:
MapRangeNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class MapUVNode : public Node {
public:
MapUVNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class MapValueNode : public Node {
public:
MapValueNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -28,5 +28,6 @@
class MaskNode : public Node {
public:
MaskNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -29,5 +29,6 @@ class MathNode : public Node {
MathNode(bNode *editorNode) : Node(editorNode)
{
}
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class MixNode : public Node {
public:
MixNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -28,5 +28,6 @@
class MovieClipNode : public Node {
public:
MovieClipNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

View File

@ -27,5 +27,6 @@
class MovieDistortionNode : public Node {
public:
MovieDistortionNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
void convertToOperations(NodeConverter &converter,
const CompositorContext &context) const override;
};

Some files were not shown because too many files have changed in this diff Show More