This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/freestyle/intern/scene_graph/SceneVisitor.h
Dalai Felinto 3abe8b3292 Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.

* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started

Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.

Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D2927
2017-11-23 07:48:23 -02:00

110 lines
2.8 KiB
C++

/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __FREESTYLE_SCENE_VISITOR_H__
#define __FREESTYLE_SCENE_VISITOR_H__
/** \file blender/freestyle/intern/scene_graph/SceneVisitor.h
* \ingroup freestyle
* \brief Class to visit (without doing anything) a scene graph structure
* \author Emmanuel Turquin
* \date 26/04/2003
*/
#include "../system/FreestyleConfig.h"
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
#endif
namespace Freestyle {
#define VISIT_COMPLETE_DEF(type) \
virtual void visit##type(type&) {} \
virtual void visit##type##Before(type&) {} \
virtual void visit##type##After(type&) {}
#define VISIT_DECL(type) \
virtual void visit##type(type&);
#define VISIT_COMPLETE_DECL(type) \
virtual void visit##type##Before(type&); \
virtual void visit##type(type&); \
virtual void visit##type##After(type&);
class Node;
class NodeShape;
class NodeGroup;
class NodeLight;
class NodeCamera;
class NodeDrawingStyle;
class NodeTransform;
class NodeViewLayer;
class Rep;
class LineRep;
class OrientedLineRep;
class TriangleRep;
class VertexRep;
class IndexedFaceSet;
class DrawingStyle;
class FrsMaterial;
class SceneVisitor
{
public:
SceneVisitor() {}
virtual ~SceneVisitor() {}
virtual void beginScene() {}
virtual void endScene() {}
//
// visitClass methods
//
//////////////////////////////////////////////
VISIT_COMPLETE_DEF(Node)
VISIT_COMPLETE_DEF(NodeShape)
VISIT_COMPLETE_DEF(NodeGroup)
VISIT_COMPLETE_DEF(NodeLight)
VISIT_COMPLETE_DEF(NodeCamera)
VISIT_COMPLETE_DEF(NodeDrawingStyle)
VISIT_COMPLETE_DEF(NodeTransform)
VISIT_COMPLETE_DEF(NodeViewLayer)
VISIT_COMPLETE_DEF(Rep)
VISIT_COMPLETE_DEF(LineRep)
VISIT_COMPLETE_DEF(OrientedLineRep)
VISIT_COMPLETE_DEF(TriangleRep)
VISIT_COMPLETE_DEF(VertexRep)
VISIT_COMPLETE_DEF(IndexedFaceSet)
VISIT_COMPLETE_DEF(DrawingStyle)
VISIT_COMPLETE_DEF(FrsMaterial)
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:SceneVisitor")
#endif
};
} /* namespace Freestyle */
#endif // __FREESTYLE_SCENE_VISITOR_H__