Fix T48671: Cycles crash with OSL nodes and bump after recent refactoring.

This commit is contained in:
2016-06-18 12:30:59 +02:00
parent 7ac126e728
commit d67c07ea49
2 changed files with 10 additions and 4 deletions

View File

@@ -4991,6 +4991,13 @@ OSLNode::~OSLNode()
delete type;
}
ShaderNode *OSLNode::clone() const
{
OSLNode *node = new OSLNode(*this);
node->type = new NodeType(*type);
return node;
}
OSLNode* OSLNode::create(size_t num_inputs)
{
/* allocate space for the node itself and parameters, aligned to 16 bytes

View File

@@ -912,11 +912,13 @@ public:
static OSLNode *create(size_t num_inputs);
~OSLNode();
ShaderNode *clone() const;
char* input_default_value();
void add_input(ustring name, SocketType::Type type);
void add_output(ustring name, SocketType::Type type);
SHADER_NODE_BASE_CLASS(OSLNode)
SHADER_NODE_NO_CLONE_CLASS(OSLNode)
/* ideally we could beter detect this, but we can't query this now */
bool has_spatial_varying() { return true; }
@@ -924,9 +926,6 @@ public:
string filepath;
string bytecode_hash;
private:
OSLNode();
};
class NormalMapNode : public ShaderNode {