[Bf-committers] Shader node loses Object connection

Sergey Sharybin sergey.vfx at gmail.com
Thu Jul 20 22:10:06 CEST 2017


Hi,

Hard to tell without seeing actual patch, but guess is that you didn't add
linking code to readfile. You would need to make sure to call newlibadr_us
for the new node, so the pointer to Curve is not properly restored on
redo/reload.

On Thu, Jul 20, 2017 at 9:58 PM, Smells Like Donkey <
contact at smellslikedonkey.com> wrote:

> 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);
> };
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
With best regards, Sergey Sharybin


More information about the Bf-committers mailing list