Clarisse 5.0 SP8 SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
OfBuildPackageContextEngine Class Reference
Inheritance diagram for OfBuildPackageContextEngine:
OfContextEngine CoreBaseObject CoreBaseType


struct  EditKey

Public Types

enum  Mode {
 Build Package mode. More...
- Public Types inherited from OfContextEngine
typedef OfContextEngine *(* CreateEngineCallback )(OfContext &context)
typedef ParseSerialData *(* ParseSerialCallback )(CoreVector< ParserEntry * > &sub_ctx_entries, const CoreBasicArray< ParserEntry * > &serial_entries)
typedef const Descriptor &(* GetDescriptorCallback )()
 Typedef for the callback to get the engine's Descriptor.

Public Member Functions

bool can_reference_file () const override
const GuiIconget_icon () const override
void set_filename (const CoreString &filename)
const CoreStringget_filename () const
unsigned int get_layer_count () const
const CoreStringget_layer_name (unsigned int index) const
const CoreStringget_layer_comment (unsigned int index) const
bool is_layer_disabled (unsigned int index, bool locally) const
bool is_layer_locked (unsigned int index, bool locally) const
bool is_group (unsigned int index) const
unsigned int get_layer_child_count (unsigned int index) const
unsigned int get_layer_parent (unsigned int layer_index) const
 Public getter to retrieve hierarchy on an edit/group layer.
ParserGroupget_layer_serial (unsigned int index, const OfSerialOptions *options=nullptr) const
unsigned int get_active_layer_index () const
Mode get_mode () const
bool is_read_only () const
bool is_override_layer_active () const
bool is_preset_active () const
unsigned int get_preset_names (CoreVector< CoreString > &presets)
const CoreStringget_active_preset () const
const CoreStringget_preset_description (const CoreString &preset_name) const
bool must_update_remote_file () const
void set_update_remote_file (bool value)
bool is_child_of_reference () const
void get_sub_build_packages (CoreVector< OfBuildPackageContextEngine * > &sub_build_packages, bool recursive) const
- Public Member Functions inherited from OfContextEngine
virtual void set_content_dirty (const bool &dirty_sub_contexts=false)
bool is_unknown_engine () const
bool is_project_engine () const
bool is_override_engine () const
bool is_file_reference_engine () const
bool is_usd_reference_engine () const
bool is_scene_assembly_engine () const
bool is_scene_assembly_read_engine () const
bool is_build_package_engine () const
virtual bool supports_localize () const
OfContextget_context () const
const CoreStringget_attr_doc (const CoreString &attr) const
CoreString get_serial_name () const
void pre_serialize (const OfSerialOptions &options)
void post_serialize ()
bool is_serializing () const
bool is_deserializing () const
virtual ParserGroupget_settings () const
virtual CoreString get_pdir (void) const
virtual void get_scene (OfSceneDescription &scene) const
 generate a scene description of the engine context
OfItemget_item (OfSceneDescription::ItemId item_id) const
 create the OF item given the ID of the item in the engine
virtual void get_items (const CoreBasicArray< OfSceneDescription::ItemId > &item_ids, CoreArray< OfItem * > &items) const
 create the OF items given the IDs of the items in the engine
virtual void get_item_references (OfSceneDescription::ItemId item_id, CoreVector< OfSceneDescription::ItemId > &references) const
 returns the IDs of items referenced by an item
virtual OfObjectHandle get_object_handle (OfObject *object, OfClass *missing_class=0) const
 Returns a handle for the given object in the context.
virtual const CoreStringget_item_full_name (const OfItem &item)
 Returns the full name of a given item in the context.
OfBuildPackageContextEngineget_build_package ()
virtual bool is_shadowable (const OfItem &item)
virtual void update_context ()
 Update the content of the context if needed. This is called each time we need to access to the content of a context.
virtual bool is_content_dirty () const
virtual bool is_content_valid () const
virtual void on_add_cam (const CAMInfo &cam_info)
 React to the addition of a new cam, by gathering related attributes and applying the cam t them.
virtual bool is_traversal () const
virtual OfItemHandle get_traversal_item () const
virtual OfAttrget_pass_through () const
virtual OfAttrHandle get_traversal_attr (bool when_traversal_only=true) const
virtual OfItemget_traversal_candidate () const
virtual CoreString get_cam_identifier () const
virtual bool has_cam_feature () const
virtual void * predelete_items (const CoreSet< OfContext * > &contexts, const CoreSet< OfObjectHandle > &objects, const CoreVector< OfObjectHandle > &embedded, OfEndProtectionCallback &cleanup)
virtual void undelete_items (void *blind_data)
virtual void get_overrides (ParserGroup &overrides) const
 Returns a serialization group containing all the overrides applied on items in the context.
virtual void set_overrides (const ParserGroup &overrides, bool append_overrides=false)
 Apply overrides on items in the context given a serialization group containing all the overrides.
virtual bool merge_overrides (CoreBasicArray< OfContextEngine * > contexts)
 Merge overrides of the given contexts into the current one.
OfAttradd_attribute (const OfItem::AttrCreationParams &params)
OfAttradd_attribute (const CoreString &name, const OfAttr::Type &type, const OfAttr::Container &container=OfAttr::CONTAINER_SINGLE, const OfAttr::VisualHint &visual_hint=OfAttr::VISUAL_HINT_DEFAULT, const CoreString &group_name="general")
void remove_all_attributes ()
void remove_attribute (const CoreString &name)
void remove_attribute (OfAttr &attr)
OfAttradd_custom_attribute (const OfItem::AttrCreationParams &params)
OfAttradd_custom_attribute (const CoreString &name, const OfAttr::Type &type, const OfAttr::Container &container=OfAttr::CONTAINER_SINGLE, const OfAttr::VisualHint &visual_hint=OfAttr::VISUAL_HINT_DEFAULT, const CoreString &group_name="general")
void remove_all_custom_attributes ()
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
virtual size_t get_memory_size () const
CoreString get_class_info_name () const
const unsigned long & get_class_info_id () const
virtual bool is_kindof (const CoreClassInfo &cinfo) const
virtual const CoreClassInfoget_class_info () 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

Static Public Member Functions

static const Descriptorget_descriptor ()
- Static Public Member Functions inherited from OfContextEngine
static const Descriptorget_descriptor ()
static void set_icon (const CoreClassInfo &engine_class_info, const GuiIcon *icon)
static void set_icon (const CoreString &engine_serial_name, const GuiIcon *icon)
static void set_custom_icon (const CoreClassInfo &engine_class_info, int key, const GuiIcon *icon)
static void set_attr_doc (const CoreClassInfo &engine_class_info, const CoreString &attr_name, const CoreString &doc)
- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
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 const CoreClassInfoclass_info ()
 Get the type descriptor of this instance.

Static Public Attributes

static constexpr CoreStringView KEYWORD_BUILD_PACKAGE_CLASS = "BuildPackage"_sv
static constexpr CoreStringView KEYWORD_EDIT_LAYER = "edit_layer"_sv
static constexpr CoreStringView KEYWORD_OVERRIDE_LAYER = "override_layer"_sv
static constexpr CoreStringView KEYWORD_BASE_LAYER = "base"_sv
static constexpr CoreStringView KEYWORD_DEFAULT_LAYER = "default"_sv
static constexpr CoreStringView KEYWORD_GROUP_LAYER = "group_layer"_sv
static constexpr CoreStringView KEYWORD_ADDED_ITEMS = "added_items"_sv
static constexpr CoreStringView KEYWORD_EDITS = "edited_items"_sv
static constexpr CoreStringView KEYWORD_UNLOCALIZED = "#unlocalized"_sv
static constexpr CoreStringView KEYWORD_PRESETS = "presets"_sv
 Tag used when editing the local state of an attribute (same tag as in OfOverrideContextEngine)
static constexpr CoreStringView KEYWORD_PRESET_NONE = "None"_sv

Protected Member Functions

void get_status_bar (ComponentInterfaceNodeStatus &status) const override
 customize the status bar of the context in the build view for example, it is possible to display a warning bar if something is going wrong
- Protected Member Functions inherited from OfContextEngine
 OfContextEngine (OfContext &ctx)
void register_component_implementation ()
void _populate_options ()
OfAttradd_option_attribute (const OfItem::AttrCreationParams &params)
OfAttradd_option_attribute (const CoreString &name, const OfAttr::Type &type, const OfAttr::Container &container=OfAttr::CONTAINER_SINGLE, const OfAttr::VisualHint &visual_hint=OfAttr::VISUAL_HINT_DEFAULT, const CoreString &group_name="general")
void remove_all_option_attributes ()
void _on_options_changed (OfObject &options)
virtual void on_context_event (const CoreString &event)
void add_state_deserializing (const int state)
void remove_state_deserializing (const int state)
bool is_state_deserializing (const int state) const
void add_private_flag (const int flag)
void remove_private_flag (const int flag)
bool is_private_flag (const int flag) const
virtual void get_items_to_serialize (CoreArray< OfObject * > &objects, CoreArray< OfContext * > &contexts) const
virtual ParserEntryserialize_export (ParserEntry *entry, const OfSerialOptions &options, AppProgressBar *progress_bar) const
virtual void deserialize_attrs (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar)
virtual Result do_deserialize_objects (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar)
virtual void do_deserialize_attrs (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar)
void suspend_all_objects ()
void clean_all_suspended_objects (bool only_new=false)
const OfClassget_project_item_class () const


class CmdActivatePackageEditLayer
class CmdAddPackageEditLayer
class CmdRemovePackageEditLayers
class CmdClearPackageEditLayers
class CmdMergePackageEditLayers
class CmdDuplicatePackageEditLayer
class CmdSetPackageEditLayerContent
class CmdDisablePackageLayer
class CmdRenamePackageLayer
class CmdMovePackageLayer
class CmdPermutePackageLayers
class CmdCommentPackageLayers
class CmdLockPackageLayers
class CmdAddPackagePreset
class CmdRemovePackagePreset
class CmdDuplicatePackagePreset
class CmdRenamePackagePreset
class CmdPublishPackagePreset
class CmdCommentPackagePreset
class CmdGroupPackageLayers
class CmdUngroupPackageLayers
class MoveItemsToCmd
class OfObjectFactory
class SdkHelpers

Additional Inherited Members

- Protected Types inherited from OfContextEngine
enum  Result {
enum  DeserializingState {
 Context's deserialization state. More...
enum  PrivateFlags {
  NO_FLAGS = 0,
- Static Protected Member Functions inherited from OfContextEngine
static OfContextEnginecreate_engine (OfContext &ctx)
static ParseSerialDataparse_serial (CoreVector< ParserEntry * > &sub_ctx_entries, const CoreBasicArray< ParserEntry * > &serial_entries)
static void prepare_serial_data (ParseSerialData &serial_data, CoreVector< ParserEntry * > &sub_ctx_entries, const CoreBasicArray< ParserEntry * > &serial_entries)
static Result deserialize_data_objects (ParseSerialData &serial_data, OfContextEngine &target_context, const OfSerialOptions &options, AppProgressBar *progress_bar)
static void deserialize_data_attrs (ParseSerialData &serial_data, OfContextEngine &target_context, const OfSerialOptions &options, AppProgressBar *progress_bar)
static void deserialize_data_options (ParseSerialData &serial_data, OfContextEngine &target_context, const OfSerialOptions &options)
static ParserEntryserialize_options (const OfContext &context, const OfSerialOptions &serial_options)
static void deserialize_options (OfContext &context, const ParserEntry *serial, const OfSerialOptions &serial_options)
- Protected Attributes inherited from OfContextEngine
 The OfContext hosting the engine.
const OfClassm_project_item_class
 For optimization.
char m_flag_deserializing
 Context's deserializing state. See DeserializingState.
unsigned int m_private_flags
 See PrivateFlag.
CoreVector< OfAttr * > m_option_attrs
 Keeps track of attributes used as options, for special serialization.
CoreVector< OfAttr * > m_custom_attrs
 Keeps track of custom attributes, for special serialization.
bool m_is_serializing

Member Enumeration Documentation

Build Package mode.


Every modifications are stored in the overrides layer, and the content is synchronized with the referenced build file whenever it is reloaded


Every modifications are pushed in the referenced build file.

Every modifications are stored in the current build package

Import Custom Variable Mode

See Also

Member Function Documentation

bool OfBuildPackageContextEngine::can_reference_file ( ) const

Returns true if the context engine is able to reference a file For example, reference file engine, scene assembly read engine and build package in remote mode must return true

Reimplemented from OfContextEngine.

const OfContextEngine::Descriptor & OfBuildPackageContextEngine::get_descriptor ( )

Get a descriptor for the build package context engine

const GuiIcon * OfBuildPackageContextEngine::get_icon ( ) const

Override to provide a specific icon for each mode

Reimplemented from OfContextEngine.

unsigned int OfBuildPackageContextEngine::get_layer_parent ( unsigned int  layer_index) const

Public getter to retrieve hierarchy on an edit/group layer.

index of group owning the layer, CORE_INVALID_INDEX if none
ParserGroup * OfBuildPackageContextEngine::get_layer_serial ( unsigned int  index,
const OfSerialOptions options = nullptr 
) const

Public getter allowing to get a copy of the serialization of a layer at a given index

optionsOptionnal argument only used for internal serialization purpose
The deletion of the returned parser group must be managed by the caller
unsigned int OfBuildPackageContextEngine::get_preset_names ( CoreVector< CoreString > &  presets)

Fills the lists of presets

the active preset index if any, 0 stands for none
void OfBuildPackageContextEngine::get_status_bar ( ComponentInterfaceNodeStatus status) const

customize the status bar of the context in the build view for example, it is possible to display a warning bar if something is going wrong

statusthe status to modify

Reimplemented from OfContextEngine.

void OfBuildPackageContextEngine::get_sub_build_packages ( CoreVector< OfBuildPackageContextEngine * > &  sub_build_packages,
bool  recursive 
) const

Outputs in sub_build_packages all the build packages inside this build package

bool OfBuildPackageContextEngine::is_preset_active ( ) const

Public method returning true if there is a preset currently applied on the build package

void OfBuildPackageContextEngine::set_filename ( const CoreString filename)

Set the new file path of the build to reference and update the build package