All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: SHOP_Output.h ( SHOP Library, C++)
7  *
8  * COMMENTS: Output nodes for SHOPs. This probably doesn't have to be
9  * sub-classed off of SHOP_VariableInput since the number of inputs is
10  * fixed. However, since it hides its unconnected inputs, it does a lot
11  * of the things that the variable input needs to do when the inputs
12  * change.
13  */
15 #ifndef __SHOP_Output__
16 #define __SHOP_Output__
18 #include "SHOP_API.h"
19 #include "SHOP_VariableInput.h"
22 {
23 public:
24  SHOP_Output(OP_Network *dad, const char *name,
25  OP_Operator *entry, SHOP_TYPE shader_type=SHOP_MUTABLE)
26  : SHOP_VariableInput(dad, name, entry, shader_type)
27  {
28  }
29  virtual ~SHOP_Output();
31  // Number of outputs in the output SHOP
32  static const int theMaxInputSize;
34  static OP_Node *myConstructor(OP_Network *net,
35  const char *name,
36  OP_Operator *entry);
37  static PRM_Template myTemplateList[];
40  const UT_Options *options);
42  SHOP_TYPE shop_type, fpreal now,
43  const UT_Options *options);
45  virtual unsigned getNumVisibleInputs() const;
46  virtual unsigned maxInputs() const;
47  virtual void getInputName(UT_String &name, int idx) const;
48  virtual SHOP_TYPE getInputType(int idx) const;
50  const OP_ConnectorId& input_name) const;
51  virtual OP_ERROR setInput(unsigned idx, OP_Node *op,
52  unsigned outputIdx=0);
54  virtual OP_ERROR setNamedInput(
55  const OP_ConnectorId& input_name, OP_Node *op,
56  const OP_ConnectorId* output_name = NULL);
58  virtual int getInputTileLOD() const;
59  virtual bool isInputVisible(int idx) const;
61  static int getMaterialOutputCount();
63 protected:
64  virtual void updateVisibleInputsAndOutputs();
65  virtual void preOpChanged(OP_EventType Reason, void *data);
66  SHOP_Node * getInputShop(SHOP_TYPE type);
67 };
69 #endif
SHOP_Output(OP_Network *dad, const char *name, OP_Operator *entry, SHOP_TYPE shader_type=SHOP_MUTABLE)
Definition: SHOP_Output.h:24
virtual unsigned maxInputs() const
Maximum inputs that can be connected to a node.
virtual unsigned getNumVisibleInputs() const
Definition: UT_Error.h:25
virtual void updateVisibleInputsAndOutputs()
virtual SHOP_TYPE getInputType(int idx) const
static const int theMaxInputSize
Definition: SHOP_Output.h:32
virtual void preOpChanged(OP_EventType, void *)
#define SHOP_API
Definition: SHOP_API.h:10
virtual OP_ERROR setInput(unsigned idx, OP_Node *op, unsigned outputIdx=0)
Sets a given input to connect to an output of a particular node.
virtual OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=nullptr)
New input functions that use names instead of indices.
virtual void getInputName(UT_String &name, int idx) const
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
virtual int getInputTileLOD() const
virtual bool isInputVisible(int idx) const
double fpreal
Definition: SYS_Types.h:263
A map of string to various well defined value types.
Definition: UT_Options.h:42
virtual int collectShaders(UT_ValArray< SHOP_Node * > &list, SHOP_TYPE shop_type, fpreal now, const UT_Options *options)
virtual SHOP_Node * findShader(SHOP_TYPE shop_type, fpreal now, const UT_Options *options)
Definition: OP_Value.h:22
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual SHOP_TYPE getNamedInputType(const OP_ConnectorId &input_name) const