Clarisse 4.0 SP9 SDK  4.0.0.0.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
OfChannelManager Class Reference

This class implements manager that defines layers and channels in an image. Only one instance of this class exists when Clarisse runs. A channel manager defines a list of Channel Layers, each defining a set of channels with a few options. Channels defined in layers can also be used in groups to create custom channel sets re-using existing channels. (it is not actually used). More...

Inheritance diagram for OfChannelManager:
EventObject CoreCustomData CoreBaseObject CoreBaseType

Classes

struct  Channel
 
struct  ChannelEventInfo
 
struct  LayerParameters
 

Public Types

enum  GroupFlags {
  FLAG_LOCKED = 1,
  FLAG_FACTORY = 2,
  FLAG_DEPRECATED = 4
}
 
enum  ChannelEventType {
  DEL_GROUP = 1,
  ADD_GROUP = 2,
  RENAME_GROUP = 4,
  SET_CHANNEL = 8,
  REORDER_CHANNELS = 16,
  MODIFY_BLEND = 32,
  MODIFY_DESCRIPTION = 64,
  MODIFY_BIT_DEPTH = 128,
  MODIFY_SEPARATOR = 256,
  MODIFY_FILTERING = 512,
  MODIFY_VISUAL_HINT = 1024
}
 
enum  AovBlendingMode {
  AOVBLENDINGMODE_INVALID = -1,
  AOVBLENDINGMODE_BLEND = 0,
  AOVBLENDINGMODE_FIRST,
  AOVBLENDINGMODE_LAST,
  AOVBLENDINGMODE_MIN,
  AOVBLENDINGMODE_MAX,
  AOVBLENDINGMODE_COUNT
}
 
enum  AovFilteringMode {
  AOVFILTERINGMODE_INVALID = -1,
  AOVFILTERINGMODE_USE_FILTER = 0,
  AOVFILTERINGMODE_ADD,
  AOVFILTERINGMODE_FIRST,
  AOVFILTERINGMODE_LAST,
  AOVFILTERINGMODE_MIN,
  AOVFILTERINGMODE_MAX,
  AOVFILTERINGMODE_COUNT
}
 
enum  AovVisualHintMode {
  AOVVISUALHINTMODE_INVALID = -1,
  AOVVISUALHINTMODE_COLOR = 0,
  AOVVISUALHINTMODE_RAW,
  AOVVISUALHINTMODE_BLACK_AND_WHITE,
  AOVVISUALHINTMODE_BLACK_AND_WHITE_NORMALIZED,
  AOVVISUALHINTMODE_HEATMAP,
  AOVVISUALHINTMODE_HEATMAP_NORMALIZED,
  AOVVISUALHINTMODE_NORMAL,
  AOVVISUALHINTMODE_COUNT
}
 
- Public Types inherited from EventObject
typedef void(* EventInfoFunction )(EventObject &, const EventInfo &, void *)
 
typedef void(EventObject::* EventInfoMethod )(EventObject &, const EventInfo &, void *)
 
typedef void(* EventFunction )(EventObject &, const CoreString &, void *)
 
typedef void(EventObject::* EventMethod )(EventObject &, const CoreString &, void *)
 

Public Member Functions

 OfChannelManager (OfApp &app)
 
OfEnumget_groups_enum () const
 
OfEnumget_aovs_enum () const
 
short add_layer (const CoreString &layer_name, const CoreBasicArray< CoreString > &channel_names, const AovBlendingMode &blend_mode, const AovFilteringMode &filter_mode=AOVFILTERINGMODE_USE_FILTER, const AovVisualHintMode &visual_hint_mode=AOVVISUALHINTMODE_COLOR, const CoreString &description="", const char &group_separator=0, const short &bit_depth=4, const short &bit_type=2, const bool &silent=false)
 
short add_channel (const CoreString &channel_name)
 
short add_factory_layer (const CoreString &group_name, const CoreBasicArray< CoreString > &channel_names, const AovBlendingMode &blend_mode, const AovFilteringMode &filter_mode=AOVFILTERINGMODE_USE_FILTER, const AovVisualHintMode &visual_hint_mode=AOVVISUALHINTMODE_COLOR, const CoreString &description="", const char &group_separator=0, const short &bit_depth=4, const short &bit_type=2, const bool &is_deprecated=false)
 
