[Bf-committers] Shader node loses Object connection

Smells Like Donkey contact at smellslikedonkey.com
Thu Jul 20 21:58:09 CEST 2017


Hi,

I’m hoping someone here can shed some light on how I can fix this linking issue.

We built a new texture node that can project Bezier curves onto a texture. So it’s a shading node that had a field where you can select a bezier curve. The RNA code is at the end of this if it’s relevant.

It all works and renders fine but there’s a linking issue. If I do these steps...

1. Create an asset with the shader
2. Link that asset in (still works), save the file
3. Reopen (doesn’t work)

...the connection to the Curve doesn’t get set and the node is broken.  Where should I be looking to fix this issue? Any ideas would be appreciated.

Thanks,
Tod.


/**************** Curve Texture ****************/

class ShaderNodeTexCurve : public ShaderNode {
public:
	ShaderNodeTexCurve(const PointerRNA &ptr_arg) :
		ShaderNode(ptr_arg)
		{}

	inline TexMapping texture_mapping(void);
	inline ColorMapping color_mapping(void);
	inline Object object(void);
	enum curve_type_enum {
		curve_type_LINE = 0,
		curve_type_FILL = 1,
		curve_type_GRAD = 2,
	};
	inline curve_type_enum curve_type(void);
	inline void curve_type(curve_type_enum value);

	inline int is_registered_node_type();
	inline NodeInternalSocketTemplate input_template(int index);
	inline NodeInternalSocketTemplate output_template(int index);
};



More information about the Bf-committers mailing list