50
51
class BlenderSync {
52
BlenderSync(BL::BlendData b_data, BL::Scene b_scene, Scene *scene_, bool preview_);
53
BlenderSync(BL::RenderEngine b_engine_, BL::BlendData b_data, BL::Scene b_scene, Scene *scene_, bool preview_, Progress &progress_, bool is_cpu_);
56
57
bool sync_recalc();
57
void sync_data(BL::SpaceView3D b_v3d, const char *layer = 0);
58
void sync_data(BL::SpaceView3D b_v3d, BL::Object b_override, const char *layer = 0);
58
59
void sync_camera(BL::Object b_override, int width, int height);
59
60
void sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height);
61
int get_layer_samples() { return render_layer.samples; }
61
63
/* get parameters */
62
64
static SceneParams get_scene_params(BL::Scene b_scene, bool background);
63
static SessionParams get_session_params(BL::UserPreferences b_userpref, BL::Scene b_scene, bool background);
65
static SessionParams get_session_params(BL::RenderEngine b_engine, BL::UserPreferences b_userpref, BL::Scene b_scene, bool background);
64
66
static bool get_session_pause(BL::Scene b_scene, bool background);
65
static BufferParams get_buffer_params(BL::Scene b_scene, BL::RegionView3D b_rv3d, int width, int height);
67
static BufferParams get_buffer_params(BL::Scene b_scene, BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, Camera *cam, int width, int height);
70
void sync_materials();
71
void sync_objects(BL::SpaceView3D b_v3d);
71
void sync_lamps(bool update_all);
72
void sync_materials(bool update_all);
73
void sync_objects(BL::SpaceView3D b_v3d, int motion = 0);
74
void sync_motion(BL::SpaceView3D b_v3d, BL::Object b_override);
73
76
void sync_integrator();
78
void sync_world(bool update_all);
76
79
void sync_render_layers(BL::SpaceView3D b_v3d, const char *layer);
77
80
void sync_shaders();
81
void sync_curve_settings();
79
83
void sync_nodes(Shader *shader, BL::ShaderNodeTree b_ntree);
80
Mesh *sync_mesh(BL::Object b_ob, bool holdout, bool object_updated);
81
void sync_object(BL::Object b_parent, int b_index, BL::Object b_object, Transform& tfm, uint layer_flag);
82
void sync_light(BL::Object b_parent, int b_index, BL::Object b_ob, Transform& tfm);
84
Mesh *sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tris);
85
void sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool object_updated);
86
Object *sync_object(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::DupliObject b_dupli_object, Transform& tfm, uint layer_flag, int motion, bool hide_tris);
87
void sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSISTENT_ID_SIZE], BL::Object b_ob, Transform& tfm);
83
88
void sync_background_light();
89
void sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion);
90
void sync_camera_motion(BL::Object b_ob, int motion);
93
bool sync_dupli_particle(BL::Object b_ob, BL::DupliObject b_dup, Object *object);
86
96
void find_shader(BL::ID id, vector<uint>& used_shaders, int default_shader);
87
bool object_is_modified(BL::Object b_ob);
97
bool BKE_object_is_modified(BL::Object b_ob);
88
98
bool object_is_mesh(BL::Object b_ob);
89
99
bool object_is_light(BL::Object b_ob);
102
BL::RenderEngine b_engine;
92
103
BL::BlendData b_data;
93
104
BL::Scene b_scene;
105
117
bool experimental;
107
120
struct RenderLayerInfo {
108
121
RenderLayerInfo()
109
: scene_layer(0), layer(0), holdout_layer(0),
122
: scene_layer(0), layer(0),
123
holdout_layer(0), exclude_layer(0),
110
124
material_override(PointerRNA_NULL),
111
125
use_background(true),
112
use_viewport_visibility(false)
126
use_viewport_visibility(false),
116
131
uint scene_layer;
118
133
uint holdout_layer;
119
135
BL::Material material_override;
120
136
bool use_background;
121
137
bool use_viewport_visibility;
125
145
CCL_NAMESPACE_END