Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton 2018-11-25 08:01:30 +11:00
commit 059c119719
22 changed files with 55 additions and 57 deletions

@ -597,7 +597,7 @@ void BVHEmbree::update_curve_vertex_buffer(RTCGeometry geom_id, const Mesh* mesh
num_motion_steps = mesh->motion_steps;
}
}
const size_t num_curves = mesh->num_curves();
size_t num_keys = 0;
for(size_t j = 0; j < num_curves; ++j) {

@ -707,7 +707,7 @@ public:
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
for(int sample = start_sample; sample < end_sample; sample++) {
if(task.get_cancel() || task_pool.canceled()) {
if(task.need_finish_queue == false)

@ -30,7 +30,7 @@ struct CCLIntersectContext {
RAY_SHADOW_ALL = 1,
RAY_SSS = 2,
RAY_VOLUME_ALL = 3,
} RayType;
KernelGlobals *kg;

@ -210,7 +210,7 @@ ccl_device_inline int ray_triangle_intersect8(
unsigned char mask_sign_T = _mm256_movemask_ps(sign_T_256);
if(((mask_minmaxUVW_pos | mask_sign_T) & prim_num_mask) == prim_num_mask) {
return false;
}
}
__m256 xor_signmask_256 = _mm256_castsi256_ps(_mm256_xor_si256(_mm256_castps_si256(den_256), sign_den_256));

@ -218,7 +218,7 @@ void Scene::device_update(Device *device_, Progress& progress)
object_manager->device_update(device, &dscene, this, progress);
if(progress.get_cancel() || device->have_error()) return;
progress.set_status("Updating Hair Systems");
curve_system_manager->device_update(device, &dscene, this, progress);
@ -248,7 +248,7 @@ void Scene::device_update(Device *device_, Progress& progress)
camera->device_update_volume(device, &dscene, this);
if(progress.get_cancel() || device->have_error()) return;
progress.set_status("Updating Lookup Tables");
lookup_tables->device_update(device, &dscene);

@ -2329,6 +2329,7 @@ static BOOL is_stylus(const char *name, const char *type)
"stylus",
"wizardpen",
"acecad",
"pen",
NULL
};
@ -2384,7 +2385,8 @@ void GHOST_SystemX11::refreshXInputDevices()
if ((m_xtablet.StylusDevice == NULL) &&
(is_stylus(device_info[i].name, device_type) || (device_info[i].type == m_atom.TABLET)))
(is_stylus(device_info[i].name, device_type) && (device_info[i].type != m_atom.TABLET)))
/* for libinput to work reliable, only lookup ValuatorClass in Tablet type:'STYLUS' */
{
// printf("\tfound stylus\n");
m_xtablet.StylusID = device_info[i].id;

@ -443,4 +443,3 @@ int set_listbasepointers(Main *bmain, ListBase **lb)
return (MAX_LIBARRAY - 1);
}

@ -4058,4 +4058,4 @@ bool BKE_image_empty_visible_in_view3d(const Object *ob, const RegionView3D *rv3
else {
return visibility_flag & OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC;
}
}
}

