Nuke binary plugins 15.0.5
 
Loading...
Searching...
No Matches
DD::Image::ValueStuffI Class Reference

Container for values. More...

#include <ValueStuffI.h>

Inheritance diagram for DD::Image::ValueStuffI:
DD::Image::Knob DD::Image::ShapeKnob

Classes

union  ValueStuffArg
 

Public Member Functions

virtual int value_stuff (int what, ValueStuffArg *user=nullptr) const
 
bool set_value (double v, int channel=-1)
 
bool set_value_at (double v, double time, int channel=-1)
 
bool set_value_at_view (double v, double time, int view, int channel=-1)
 
bool set_key (int channel=-1, int view=-1)
 
bool set_key_at (double time, int channel=-1, int view=-1)
 
bool set_values (const double *array, int n)
 
bool set_values_at (const double *array, int n, double time)
 
bool set_values (const float *array, int n)
 
bool set_values_at (const float *array, int n, double time)
 
bool set_values (const int *array, int n)
 
bool set_values_at (const int *array, int n, double time)
 
bool set_values (const U64 *array, int n)
 
bool set_values_at (const U64 *array, int n, double time)
 
bool remove_key (int channel=-1)
 
bool remove_key_at (double time, int channel=-1, int view=-1)
 
void set_range (double a, double b, bool force=false)
 
void set_animation (const char *a, int channel=-1)
 
bool is_key_at (double time, int channel=-1, int view=-1) const
 
bool is_key (int channel=-1) const
 
double get_value (int channel=0) const
 
double get_value_at (double time, int channel=0) const
 
double get_value_at_view (double time, int view, int channel=0) const
 
double get_value_at (const OutputContext &oc, int channel=0) const
 
bool set_expression (const char *v, int channel, int view=-1)
 
int getNumKeys (int channel=-1, int view=-1) const
 
int getKeyIndex (double &time, int channel=-1, int view=-1) const
 
bool split_view (int view)
 
bool unsplit_view (int view)
 
void getKeyFrame (int keyindex, double &x, double &y, double &lslope, double &rslope, double &la, double &ra, unsigned char &interp, unsigned char &extrap, int channel, int view=-1) const
 
void setKeyFrame (int keyindex, double x, double y, double lslope, double rslope, double la, double ra, unsigned char interp, unsigned char extrap, int channel, int view=-1) const
 
void addKeyFrame (double x, double y, double lslope, double rslope, double la, double ra, unsigned char interp, unsigned char extrap, int channel, int view=-1) const
 
void get_expression (std::string &expr, int channel=-1, int view=-1)
 
double getKeyTime (int keyindex, int channel=-1, int view=-1) const
 
double getDerivative (double time, int channel=0, int view=-1) const
 
double getNthDerivative (int n, double time, int channel=0, int view=-1) const
 
double getIntegral (double t1, double t2, int channel=0, int view=-1) const
 
double getInverse (double value, int channel=0, int view=-1) const
 
double getInverseGeneral (double value, int channel=0, int view=-1) const
 
bool set_animated (int channel=-1) const
 
bool is_animated (int channel=-1)
 
bool clear_animated (int channel=-1)
 
bool clear_animated_view (int view, int channel=-1)
 
bool set_animated_view (int view, int channel=-1)
 
bool is_animated_view (int view, int channel=-1)
 
bool toggle ()
 
bool set_input (int input)
 

Protected Types

enum  {
  W_SETVALUES_DBL , W_SETVALUE , W_SETRANGE , W_SETVALUESAT_DBL ,
  W_SETVALUES_FLT , W_SETVALUES_INT , W_SETVALUES_INT64 , W_SETANIMATION ,
  W_SETVALUEAT , W_SETKEY , W_SETKEYAT , W_ISKEYAT ,
  W_GETVALUE , W_SETEXPRESSION , W_SETVALUESAT_FLT , W_SETVALUESAT_INT ,
  W_SETVALUESAT_INT64 , W_GETVALUEAT , W_REMOVEKEY , W_REMOVEKEYAT ,
  W_ISKEY , W_GETNUMKEYS , W_GETKEYINDEX , W_GETKEYTIME ,
  W_GETDERIVATIVE , W_GETINTEGRAL , W_GETVALUEATVIEW , W_SET_ANIMATED ,
  W_IS_ANIMATED , W_CLEAR_ANIMATED , W_TOGGLE , W_SET_INPUT ,
  W_SETVALUEAT_VIEW , W_SPLIT_VIEW , W_UNSPLIT_VIEW , W_CLEAR_ANIMATED_VIEW ,
  W_IS_ANIMATED_VIEW , W_SET_ANIMATED_VIEW , W_GETKEYFRAME , W_SETKEYFRAME ,
  W_ADDKEYFRAME , W_GETEXPRESSION , W_GETINVERSE , W_GETINVERSE_GENERAL
}
 

