Base class for engine of scene assembly context. A scene assembly context is either a read context or an operator context. A read context allows to load a scene and creates its content on demand (see: OfSceneAssemblyReadContextEngine). An operator context takes as input one or multiples contexts and is able to add/remove/override any items coming from the input.
More...
|
| OfSceneAssemblyContextEngine (OfContext &ctx) |
| constructor
|
|
virtual | ~OfSceneAssemblyContextEngine () |
| destructor
|
|
void | init (ParserGroup *settings) override |
| init the engine
|
|
OfObjectHandle | get_object_handle (OfObject *object, OfClass *missing_class=0) const override |
| Returns a handle for the given object in the context.
|
|
const CoreString & | get_item_full_name (const OfItem &item) override |
| Returns the full name of a given item in the context.
|
|
void | get_item_references (OfSceneDescription::ItemId item_id, CoreVector< OfSceneDescription::ItemId > &references) const override |
| returns the IDs of items referenced by an item
|
|
bool | is_content_dirty () const override |
| returns true if the content has to be updated
|
|
bool | is_content_valid () const override |
| returns true if the content has been correctly generated
|
|
void | update_context () override |
| Update the content of the context if needed. This is called each time we need to access to the content of a context.
|
|
void | get_items_to_serialize (CoreArray< OfObject * > &objects, CoreArray< OfContext * > &contexts) const override |
|
int | on_item_event (const EventObject::EventInfo &event, OfItem *item) override |
| called when an event occurs on an object located in the context engine
|
|
bool | is_traversal () const override |
|
OfItemHandle | get_traversal_item () const override |
|
OfAttrHandle | get_traversal_attr (bool when_traversal_only=true) const override |
|
OfAttr * | get_pass_through () const override |
|
OfItem * | get_traversal_candidate () const override |
|
bool | has_cam_feature () const override |
|
bool | is_shadowable (const OfItem &item) override |
|
virtual void | set_content_dirty () |
| clear the content of the context and flag it as dirty so it is updated the next time we have to know its content
|
|
virtual void | make_real (const CoreBasicArray< OfItemHandle > &items) |
| create a real OF item for all the given items
|
|
bool | is_scene_description_dirty () const |
|
CoreString | get_item_local_path (OfConstItemHandle item) const |
| get the object path relatively to the context engine
|
|
virtual void | on_object_removed (OfObject *removed_object) |
| called when any object is removed
|
|
virtual void | on_context_renamed (OfContext *renamed_context) |
| called when any context is renamed
|
|
virtual void | on_object_renamed (OfObject *renamed_object, const CoreString &old_name) |
| called when any object is renamed
|
|
void | remove_full_name (OfObject *object) |
|
OfProxyId | get_proxy_id (OfItemHandle item) const |
| Get the ID of the given item in this scene assembly context.
|
|
OfProxyId | get_proxy_id (OfPlugHandle plug) const |
| Get the ID of the given plug in this scene assembly context.
|
|
OfItemHandle | get_item_handle (OfProxyId id) const |
| Get a valid item handle for the given ID.
|
|
OfPlugHandle | get_plug_handle (OfProxyId id) const |
| Get a valid plug handle for the given ID.
|
|
bool | has_generate (const OfItem &item) const |
| Return true if this scene assembly context has generard the given item.
|
|
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 | can_reference_file () const |
|
virtual bool | supports_localize () const |
|
OfContext & | get_context () const |
|
virtual const GuiIcon * | get_icon () const |
|
const CoreString & | get_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 ParserGroup * | get_settings () const |
|
virtual CoreString | get_pdir (void) const |
|
virtual void | get_scene (OfSceneDescription &scene) const |
| generate a scene description of the engine context
|
|
OfItem * | get_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
|
|
OfBuildPackageContextEngine * | get_build_package () |
|
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 CoreString | get_cam_identifier () 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.
|
|
OfAttr * | add_attribute (const OfItem::AttrCreationParams ¶ms) |
|
OfAttr * | add_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) |
|
OfAttr * | add_custom_attribute (const OfItem::AttrCreationParams ¶ms) |
|
OfAttr * | add_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 () |
|
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 CoreClassInfo & | get_class_info () const |
|
template<class T > |
T * | cast () |
|
template<class T > |
const T * | cast () const |
|
bool | is_kindof (const CoreClassInfo &cinfo) const |
|
|
OfContextEngine::Result | do_deserialize_objects (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar) override |
|
ParserEntry * | serialize (ParserEntry *entry, const OfSerialOptions &options, AppProgressBar *progress_bar) const override |
|
void | populate_options () override |
|
void | on_options_changed (OfObject &options) override |
|
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
|
|
void | clear () |
| clear all items that were created in the engine context
|
|
virtual void | refresh_content () |
| refresh the content of the scene assembly context
|
|
void | send_event_content_dirty () const |
| send an event to notify that the content of the scene assembly context is dirty
|
|
virtual void | make_virtual (const CoreBasicArray< OfItemHandle > &items) |
| inverse operation of make_real()
|
|
void | add_input_context (OfContext *context) |
| add an input context to the scene assembly context
|
|
void | remove_input_context (OfContext *context) |
| remove an input context from the scene assembly context
|
|
void | set_input_items (const CoreBasicArray< OfItem * > &items) |
| set the input items of the scene assembly context
|
|
OfItemHandle | mirror_item (OfSceneDescription::Item &item_desc, const OfSceneDescription &scene, const VariationTables *tables=0, CoreSet< OfItemHandle > *items_to_move=0) |
| Mirror an item from a description in the scene assembly context.
|
|
OfContext * | create_context_from_path (const CoreString &context_path) const |
| create a context inside the engine context given its local path inside this context
|
|
void | add_item_to_scene (OfItem &item, OfSceneDescription &scene, OfSceneDescription::ItemId parent_id=OfSceneDescription::get_null_id()) const |
| add an OF item already created into the scene description the engine context
|
|
void | override_resources (OfObject *object) |
| apply the overrides on the resources that were done in this context
|
|
void | clear_resource_override (const CoreString &object_path) const |
|
void | clear_resource_overrides () const |
|
virtual void | override_attributes (OfObject *object, OfSceneDescription::ItemId item_id=OfSceneDescription::get_null_id()) |
| modify the values of all the attributes of an object overridden in the scene assembly
|
|
| OfContextEngine (OfContext &ctx) |
|
virtual bool | populate_settings (ParserGroup &group, OfContext *context) const |
|
void | register_component_implementation () |
|
void | _populate_options () |
|
OfAttr * | add_option_attribute (const OfItem::AttrCreationParams ¶ms) |
|
OfAttr * | add_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 ParserEntry * | serialize_export (ParserEntry *entry, const OfSerialOptions &options, AppProgressBar *progress_bar) const |
|
virtual Result | deserialize_objects (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar) |
|
virtual void | deserialize_attrs (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar) |
|
virtual void | do_deserialize_attrs (ParseSerialData *serial_data, const OfSerialOptions &options, AppProgressBar *progress_bar) |
|
virtual void | suspend_objects (const CoreVector< OfItem * > &items) |
|
void | suspend_all_objects () |
|
void | clean_all_suspended_objects (bool only_new=false) |
|
const OfClass * | get_project_item_class () const |
|
Base class for engine of scene assembly context. A scene assembly context is either a read context or an operator context. A read context allows to load a scene and creates its content on demand (see: OfSceneAssemblyReadContextEngine). An operator context takes as input one or multiples contexts and is able to add/remove/override any items coming from the input.