This is a copy of the DrawIop header file that I am using. It is installed in
our 6.2 directory, but I cannot see any version information in it ....
// DrawIop.h
// Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
#ifndef DDImage_DrawIop_h
#define DDImage_DrawIop_h
#include "DDImage/PixelIop.h"
#define DRAWIOP_HAS_RAMP 1
namespace DD
{
namespace Image
{
class DDImage_API DrawIop : public PixelIop
{
public:
ChannelSet channelset;
ChannelSet premult;
float color1[4];
#if DRAWIOP_HAS_RAMP
float color0[4]; // colors for the ramp
int ramp_type;
double x0, y0, x1, y1; // control points for ramp
enum { NORAMP, LINEAR, SMOOTH0, SMOOTH1, SMOOTH };
float X, Y; // slopes of lines through the control points
float deltaX; // rate of color change horizontally
void calculate_guides();
#endif
float opacity_;
Channel maskChannelMask_;
Channel maskChannelInput_;
bool replace;
bool invert;
bool invert_mask;
bool inject;
int cliptype;
private:
Channel maskChannelI; // mask after being fixed by validate
enum MaskFrom { FROM_MASK, FROM_INPUT } maskFromI;
Channel maskInjectI; // where to write mask to
char validated;
protected:
void _validate(bool);
void _validate(bool, int x, int y, int r, int t);
void pixel_engine(const Row &, int y, int x, int r, ChannelMask, Row &);
void in_channels(int, ChannelSet&) const;
#if DRAWIOP_HAS_RAMP
bool doAnyHandles(ViewerContext*);
void build_handles(ViewerContext*);
void draw_handle(ViewerContext*);
#endif
int knob_changed(Knob*);
public:
virtual bool draw_engine(int y, int x, int r, float* buffer) = 0;
DrawIop(Node * node);
void input_knobs(Knob_Callback);
void output_knobs(Knob_Callback, bool ramp = true);
int optional_input() const;
int minimum_inputs() const;
int maximum_inputs() const;
Op* default_input(int) const;
float uses_input(int) const;
const char* input_label(int, char*) const;
unsigned node_color() const;
};
}
}
#endif
// Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
To your other questions, it makes no difference if the node is connected or
not. Simply attempting to instantiate one when a viewer node is around causes
the seg fault. Putting a simple printf in each of the functions gives me:
"init()" init() 152
"knobs" knobs 474
"knobs" knobs 474
"knobs" knobs 474
"append()" append() 160
Segmentation fault
I will try to boil this down to a simple test case.
I've compiled the Rectangle example plugin and that is just fine.
Cheers
Piotr
________________________________________
From: [email protected]
[[email protected]] on behalf of Peter Pearson
[[email protected]]
Sent: 25 February 2011 05:36
To: [email protected]
Subject: Re: [Nuke-dev] 6.2v2 and DrawIop
On 25/02/11 13:08, Peter Pearson wrote:
> I'd expect a few more obvious problems if this was the case, but:
> are you *sure* you're compiling (and linking) against the DDImage
> headers from Nuke 6.2 and not 6.1? Because Knob.h provides exactly that
> doAnyHandles() declaration, so I don't understand why you declaring it
> within your op would make any difference otherwise...
Actually, strike that, I'm wrong - Nuke's declaration isn't as simple as
that...
Does it make any difference whether you have any inputs connected
(assuming your DrawIop has them) to your DrawIop?
Regards,
Peter Pearson
--
Peter Pearson, Software Engineer
The Foundry, 6th Floor, The Communications Building,
48 Leicester Square, London, UK, WC2H 7LT
Tel: +44 (0)20 7434 0449 - Fax: +44 (0)20 7434 1550
Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd.
Registered in England and Wales No: 4642027
_______________________________________________
Nuke-dev mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
_______________________________________________
Nuke-dev mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev