2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2015-01-03 01:48:27 +09:00
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
#pragma once
|
2015-01-03 01:48:27 +09:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup freestyle
|
|
|
|
|
* \brief Class to represent a view layer in Blender.
|
2015-01-03 01:48:27 +09:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "Node.h"
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
#include "DNA_scene_types.h" /* for Scene and ViewLayer */
|
2015-01-03 01:48:27 +09:00
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
namespace Freestyle {
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
class NodeViewLayer : public Node {
|
2015-01-03 01:48:27 +09:00
|
|
|
public:
|
2017-11-22 10:52:39 -02:00
|
|
|
inline NodeViewLayer(Scene &scene, ViewLayer &view_layer)
|
|
|
|
|
: Node(), _Scene(scene), _ViewLayer(view_layer)
|
|
|
|
|
{
|
|
|
|
|
}
|
2023-03-29 16:50:54 +02:00
|
|
|
virtual ~NodeViewLayer() {}
|
2015-01-03 01:48:27 +09:00
|
|
|
|
2015-02-02 09:17:16 +09:00
|
|
|
inline struct Scene &scene() const
|
|
|
|
|
{
|
|
|
|
|
return _Scene;
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-22 10:52:39 -02:00
|
|
|
inline struct ViewLayer &sceneLayer() const
|
2015-01-03 01:48:27 +09:00
|
|
|
{
|
2017-11-22 10:52:39 -02:00
|
|
|
return _ViewLayer;
|
2015-01-03 01:48:27 +09:00
|
|
|
}
|
|
|
|
|
|
2021-06-24 15:57:33 +10:00
|
|
|
/** Accept the corresponding visitor */
|
2015-01-03 01:48:27 +09:00
|
|
|
virtual void accept(SceneVisitor &v);
|
|
|
|
|
|
|
|
|
|
protected:
|
2015-02-02 09:17:16 +09:00
|
|
|
Scene &_Scene;
|
2017-11-22 10:52:39 -02:00
|
|
|
ViewLayer &_ViewLayer;
|
2015-01-03 01:48:27 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} /* namespace Freestyle */
|