@ -127,7 +127,7 @@ void AnimationCurveCache::sampleMain(Scene *scene, BC_export_transformation_type
}
}
/* When this SamplePoint is not for a Bone,
/* When this SamplePoint is not for a Bone,
* then we just store the Object local matrix here
*/
@ -207,7 +207,7 @@ void AnimationCurveCache::add_sample_point(SamplePoint &point)
* loop over all cached objects
* loop over all fcurves
* record all keyframes
*
*
* The vector sample_frames finally contains a list of vectors
* where each vector contains a list of SamplePoints which
* need to be processed when evaluating the animation.
@ -250,7 +250,7 @@ void AnimationCurveCache::create_sample_frames_generated(float sfra, float efra,
Object *ob = cached_objects[i];
float f = sfra;
do {
do {
int frame_index = int(f);
SamplePoint sample_point(frame_index, ob);
add_sample_point(sample_point);
@ -388,4 +388,4 @@ int SamplePoint::get_fcurve_index()
std::string &SamplePoint::get_path()
{
return path;
}
}

@ -105,17 +105,17 @@ public:
~AnimationCurveCache();
void addObject(Object *obj);
void sampleMain(Scene *scene,
BC_export_transformation_type atm_type,
void sampleMain(Scene *scene,
BC_export_transformation_type atm_type,
bool for_opensim);
void sampleScene(Scene *scene,
BC_export_transformation_type atm_type,
void sampleScene(Scene *scene,
BC_export_transformation_type atm_type,
bool for_opensim,
bool keyframe_at_end = true); // use keys from FCurves, use timeline boundaries
void sampleScene(Scene *scene,
void sampleScene(Scene *scene,
BC_export_transformation_type atm_type,
int sampling_rate, bool for_opensim,
bool keyframe_at_end = true ); // generate keyframes for frames use timeline boundaries

@ -125,7 +125,7 @@ bool AnimationExporter::exportAnimations()
/* TODO: If all actions shall be exported, we need to call the
* AnimationClipExporter which will figure out which actions
* need to be exported for which objects
*/
*/
if (this->export_settings->include_all_actions) {
AnimationClipExporter ace(eval_ctx, sw, export_settings, anim_meta);
ace.exportAnimationClips(sce);
@ -247,7 +247,7 @@ void AnimationExporter::export_bone_animations_recursive(Object *ob, Bone *bone,
{
std::vector<float> frames;
sampler.get_bone_frames(frames, ob, bone);
if (frames.size()) {
BCMatrixSampleMap samples;
bool is_animated = sampler.get_bone_samples(samples, ob, bone);
@ -478,8 +478,8 @@ std::string AnimationExporter::get_semantic_suffix(COLLADASW::InputSemantic::Sem
void AnimationExporter::add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param,
COLLADASW::InputSemantic::Semantics semantic,
bool is_rot,
const std::string axis,
bool is_rot,
const std::string axis,
bool transform)
{
switch (semantic) {
@ -633,7 +633,7 @@ std::string AnimationExporter::collada_source_from_values(BCMatrixSampleMap &sam
}
std::string AnimationExporter::collada_interpolation_source(const BCAnimationCurve &curve,
const std::string& anim_id,
const std::string& anim_id,
const std::string axis,
bool *has_tangents)
{

@ -167,8 +167,8 @@ protected:
/* step through the bone hierarchy */
void export_bone_animations_recursive(
Object *ob_arm,
Bone *bone,
Object *ob_arm,
Bone *bone,
BCAnimationSampler &sampler);
/* Export for one bone */
@ -205,10 +205,10 @@ protected:
std::string collada_source_from_values(
BC_animation_source_type tm_channel,
COLLADASW::InputSemantic::Semantics semantic,
std::vector<float> &values,
const std::string& anim_id,
std::vector<float> &values,
const std::string& anim_id,
const std::string axis_name);
/* Output sources (matrix data) */
std::string collada_source_from_values(
BCMatrixSampleMap &samples,
@ -216,7 +216,7 @@ protected:
/* Interpolation sources */
std::string collada_linear_interpolation_source(
int tot,
int tot,
const std::string& anim_id);
/* source ID = animation_name + semantic_suffix */
@ -239,7 +239,7 @@ protected:
const std::string axis_name);
std::string collada_interpolation_source(const BCAnimationCurve &curve, const std::string& anim_id, std::string axis_name, bool *has_tangents);
std::string get_axis_name(std::string channel, int id);
const std::string get_collada_name(std::string channel_target) const;
std::string get_collada_sid(const BCAnimationCurve &curve, const std::string axis_name);

@ -386,8 +386,8 @@ void BCAnimationCurve::add_value(const float val, const int frame_index)
FCurve *fcu = get_edit_fcurve();
fcu->auto_smoothing = FCURVE_SMOOTH_CONT_ACCEL;
insert_vert_fcurve(
fcu,
frame_index, val,
fcu,
frame_index, val,
BEZT_KEYTYPE_KEYFRAME,
INSERTKEY_NOFLAGS);
@ -676,4 +676,3 @@ void BCBezTriple::get_tangent(Scene *scene, float point[2], bool as_angle, int i
point[1] = bezt.vec[index][1];
}
}

@ -317,7 +317,7 @@ bool BCAnimationSampler::get_object_samples(BCMatrixSampleMap &samples, Object *
#if 0
/*
Add sampled values to FCurve
Add sampled values to FCurve
If no FCurve exists, create a temporary FCurve;
Note: The temporary FCurve will later be removed when the
BCAnimationSampler is removed (by its destructor)
@ -352,7 +352,7 @@ void BCAnimationSampler::add_value_set(
else {
good = sample->get_value(tm_type, array_index, &val, subindex);
}
if (good) {
curve.add_value(val, frame_index);
}

@ -121,22 +121,22 @@ class BCSampleFrameContainer {
* with the timeline frame as key.
*
* Some details on the purpose:
* An Animation is made of multiple FCurves where each FCurve can
* An Animation is made of multiple FCurves where each FCurve can
* have multiple keyframes. When we want to export the animation we
* also can decide whether we want to export the keyframes or a set
* of sample frames at equidistant locations (sample period).
* In any case we must resample first need to resample it fully
* of sample frames at equidistant locations (sample period).
* In any case we must resample first need to resample it fully
* to resolve things like:
*
* - animations by constraints
* - animations by drivers
*
* For this purpose we need to step through the entire animation and
* then sample each frame that contains at least one keyFrame or
* then sample each frame that contains at least one keyFrame or
* sampleFrame. Then for each frame we have to store the transform
* information for all exported objects in a BCSampleframe
*
* The entire set of BCSampleframes is finally collected into
* The entire set of BCSampleframes is finally collected into
* a BCSampleframneContainer
*/

@ -184,5 +184,3 @@ float(&BCMatrix::quat() const)[4]
{
return q;
}

@ -96,7 +96,7 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
*/
isError = (saxFWLError->getSeverity() != COLLADASaxFWL::IError::SEVERITY_ERROR_NONCRITICAL);
}
else {
error_context = "OpenCollada";

@ -88,7 +88,7 @@ void SceneExporter::writeNodeList(std::vector<Object *> &child_objects, Object *
{
/* TODO: Handle the case where a parent is not exported
Actually i am not even sure if this can be done at all
in a good way.
in a good way.
I really prefer to enforce the export of hidden
elements in an object hierarchy. When the children of
the hidden elements are exported as well.
@ -202,7 +202,7 @@ void SceneExporter::writeNodes(Object *ob)
colladaNode.addExtraTechniqueChildParameter("blender", con_tag, "tar_space", con->tarspace);
colladaNode.addExtraTechniqueChildParameter("blender", con_tag, "lin_error", con->lin_error);
//not ideal: add the target object name as another parameter.
//not ideal: add the target object name as another parameter.
//No real mapping in the .dae
//Need support for multiple target objects also.
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);

@ -256,7 +256,7 @@ Object *bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type
}
Mesh *bc_get_mesh_copy(
BlenderContext &blender_context,
BlenderContext &blender_context,
Object *ob,
BC_export_mesh_type export_mesh_type,
bool apply_modifiers,
@ -351,7 +351,7 @@ bool bc_is_in_Export_set(LinkNode *export_set, Object *ob, ViewLayer *view_layer
if (!to_export)
{
/* Mark this object as to_export even if it is not in the
/* Mark this object as to_export even if it is not in the
export list, but it contains children to export */
std::vector<Object *> children;
@ -1266,7 +1266,7 @@ bNode *bc_add_node(bContext *C, bNodeTree *ntree, int node_type, int locx, int l
static bNodeSocket *bc_group_add_input_socket(bNodeTree *ntree, bNode *to_node, int to_index, std::string label)
{
bNodeSocket *to_socket = (bNodeSocket *)BLI_findlink(&to_node->inputs, to_index);
//bNodeSocket *socket = ntreeAddSocketInterfaceFromSocket(ntree, to_node, to_socket);
//return socket;

@ -173,7 +173,7 @@ inline std::string bc_string_after(const std::string& s, const char c)
inline bool bc_startswith(std::string const & value, std::string const & starting)
{
if (starting.size() > value.size())
if (starting.size() > value.size())
return false;
return (value.substr(0, starting.size()) == starting);
}
@ -184,8 +184,8 @@ inline bool bc_endswith(std::string const & value, std::string const & ending)
return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
}
extern std::string bc_replace_string(std::string data, const std::string& pattern, const std::string& replacement);
extern std::string bc_url_encode(std::string data);
extern std::string bc_replace_string(std::string data, const std::string& pattern, const std::string& replacement);
extern std::string bc_url_encode(std::string data);
extern void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene);
extern void bc_match_scale(std::vector<Object *> *objects_done, UnitConverter &unit_converter, bool scale_to_scene);

@ -254,4 +254,4 @@ void DRW_metaball_batch_cache_get_wireframes_face_texbuf(
*face_indices = cache->face_wire.elem_tx;
}
*tri_count = cache->face_wire.tri_count;
}
}

@ -257,7 +257,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
uiLayout *box, *row, *col, *split;
bool include_animations = RNA_boolean_get(imfptr, "include_animations");
int ui_section = RNA_enum_get(imfptr, "prop_bc_export_ui_section");
BC_export_animation_type animation_type = RNA_enum_get(imfptr, "export_animation_type_selection");
BC_export_transformation_type transformation_type = RNA_enum_get(imfptr, "export_transformation_type_selection");
@ -265,7 +265,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
/* Export Options: */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "prop_bc_export_ui_section", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
@ -348,7 +348,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
row = uiLayoutColumn(box, false);
uiItemR(row, imfptr, "keep_smooth_curves", 0, NULL, ICON_NONE);
uiLayoutSetEnabled(row, include_animations &&
uiLayoutSetEnabled(row, include_animations &&
(transformation_type == BC_TRANSFORMATION_TYPE_TRANSROTLOC || animation_type == BC_ANIMATION_EXPORT_KEYS));
row = uiLayoutColumn(box, false);