Detailed Description

Container for values.

Member Function Documentation

◆ value_stuff()

int DD::Image::ValueStuffI::value_stuff ( int  what,
ValueStuffArg user = nullptr 
) const
virtual

Used to pass most of the get/set value functions to the Array_Knob subclass implemented inside Nuke. You may be able to make your knob act like Array Knob by overriding this. The default version returns false.

◆ set_value()

bool DD::Image::ValueStuffI::set_value ( double  v,
int  channel = -1 
)
inline

bool ValueStuffI::set_value(double value, int index);

Change the value of the knob to this value. If the knob stores multiple channels, index is which one to change, or use -1 to change them all. If the channel is animated this will set a keyframe. Returns true if this value is different than the old one.

Referenced by DD::Image::AxisOp::importScenePrim(), and DD::Image::Write::set_file_type().

◆ set_value_at()

bool DD::Image::ValueStuffI::set_value_at ( double  v,
double  time,
int  channel = -1 
)
inline

bool ValueStuffI::set_value_at(double value, double time, int index);

Change the value of the knob at the given time. If the knob is not animated this is the same as set_value(). If you want to make sure the knob is animated call set_animated() first.

◆ remove_key()

bool DD::Image::ValueStuffI::remove_key ( int  channel = -1)
inline

bool ValueStuffI::remove_key(int index) Removes a keyframe, if it exists, at the current frame. Does nothing if the knob is not animated. If the knob stores multiple channels, then index picks which one, or use -1 to do all channels. Returns true if any keyframes were deleted.

◆ remove_key_at()

bool DD::Image::ValueStuffI::remove_key_at ( double  time,
int  channel = -1,
int  view = -1 
)
inline

bool ValueStuffI::remove_key_at(double time, int index) Removes all keyframes at time.

◆ set_range()

void DD::Image::ValueStuffI::set_range ( double  a,
double  b,
bool  force = false 
)
inline

void ValueStuffI::set_range(double a, double b, bool force=false); Set the range displayed by the GUI slider to a..b. force turns on the FORCE_RANGE flag.

◆ set_animation()

void DD::Image::ValueStuffI::set_animation ( const char *  a,
int  channel = -1 
)
inline

void ValueStuffI::set_animation(const char *, int index); Turn on the animation and replace the curve and expression with a new one parsed from the string. See Animation::from_script() for the format of the string. If index is -1 it puts the same curve on all channels.

◆ is_key_at()

bool DD::Image::ValueStuffI::is_key_at ( double  time,
int  channel = -1,
int  view = -1 
) const
inline

bool ValueStuffI::is_key_at(double time, int index); Return true if there is a keyframe at time.

◆ is_key()

bool DD::Image::ValueStuffI::is_key ( int  channel = -1) const
inline

bool ValueStuffI::is_key(int index) Returns true if there is a keyframe at the current frame. If there are multiple channels then index picks which to check, or use -1 for all channels.

◆ get_value()

double DD::Image::ValueStuffI::get_value ( int  channel = 0) const
inline

double ValueStuffI::get_value(int index); Return the numeric value. If it is animated the value at the current frame is returned. If the knob stores multiple channels then index indicates which one (defaults to 0).

Referenced by DD::Image::Read::append(), DD::Image::RenderScene::build_handles(), DD::Image::Write::isWrite(), and DD::Image::Executable::skipForContext().

◆ get_value_at()

double DD::Image::ValueStuffI::get_value_at ( double  time,
int  channel = 0 
) const
inline

double ValueStuffI::get_value_at(double time, int index); If it is animated, return the value at the given time. If not animated this is the same as get_value().

◆ set_expression()

bool DD::Image::ValueStuffI::set_expression ( const char *  v,
int  channel,
int  view = -1 
)
inline

void ValueStuffI::set_expression(const char *expr, int index); Turn on the animation if it is not on, and replace the expression with a new one. If index is -1 it puts the same expression in all channels.

◆ set_animated()

bool DD::Image::ValueStuffI::set_animated ( int  channel = -1) const
inline

void ValueStuffI::*set_animated(int index); Turn on the animation. Does nothing and returns false if already animated. If there are multiple channels, index picks which to animate, or use -1 for all of them.

◆ is_animated()

bool DD::Image::ValueStuffI::is_animated ( int  channel = -1)
inline

bool ValueStuffI::is_animated(int index); Return true if the knob is animated. Use index to only check a certain channel, or use -1 for all of them.

◆ clear_animated()

bool DD::Image::ValueStuffI::clear_animated ( int  channel = -1)
inline

void ValueStuffI::clear_animated(int index); Delete the animation, if any. The knob is left at a constant value equal to whatever value the animation had at the current frame. Use index to only delete a channel, or -1 to delete all of them.

Referenced by DD::Image::AxisOp::importScenePrim().



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com