Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_sync.h
| Context not available. | |||||
| #include "render/scene.h" | #include "render/scene.h" | ||||
| #include "render/session.h" | #include "render/session.h" | ||||
| #include "util/util_task.h" | |||||
| #include "util/util_thread.h" | |||||
| #include "util/util_map.h" | #include "util/util_map.h" | ||||
| #include "util/util_set.h" | #include "util/util_set.h" | ||||
| #include "util/util_transform.h" | #include "util/util_transform.h" | ||||
| Context not available. | |||||
| class Light; | class Light; | ||||
| class Mesh; | class Mesh; | ||||
| class Object; | class Object; | ||||
| class ObjectSyncTask; | |||||
| class ParticleSystem; | class ParticleSystem; | ||||
| class Scene; | class Scene; | ||||
| class ViewLayer; | class ViewLayer; | ||||
| Context not available. | |||||
| class ShaderGraph; | class ShaderGraph; | ||||
| class ShaderNode; | class ShaderNode; | ||||
| // RJ | |||||
| typedef struct SyncObject { | |||||
| // Object transform matrix. | |||||
| // Worldspace position and | |||||
| // orientation of the object. | |||||
| Transform tfm; | |||||
| // Object from the Blender side | |||||
| // which needs to be synchronized. | |||||
| // | |||||
| // NOTE: This object might come from | |||||
| // an instanced object, so to access | |||||
| // the transform use the corresponding | |||||
| // SyncObject::tfm object in this struct | |||||
| BL::Object b_object; | |||||
| BL::Object b_parent; | |||||
| BL::Object b_ob_instance; | |||||
| // Grab all the instancing properties | |||||
| // (like persistent_id) that come from | |||||
| // temporary entities (on the Blender | |||||
| // side, they're called DupliObject) | |||||
| bool is_instance; | |||||
| bool is_light; | |||||
| bool is_mesh; | |||||
| bool is_holdout; | |||||
| bool is_shadow_catcher; | |||||
| int *persistent_id; | |||||
| float shadow_terminator_offset; | |||||
| float3 dupli_generated; | |||||
| float2 dupli_uv; | |||||
| uint random_id; | |||||
| uint base_visibility; | |||||
| uint parent_visibility; | |||||
| struct ParticleSystem *particle_system; | |||||
| std::string name; | |||||
| SyncObject() | |||||
| : b_object(PointerRNA_NULL), | |||||
| b_parent(PointerRNA_NULL), | |||||
| b_ob_instance(PointerRNA_NULL), | |||||
| is_instance(false), | |||||
| is_light(false), | |||||
| is_mesh(false), | |||||
| is_holdout(false), | |||||
| is_shadow_catcher(false), | |||||
| persistent_id(NULL), | |||||
| shadow_terminator_offset(0.0f), | |||||
| random_id(0), | |||||
| base_visibility(0), | |||||
| parent_visibility(0), | |||||
| particle_system(NULL), | |||||
| name("") | |||||
| { | |||||
| } | |||||
| } SyncObject; | |||||
| class BlenderSync { | class BlenderSync { | ||||
| public: | public: | ||||
| BlenderSync(BL::RenderEngine &b_engine, | BlenderSync(BL::RenderEngine &b_engine, | ||||
| Context not available. | |||||
| bool show_lights, | bool show_lights, | ||||
| BlenderObjectCulling &culling, | BlenderObjectCulling &culling, | ||||
| bool *use_portal); | bool *use_portal); | ||||
| Object *sync_task(BL::Depsgraph &b_depsgraph, | |||||
| BL::ViewLayer &b_view_layer, | |||||
| BL::DepsgraphObjectInstance &b_instance, | |||||
| float motion_time, | |||||
| bool use_particle_hair, | |||||
| bool show_lights, | |||||
| BlenderObjectCulling &culling, | |||||
| bool *use_portal, | |||||
| SyncObject &curr_obj); | |||||
| /* Volume */ | /* Volume */ | ||||
| void sync_volume(BL::Object &b_ob, Mesh *mesh, const vector<Shader *> &used_shaders); | void sync_volume(BL::Object &b_ob, Mesh *mesh, const vector<Shader *> &used_shaders); | ||||
| Context not available. | |||||
| BL::RenderSettings &b_render, BL::Object &b_ob, int width, int height, float motion_time); | BL::RenderSettings &b_render, BL::Object &b_ob, int width, int height, float motion_time); | ||||
| /* Geometry */ | /* Geometry */ | ||||
| Geometry *sync_geometry(BL::Depsgraph &b_depsgrpah, | Geometry *sync_geometry(BL::Depsgraph &b_depsgraph, | ||||
| BL::Object &b_ob, | BL::Object &b_ob, | ||||
| BL::Object &b_ob_instance, | BL::Object &b_ob_instance, | ||||
| bool object_updated, | bool object_updated, | ||||
| bool use_particle_hair); | bool use_particle_hair); | ||||
| Geometry *sync_geometry(BL::Depsgraph &b_depsgraph, | |||||
| BL::Object &b_ob, | |||||
| BL::Object &b_ob_instance, | |||||
| bool object_updated, | |||||
| bool use_particle_hair, | |||||
| SyncObject &curr_obj); | |||||
| void sync_geometry_motion(BL::Depsgraph &b_depsgraph, | void sync_geometry_motion(BL::Depsgraph &b_depsgraph, | ||||
| BL::Object &b_ob, | BL::Object &b_ob, | ||||
| Object *object, | Object *object, | ||||
| Context not available. | |||||
| } view_layer; | } view_layer; | ||||
| Progress &progress; | Progress &progress; | ||||
| protected: | |||||
| thread_mutex mutex, mutex2; | |||||
| TaskPool task_pool; | |||||
| }; | }; | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||
| Context not available. | |||||