bool set_layer_parameters (const short &layer_id, const LayerParameters &parameters, const bool &update_enum=true)
 
const unsigned int & get_layer_count () const
 
const unsigned int & get_channel_count () const
 
short get_layer_index_from_channel_name (const CoreString &channel_name) const
 Returns the index of the layer containing the specified channel.
 
bool layer_exists (const CoreString &layer_name) const
 
short get_layer_index (const CoreString &layer_name) const
 
short channel_exists (const CoreString &channel_full_name) const
 
const CoreStringget_layer_name (const short &layer_index) const
 
int get_bit_depth (const short &layer_index) const
 
int get_bit_type (const short &layer_index) const
 
AovBlendingMode get_blending_mode (const short &layer_index) const
 
AovFilteringMode get_filtering_mode (const short &layer_index) const
 
AovVisualHintMode get_visual_hint_mode (const short &layer_index) const
 
CoreString get_layer_description (const short &layer_index) const
 
char get_group_separator (const short &layer_index) const
 
bool is_layer_locked (const short &layer_index) const
 
short get_layer_flags (const short &layer_index) const
 
const CoreStringget_channel_name (const short &channel_index) const
 
const CoreStringget_channel_name (const short &group_index, const short &channel_position) const
 
void get_channel_names (const short &group_index, CoreVector< CoreString > &names) const
 
void get_channel_names (const CoreString &group_name, CoreVector< CoreString > &names) const
 
short channel_exists (const CoreString &group_name, const CoreString &channel_name) const
 
short channel_exists (const short &group_index, const CoreString &channel_name) const
 
short channel_exists (const short &group_index, const short &channel_index) const
 
const short * get_channel_indices (const CoreString &group_name) const
 
const short * get_channel_indices (const short &group_index) const
 
unsigned int get_channel_count (const short &group_index) const
 
unsigned int get_channel_count (const CoreString &group_name) const
 
void remove_channel (const CoreString &channel_name)
 
void remove_channel (const short &channel_index)
 
void remove_layer (const CoreString &layer_name)
 
void remove_layer (const short &group_index)
 
void clear_custom_channels ()
 
bool update_channels_from_list (const CoreArray< CoreString > &channel_names)
 
void order_layer (const int &layer_id)
 
ChannelEventInfoget_last_event_info ()
 
bool load_config (const ParserGroup &preferences)
 
bool save_config (ParserGroup &preferences)
 
void start_batch ()
 
void end_batch ()
 
void add_batch_event (ChannelEventInfo &event)
 
- Public Member Functions inherited from EventObject
 EventObject ()
 Constructor.
 
 EventObject (const EventObject &src)
 Copy Constructor.
 
virtual ~EventObject ()
 Destructor.
 
void connect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
void raise_event (const CoreString &event_id) const
 sends an event
 
void connect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen to a specific event.
 
void connect (EventObject &sender, EventInfoMethod event_cb, void *data=0)
 Connects this to an object to listen any of its events.
 
void raise_event (const EventInfo &event_info) const
 sends an event
 
bool disconnect_all (EventObject &sender)
 Disconnects from all objects sender was listening on.
 
void disconnect_all ()
 Disconnects from all objects we were listening on.
 
void remove_all_connection ()
 Disconnects object from other objects it is listening to, and also disconnects all objects listening to it.
 
bool is_connected (EventObject &sender, const CoreString &event_id, void *data)
 
void set_mute (const bool &mute)
 Asks for object muting. This will increase or decrease the muting counter. Unmuting may not be immediat since it will happen only when counter reaches 0.
 
bool is_mute () const
 Returns if object is muted.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventMethod event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoMethod event_cb, void *data=0)
 
unsigned int get_sender_count () const
 
unsigned int get_receiver_count () const
 
virtual size_t get_memory_size () const
 
- Public Member Functions inherited from CoreCustomData
 CoreCustomData (const CoreCustomData &src)
 
void add_custom_data (void *key, const bool &data)
 
void add_custom_data (void *key, const int &data)
 
void add_custom_data (void *key, const unsigned int &data)
 
void add_custom_data (void *key, const char *data)
 
void add_custom_data (void *key, const CoreString &data)
 
