Cycles: Cleanup, trailing whitespace
This commit is contained in:
@@ -14,7 +14,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "render/mesh.h"
|
#include "render/mesh.h"
|
||||||
#include "render/object.h"
|
#include "render/object.h"
|
||||||
#include "render/scene.h"
|
#include "render/scene.h"
|
||||||
@@ -293,7 +292,7 @@ static void create_mesh_volume_attribute(BL::Object& b_ob,
|
|||||||
|
|
||||||
if(!b_domain)
|
if(!b_domain)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Attribute *attr = mesh->attributes.add(std);
|
Attribute *attr = mesh->attributes.add(std);
|
||||||
VoxelAttribute *volume_data = attr->data_voxel();
|
VoxelAttribute *volume_data = attr->data_voxel();
|
||||||
bool is_float, is_linear;
|
bool is_float, is_linear;
|
||||||
@@ -982,7 +981,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
|
|||||||
else
|
else
|
||||||
used_shaders.push_back(scene->default_surface);
|
used_shaders.push_back(scene->default_surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* test if we need to sync */
|
/* test if we need to sync */
|
||||||
int requested_geometry_flags = Mesh::GEOMETRY_NONE;
|
int requested_geometry_flags = Mesh::GEOMETRY_NONE;
|
||||||
if(render_layer.use_surfaces) {
|
if(render_layer.use_surfaces) {
|
||||||
@@ -1017,12 +1016,12 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
|
|||||||
/* ensure we only sync instanced meshes once */
|
/* ensure we only sync instanced meshes once */
|
||||||
if(mesh_synced.find(mesh) != mesh_synced.end())
|
if(mesh_synced.find(mesh) != mesh_synced.end())
|
||||||
return mesh;
|
return mesh;
|
||||||
|
|
||||||
mesh_synced.insert(mesh);
|
mesh_synced.insert(mesh);
|
||||||
|
|
||||||
/* create derived mesh */
|
/* create derived mesh */
|
||||||
array<int> oldtriangle = mesh->triangles;
|
array<int> oldtriangle = mesh->triangles;
|
||||||
|
|
||||||
/* compares curve_keys rather than strands in order to handle quick hair
|
/* compares curve_keys rather than strands in order to handle quick hair
|
||||||
* adjustments in dynamic BVH - other methods could probably do this better*/
|
* adjustments in dynamic BVH - other methods could probably do this better*/
|
||||||
array<float3> oldcurve_keys = mesh->curve_keys;
|
array<float3> oldcurve_keys = mesh->curve_keys;
|
||||||
@@ -1111,7 +1110,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
|
|||||||
if(memcmp(&oldcurve_radius[0], &mesh->curve_radius[0], sizeof(float)*oldcurve_radius.size()) != 0)
|
if(memcmp(&oldcurve_radius[0], &mesh->curve_radius[0], sizeof(float)*oldcurve_radius.size()) != 0)
|
||||||
rebuild = true;
|
rebuild = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh->tag_update(scene, rebuild);
|
mesh->tag_update(scene, rebuild);
|
||||||
|
|
||||||
return mesh;
|
return mesh;
|
||||||
@@ -1140,7 +1139,7 @@ void BlenderSync::sync_mesh_motion(BL::Object& b_ob,
|
|||||||
if(scene->need_motion() == Scene::MOTION_BLUR) {
|
if(scene->need_motion() == Scene::MOTION_BLUR) {
|
||||||
if(!mesh->use_motion_blur)
|
if(!mesh->use_motion_blur)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* see if this mesh needs motion data at this time */
|
/* see if this mesh needs motion data at this time */
|
||||||
vector<float> object_times = object->motion_times();
|
vector<float> object_times = object->motion_times();
|
||||||
bool found = false;
|
bool found = false;
|
||||||
@@ -1172,7 +1171,7 @@ void BlenderSync::sync_mesh_motion(BL::Object& b_ob,
|
|||||||
|
|
||||||
if(!numverts && !numkeys)
|
if(!numverts && !numkeys)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* skip objects without deforming modifiers. this is not totally reliable,
|
/* skip objects without deforming modifiers. this is not totally reliable,
|
||||||
* would need a more extensive check to see which objects are animated */
|
* would need a more extensive check to see which objects are animated */
|
||||||
BL::Mesh b_mesh(PointerRNA_NULL);
|
BL::Mesh b_mesh(PointerRNA_NULL);
|
||||||
|
@@ -299,7 +299,7 @@ static inline uint get_layer(const BL::Array<int, 20>& array)
|
|||||||
for(uint i = 0; i < 20; i++)
|
for(uint i = 0; i < 20; i++)
|
||||||
if(array[i])
|
if(array[i])
|
||||||
layer |= (1 << i);
|
layer |= (1 << i);
|
||||||
|
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ static inline string get_string(PointerRNA& ptr, const char *name)
|
|||||||
string str(cstr);
|
string str(cstr);
|
||||||
if(cstr != cstrbuf)
|
if(cstr != cstrbuf)
|
||||||
MEM_freeN(cstr);
|
MEM_freeN(cstr);
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +451,7 @@ static inline string blender_absolute_path(BL::BlendData& b_data,
|
|||||||
{
|
{
|
||||||
if(path.size() >= 2 && path[0] == '/' && path[1] == '/') {
|
if(path.size() >= 2 && path[0] == '/' && path[1] == '/') {
|
||||||
string dirname;
|
string dirname;
|
||||||
|
|
||||||
if(b_id.library()) {
|
if(b_id.library()) {
|
||||||
BL::ID b_library_id(b_id.library());
|
BL::ID b_library_id(b_id.library());
|
||||||
dirname = blender_absolute_path(b_data,
|
dirname = blender_absolute_path(b_data,
|
||||||
@@ -544,7 +544,7 @@ static inline BL::SmokeDomainSettings object_smoke_domain_find(BL::Object& b_ob)
|
|||||||
return b_smd.domain_settings();
|
return b_smd.domain_settings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return BL::SmokeDomainSettings(PointerRNA_NULL);
|
return BL::SmokeDomainSettings(PointerRNA_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -816,4 +816,3 @@ protected:
|
|||||||
CCL_NAMESPACE_END
|
CCL_NAMESPACE_END
|
||||||
|
|
||||||
#endif /* __BLENDER_UTIL_H__ */
|
#endif /* __BLENDER_UTIL_H__ */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user