Alembic Version 1.1

Loading...
Searching...
No Matches
OMaterial.h
Go to the documentation of this file.
1//-*****************************************************************************
2//
3// Copyright (c) 2009-2015,
4// Sony Pictures Imageworks Inc. and
5// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
6//
7// All rights reserved.
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12// * Redistributions of source code must retain the above copyright
13// notice, this list of conditions and the following disclaimer.
14// * Redistributions in binary form must reproduce the above
15// copyright notice, this list of conditions and the following disclaimer
16// in the documentation and/or other materials provided with the
17// distribution.
18// * Neither the name of Sony Pictures Imageworks, nor
19// Industrial Light & Magic, nor the names of their contributors may be used
20// to endorse or promote products derived from this software without specific
21// prior written permission.
22//
23// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34//
35//-*****************************************************************************
36
37#ifndef Alembic_AbcMaterial_OMaterial_h
38#define Alembic_AbcMaterial_OMaterial_h
39
40#include <Alembic/Abc/All.h>
41
42#include <Alembic/Util/Export.h>
43#include <Alembic/AbcMaterial/SchemaInfoDeclarations.h>
44
45 namespace Alembic {
46 namespace AbcMaterial {
47 namespace ALEMBIC_VERSION_NS {
48
53 class ALEMBIC_EXPORT OMaterialSchema
54 : public Abc::OSchema<MaterialSchemaInfo>
55{
56 public:
57
58 //-------------------------------------------------------------------------
59 //BOILERPLATE
60
61 typedef OMaterialSchema this_type;
62
63 OMaterialSchema() {}
64
65 OMaterialSchema(
66 Alembic::AbcCoreAbstract::CompoundPropertyWriterPtr iParent,
67 const std::string &iName,
68 const Abc::Argument &iArg0 = Abc::Argument(),
69 const Abc::Argument &iArg1 = Abc::Argument(),
70 const Abc::Argument &iArg2 = Abc::Argument(),
71 const Abc::Argument &iArg3 = Abc::Argument() );
72
73 OMaterialSchema( Abc::OCompoundProperty iParent,
74 const std::string &iName,
75 const Abc::Argument &iArg0 = Abc::Argument(),
76 const Abc::Argument &iArg1 = Abc::Argument(),
77 const Abc::Argument &iArg2 = Abc::Argument() );
78
80 OMaterialSchema( const OMaterialSchema& iCopy )
81 : Abc::OSchema<MaterialSchemaInfo>()
82 {
83 *this = iCopy;
84 }
85
86 //-------------------------------------------------------------------------
87 //ACTUAL STUFF
88
97 void setShader( const std::string & iTarget,
98 const std::string & iShaderType,
99 const std::string & iShaderName );
100
106 Abc::OCompoundProperty getShaderParameters(
107 const std::string & iTarget, const std::string & iShaderType );
108
109 //add node by name, target, type, set node connection?, set node
110 //terminals?
111
112 void addNetworkNode( const std::string & iNodeName,
113 const std::string & iTarget,
114 const std::string & iNodeType );
115
116 void setNetworkNodeConnection( const std::string & iNodeName,
117 const std::string & iInputName,
118 const std::string & iConnectedNodeName,
119 const std::string & iConnectedOutputName );
120
121 Abc::OCompoundProperty
122 getNetworkNodeParameters( const std::string & iNodeName );
123
124 void setNetworkTerminal( const std::string & iTarget,
125 const std::string & iShaderType,
126 const std::string & iNodeName,
127 const std::string & iOutputName = "" );
128
129 void
130 setNetworkInterfaceParameterMapping(
131 const std::string & iInterfaceParamName,
132 const std::string & iMapToNodeName,
133 const std::string & iMapToParamName );
134
135 Abc::OCompoundProperty getNetworkInterfaceParameters();
136
137 protected:
138
139 void init();
140
141 // all the network nodes will be placed under this property
142 Abc::OCompoundProperty m_node;
143 void createNodeCompound();
144
145 class Data;
146
147 // shared and not scoped because we want this to survive a copy
148 Util::shared_ptr< Data > m_data;
149};
150
152 typedef Abc::OSchemaObject<OMaterialSchema> OMaterial;
153
154 typedef Util::shared_ptr< OMaterial > OMaterialPtr;
155
156} // End namespace ALEMBIC_VERSION_NS
157
158 using namespace ALEMBIC_VERSION_NS;
159
160} // End namespace AbcMaterial
161} // End namespace Alembic
162
163
164#endif
165
SchemaInfoDeclarations.h
All.h
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition Export.h:51
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::m_data
Util::shared_ptr< Data > m_data
Definition OMaterial.h:148
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::addNetworkNode
void addNetworkNode(const std::string &iNodeName, const std::string &iTarget, const std::string &iNodeType)
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::getNetworkNodeParameters
Abc::OCompoundProperty getNetworkNodeParameters(const std::string &iNodeName)
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::setNetworkTerminal
void setNetworkTerminal(const std::string &iTarget, const std::string &iShaderType, const std::string &iNodeName, const std::string &iOutputName="")
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::init
void init()
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::OMaterialSchema
OMaterialSchema(const OMaterialSchema &iCopy)
Copy constructor.
Definition OMaterial.h:80
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::m_node
Abc::OCompoundProperty m_node
Definition OMaterial.h:142
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::setNetworkInterfaceParameterMapping
void setNetworkInterfaceParameterMapping(const std::string &iInterfaceParamName, const std::string &iMapToNodeName, const std::string &iMapToParamName)
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::this_type
OMaterialSchema this_type
Definition OMaterial.h:61
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::OMaterialSchema
OMaterialSchema(Alembic::AbcCoreAbstract::CompoundPropertyWriterPtr iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument(), const Abc::Argument &iArg3=Abc::Argument())
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::getShaderParameters
Abc::OCompoundProperty getShaderParameters(const std::string &iTarget, const std::string &iShaderType)
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::setShader
void setShader(const std::string &iTarget, const std::string &iShaderType, const std::string &iShaderName)
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::getNetworkInterfaceParameters
Abc::OCompoundProperty getNetworkInterfaceParameters()
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::createNodeCompound
void createNodeCompound()
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::OMaterialSchema
OMaterialSchema()
Definition OMaterial.h:63
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::OMaterialSchema
OMaterialSchema(Abc::OCompoundProperty iParent, const std::string &iName, const Abc::Argument &iArg0=Abc::Argument(), const Abc::Argument &iArg1=Abc::Argument(), const Abc::Argument &iArg2=Abc::Argument())
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialSchema::setNetworkNodeConnection
void setNetworkNodeConnection(const std::string &iNodeName, const std::string &iInputName, const std::string &iConnectedNodeName, const std::string &iConnectedOutputName)
Alembic::Abc::ALEMBIC_VERSION_NS::Argument
Definition Argument.h:120
Alembic::Abc::ALEMBIC_VERSION_NS::OCompoundProperty
Definition OCompoundProperty.h:53
Alembic::Abc::ALEMBIC_VERSION_NS::OSchemaObject
Definition OSchemaObject.h:54
Alembic::Abc::ALEMBIC_VERSION_NS::OSchema
Definition OSchema.h:119
Alembic::Abc::ALEMBIC_VERSION_NS::OSchema< MaterialSchemaInfo >::OSchema
OSchema()
Definition OSchema.h:191
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::CompoundPropertyWriterPtr
Alembic::Util::shared_ptr< CompoundPropertyWriter > CompoundPropertyWriterPtr
Definition ForwardDeclarations.h:83
Alembic::AbcMaterial::ALEMBIC_VERSION_NS
Definition IMaterial.h:46
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterial
Abc::OSchemaObject< OMaterialSchema > OMaterial
Object declaration.
Definition OMaterial.h:152
Alembic::AbcMaterial::ALEMBIC_VERSION_NS::OMaterialPtr
Util::shared_ptr< OMaterial > OMaterialPtr
Definition OMaterial.h:154
Alembic::AbcMaterial
Definition IMaterial.h:45
Alembic::Abc
Definition ArchiveInfo.h:47
Alembic
Alembic namespace ...
Definition ArchiveInfo.h:46