void add_custom_data (void *key, const double &data)
 
void add_custom_data (void *key, void *data)
 
void remove_custom_data (void *key)
 
void remove_all_custom_data ()
 
void set_custom_data (void *key, const bool &data)
 
void set_custom_data (void *key, const int &data)
 
void set_custom_data (void *key, const unsigned int &data)
 
void set_custom_data (void *key, const double &data)
 
void set_custom_data (void *key, const char *data)
 
void set_custom_data (void *key, const CoreString &data)
 
void set_custom_data (void *key, void *data)
 
void get_custom_data (void *key, bool &data) const
 
void get_custom_data (void *key, int &data) const
 
void get_custom_data (void *key, unsigned int &data) const
 
void get_custom_data (void *key, double &data) const
 
void get_custom_data (void *key, CoreString &data) const
 
void get_custom_data (void *key, void *&data) const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Static Public Member Functions

static const CoreBasicArray
< const char *[2]> & 
get_channel_name_conversion_table ()
 
static const char * convert_channel_name (const char *name)
 
static const char * get_aov_blending_mode_name (const AovBlendingMode &mode)
 
static const char * get_aov_filtering_mode_name (const AovFilteringMode &mode)
 
static const char * get_aov_visual_hint_mode_name (const AovVisualHintMode &mode)
 
static void get_aov_visual_hint_mode_names (CoreVector< CoreString > &names)
 
- Static Public Member Functions inherited from EventObject
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, const CoreString &event_id, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void connect (EventObject &sender, EventObject &receiver, EventInfoMethod event_cb, void *data=0)
 Static version of the above function.
 
static void raise_event (EventObject &sender, const CoreString &event_id)
 Sends an event.
 
static void raise_event (EventObject &sender, const EventInfo &event_info)
 Sends an event.
 
static void connect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static void connect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen to a specific event.
 
static void connect (EventObject &sender, EventInfoFunction event_cb, void *data=0)
 Connects to an object to listen any of its events.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventFunction event_cb, void *data=0)
 Disconnects this from an object for a specific event.
 
static bool disconnect (EventObject &sender, const CoreString &event_id, EventInfoFunction event_cb, void *data=0)
 
- Static Public Member Functions inherited from CoreCustomData
static void * get_custom_data_key (const CoreString &key)
 
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
static const CoreClassInfoclass_info ()
 

Static Public Attributes

static const short INVALID_INDEX = -2
 
static const short CHANNEL_NONE = -1
 
static const CoreString GROUP_NAME_ALL = "all"
 
static const CoreString GROUP_NAME_RGBA = "rgba"
 
static const CoreString GROUP_NAME_RGB = "rgb"
 
static const CoreString GROUP_NAME_RED = "red"
 
static const CoreString GROUP_NAME_GREEN = "green"
 
static const CoreString GROUP_NAME_BLUE = "blue"
 
static const CoreString GROUP_NAME_ALPHA = "alpha"
 
static const short GROUP_INDEX_ALL = -1
 
static const short GROUP_INDEX_RGBA = 0
 
static const short GROUP_INDEX_RGB = 1
 
static const short GROUP_INDEX_RED = 2
 
static const short GROUP_INDEX_GREEN = 3
 
static const short GROUP_INDEX_BLUE = 4
 
static const short GROUP_INDEX_ALPHA = 5
 

Detailed Description

This class implements manager that defines layers and channels in an image. Only one instance of this class exists when Clarisse runs. A channel manager defines a list of Channel Layers, each defining a set of channels with a few options. Channels defined in layers can also be used in groups to create custom channel sets re-using existing channels. (it is not actually used).


Class Documentation

struct OfChannelManager::ChannelEventInfo
Class Members
unsigned int event_flag
short group_id
CoreString group_name
short item_id
struct OfChannelManager::LayerParameters
Class Members
short bit_depth
short bit_type
AovBlendingMode blend_mode
CoreVector< CoreString > channel_names
CoreString description
AovFilteringMode filter_mode
char group_separator
CoreString layer_name
AovVisualHintMode visual_hint_mode

Member Function Documentation

short OfChannelManager::get_layer_index_from_channel_name ( const CoreString channel_name) const

Returns the index of the layer containing the specified channel.

Note
Returns -1 if the channel does not exists