diff options
21 files changed, 632 insertions, 539 deletions
diff --git a/intern/cycles/util/util_math_fast.h b/intern/cycles/util/util_math_fast.h index e979bd9e0c0..4f92d2f10d3 100644 --- a/intern/cycles/util/util_math_fast.h +++ b/intern/cycles/util/util_math_fast.h @@ -87,7 +87,7 @@ ccl_device_inline int fast_rint(float x) /* Single roundps instruction on SSE4.1+ (for gcc/clang at least). */ return float_to_int(rintf(x)); #else - /* emulate rounding by adding/substracting 0.5. */ + /* emulate rounding by adding/subtracting 0.5. */ return float_to_int(x + copysignf(0.5f, x)); #endif } diff --git a/intern/itasc/Scene.cpp b/intern/itasc/Scene.cpp index 5438a005d7c..0d2486ceac7 100644 --- a/intern/itasc/Scene.cpp +++ b/intern/itasc/Scene.cpp @@ -16,532 +16,623 @@ namespace iTaSC { class SceneLock : public ControlledObject::JointLockCallback { -private: - Scene* m_scene; - Range m_qrange; - -public: - SceneLock(Scene* scene) : - m_scene(scene), m_qrange(0,0) {} - virtual ~SceneLock() {} - - void setRange(Range& range) - { - m_qrange = range; - } - // lock a joint, no need to update output - virtual void lockJoint(unsigned int q_nr, unsigned int ndof) - { - q_nr += m_qrange.start; - project(m_scene->m_Wq, Range(q_nr, ndof), m_qrange).setZero(); - } - // lock a joint and update output in view of reiteration - virtual void lockJoint(unsigned int q_nr, unsigned int ndof, double* qdot) - { - q_nr += m_qrange.start; - project(m_scene->m_Wq, Range(q_nr, ndof), m_qrange).setZero(); - // update the output vector so that the movement of this joint will be - // taken into account and we can put the joint back in its initial position - // which means that the jacobian doesn't need to be changed - for (unsigned int i=0 ;i<ndof ; ++i, ++q_nr) { - m_scene->m_ydot -= m_scene->m_A.col(q_nr)*qdot[i]; - } - } + private: + Scene *m_scene; + Range m_qrange; + + public: + SceneLock(Scene *scene) : m_scene(scene), m_qrange(0, 0) + { + } + virtual ~SceneLock() + { + } + + void setRange(Range &range) + { + m_qrange = range; + } + // lock a joint, no need to update output + virtual void lockJoint(unsigned int q_nr, unsigned int ndof) + { + q_nr += m_qrange.start; + project(m_scene->m_Wq, Range(q_nr, ndof), m_qrange).setZero(); + } + // lock a joint and update output in view of reiteration + virtual void lockJoint(unsigned int q_nr, unsigned int ndof, double *qdot) + { + q_nr += m_qrange.start; + project(m_scene->m_Wq, Range(q_nr, ndof), m_qrange).setZero(); + // update the output vector so that the movement of this joint will be + // taken into account and we can put the joint back in its initial position + // which means that the jacobian doesn't need to be changed + for (unsigned int i = 0; i < ndof; ++i, ++q_nr) { + m_scene->m_ydot -= m_scene->m_A.col(q_nr) * qdot[i]; + } + } }; -Scene::Scene(): - m_A(), m_B(), m_Atemp(), m_Wq(), m_Jf(), m_Jq(), m_Ju(), m_Cf(), m_Cq(), m_Jf_inv(), - m_Vf(),m_Uf(), m_Wy(), m_ydot(), m_qdot(), m_xdot(), m_Sf(),m_tempf(), - m_ncTotal(0),m_nqTotal(0),m_nuTotal(0),m_nsets(0), - m_solver(NULL),m_cache(NULL) +Scene::Scene() + : m_A(), + m_B(), + m_Atemp(), + m_Wq(), + m_Jf(), + m_Jq(), + m_Ju(), + m_Cf(), + m_Cq(), + m_Jf_inv(), + m_Vf(), + m_Uf(), + m_Wy(), + m_ydot(), + m_qdot(), + m_xdot(), + m_Sf(), + m_tempf(), + m_ncTotal(0), + m_nqTotal(0), + m_nuTotal(0), + m_nsets(0), + m_solver(NULL), + m_cache(NULL) { - m_minstep = 0.01; - m_maxstep = 0.06; + m_minstep = 0.01; + m_maxstep = 0.06; } -Scene::~Scene() +Scene::~Scene() { - ConstraintMap::iterator constraint_it; - while ((constraint_it = constraints.begin()) != constraints.end()) { - delete constraint_it->second; - constraints.erase(constraint_it); - } - ObjectMap::iterator object_it; - while ((object_it = objects.begin()) != objects.end()) { - delete object_it->second; - objects.erase(object_it); - } + ConstraintMap::iterator constraint_it; + while ((constraint_it = constraints.begin()) != constraints.end()) { + delete constraint_it->second; + constraints.erase(constraint_it); + } + ObjectMap::iterator object_it; + while ((object_it = objects.begin()) != objects.end()) { + delete object_it->second; + objects.erase(object_it); + } } bool Scene::setParam(SceneParam paramId, double value) { - switch (paramId) { - case MIN_TIMESTEP: - m_minstep = value; - break; - case MAX_TIMESTEP: - m_maxstep = value; - break; - default: - return false; - } - return true; + switch (paramId) { + case MIN_TIMESTEP: + m_minstep = value; + break; + case MAX_TIMESTEP: + m_maxstep = value; + break; + default: + return false; + } + return true; } -bool Scene::addObject(const std::string& name, Object* object, UncontrolledObject* base, const std::string& baseFrame) +bool Scene::addObject(const std::string &name, + Object *object, + UncontrolledObject *base, + const std::string &baseFrame) { - // finalize the object before adding - if (!object->finalize()) - return false; - //Check if Object is controlled or uncontrolled. - if(object->getType()==Object::Controlled){ - int baseFrameIndex = base->addEndEffector(baseFrame); - if (baseFrameIndex < 0) - return false; - std::pair<ObjectMap::iterator, bool> result; - if (base->getNrOfCoordinates() == 0) { - // base is fixed object, no coordinate range - result = objects.insert(ObjectMap::value_type( - name, new Object_struct(object,base,baseFrameIndex, - Range(m_nqTotal,object->getNrOfCoordinates()), - Range(m_ncTotal,((ControlledObject*)object)->getNrOfConstraints()), - Range(0,0)))); - } else { - // base is a moving object, must be in list already - ObjectMap::iterator base_it; - for (base_it=objects.begin(); base_it != objects.end(); base_it++) { - if (base_it->second->object == base) - break; - } - if (base_it == objects.end()) - return false; - result = objects.insert(ObjectMap::value_type( - name, new Object_struct(object,base,baseFrameIndex, - Range(m_nqTotal,object->getNrOfCoordinates()), - Range(m_ncTotal,((ControlledObject*)object)->getNrOfConstraints()), - base_it->second->coordinaterange))); - } - if (!result.second) { - return false; - } - m_nqTotal+=object->getNrOfCoordinates(); - m_ncTotal+=((ControlledObject*)object)->getNrOfConstraints(); - return true; + // finalize the object before adding + if (!object->finalize()) + return false; + // Check if Object is controlled or uncontrolled. + if (object->getType() == Object::Controlled) { + int baseFrameIndex = base->addEndEffector(baseFrame); + if (baseFrameIndex < 0) + return false; + std::pair<ObjectMap::iterator, bool> result; + if (base->getNrOfCoordinates() == 0) { + // base is fixed object, no coordinate range + result = objects.insert(ObjectMap::value_type( + name, + new Object_struct(object, + base, + baseFrameIndex, + Range(m_nqTotal, object->getNrOfCoordinates()), + Range(m_ncTotal, ((ControlledObject *)object)->getNrOfConstraints()), + Range(0, 0)))); + } + else { + // base is a moving object, must be in list already + ObjectMap::iterator base_it; + for (base_it = objects.begin(); base_it != objects.end(); base_it++) { + if (base_it->second->object == base) + break; + } + if (base_it == objects.end()) + return false; + result = objects.insert(ObjectMap::value_type( + name, + new Object_struct(object, + base, + baseFrameIndex, + Range(m_nqTotal, object->getNrOfCoordinates()), + Range(m_ncTotal, ((ControlledObject *)object)->getNrOfConstraints()), + base_it->second->coordinaterange))); } - if(object->getType()==Object::UnControlled){ - if ((WorldObject*)base != &Object::world) - return false; - std::pair<ObjectMap::iterator,bool> result = objects.insert(ObjectMap::value_type( - name,new Object_struct(object,base,0, - Range(0,0), - Range(0,0), - Range(m_nuTotal,object->getNrOfCoordinates())))); - if(!result.second) - return false; - m_nuTotal+=object->getNrOfCoordinates(); - return true; + if (!result.second) { + return false; } - return false; + m_nqTotal += object->getNrOfCoordinates(); + m_ncTotal += ((ControlledObject *)object)->getNrOfConstraints(); + return true; + } + if (object->getType() == Object::UnControlled) { + if ((WorldObject *)base != &Object::world) + return false; + std::pair<ObjectMap::iterator, bool> result = objects.insert( + ObjectMap::value_type(name, + new Object_struct(object, + base, + 0, + Range(0, 0), + Range(0, 0), + Range(m_nuTotal, object->getNrOfCoordinates())))); + if (!result.second) + return false; + m_nuTotal += object->getNrOfCoordinates(); + return true; + } + return false; } -bool Scene::addConstraintSet(const std::string& name,ConstraintSet* task,const std::string& object1,const std::string& object2, const std::string& ee1, const std::string& ee2) +bool Scene::addConstraintSet(const std::string &name, + ConstraintSet *task, + const std::string &object1, + const std::string &object2, + const std::string &ee1, + const std::string &ee2) { - //Check if objects exist: - ObjectMap::iterator object1_it = objects.find(object1); - ObjectMap::iterator object2_it = objects.find(object2); - if(object1_it==objects.end()||object2_it==objects.end()) - return false; - int ee1_index = object1_it->second->object->addEndEffector(ee1); - int ee2_index = object2_it->second->object->addEndEffector(ee2); - if (ee1_index < 0 || ee2_index < 0) - return false; - std::pair<ConstraintMap::iterator,bool> result = - constraints.insert(ConstraintMap::value_type(name,new ConstraintSet_struct( - task,object1_it,ee1_index,object2_it,ee2_index, - Range(m_ncTotal,task->getNrOfConstraints()),Range(6*m_nsets,6)))); - if(!result.second) - return false; - m_ncTotal+=task->getNrOfConstraints(); - m_nsets+=1; - return true; + // Check if objects exist: + ObjectMap::iterator object1_it = objects.find(object1); + ObjectMap::iterator object2_it = objects.find(object2); + if (object1_it == objects.end() || object2_it == objects.end()) + return false; + int ee1_index = object1_it->second->object->addEndEffector(ee1); + int ee2_index = object2_it->second->object->addEndEffector(ee2); + if (ee1_index < 0 || ee2_index < 0) + return false; + std::pair<ConstraintMap::iterator, bool> result = constraints.insert(ConstraintMap::value_type( + name, + new ConstraintSet_struct(task, + object1_it, + ee1_index, + object2_it, + ee2_index, + Range(m_ncTotal, task->getNrOfConstraints()), + Range(6 * m_nsets, 6)))); + if (!result.second) + return false; + m_ncTotal += task->getNrOfConstraints(); + m_nsets += 1; + return true; } -bool Scene::addSolver(Solver* _solver){ - if(m_solver==NULL){ - m_solver=_solver; - return true; - } - else - return false; +bool Scene::addSolver(Solver *_solver) +{ + if (m_solver == NULL) { + m_solver = _solver; + return true; + } + else + return false; } -bool Scene::addCache(Cache* _cache){ - if(m_cache==NULL){ - m_cache=_cache; - return true; - } - else - return false; +bool Scene::addCache(Cache *_cache) +{ + if (m_cache == NULL) { + m_cache = _cache; + return true; + } + else + return false; } -bool Scene::initialize(){ - - //prepare all matrices: - if (m_ncTotal == 0 || m_nqTotal == 0 || m_nsets == 0) - return false; - - m_A = e_zero_matrix(m_ncTotal,m_nqTotal); - if (m_nuTotal > 0) { - m_B = e_zero_matrix(m_ncTotal,m_nuTotal); - m_xdot = e_zero_vector(m_nuTotal); - m_Ju = e_zero_matrix(6*m_nsets,m_nuTotal); - } - m_Atemp = e_zero_matrix(m_ncTotal,6*m_nsets); - m_ydot = e_zero_vector(m_ncTotal); - m_qdot = e_zero_vector(m_nqTotal); - m_Wq = e_zero_matrix(m_nqTotal,m_nqTotal); - m_Wy = e_zero_vector(m_ncTotal); - m_Jq = e_zero_matrix(6*m_nsets,m_nqTotal); - m_Jf = e_zero_matrix(6*m_nsets,6*m_nsets); - m_Jf_inv = m_Jf; - m_Cf = e_zero_matrix(m_ncTotal,m_Jf.rows()); - m_Cq = e_zero_matrix(m_ncTotal,m_nqTotal); - - bool result=true; - // finalize all objects - for (ObjectMap::iterator it=objects.begin(); it!=objects.end(); ++it) { - Object_struct* os = it->second; - - os->object->initCache(m_cache); - if (os->constraintrange.count > 0) - project(m_Cq,os->constraintrange,os->jointrange) = (((ControlledObject*)(os->object))->getCq()); - } - - m_ytask.resize(m_ncTotal); - bool toggle=true; - int cnt = 0; - //Initialize all ConstraintSets: - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it){ - //Calculate the external pose: - ConstraintSet_struct* cs = it->second; - Frame external_pose; - getConstraintPose(cs->task, cs, external_pose); - result&=cs->task->initialise(external_pose); - cs->task->initCache(m_cache); - for (int i=0; i<cs->constraintrange.count; i++, cnt++) { - m_ytask[cnt] = toggle; - } - toggle = !toggle; - project(m_Cf,cs->constraintrange,cs->featurerange)=cs->task->getCf(); - } +bool Scene::initialize() +{ - if(m_solver!=NULL) - m_solver->init(m_nqTotal,m_ncTotal,m_ytask); - else - return false; + // prepare all matrices: + if (m_ncTotal == 0 || m_nqTotal == 0 || m_nsets == 0) + return false; + m_A = e_zero_matrix(m_ncTotal, m_nqTotal); + if (m_nuTotal > 0) { + m_B = e_zero_matrix(m_ncTotal, m_nuTotal); + m_xdot = e_zero_vector(m_nuTotal); + m_Ju = e_zero_matrix(6 * m_nsets, m_nuTotal); + } + m_Atemp = e_zero_matrix(m_ncTotal, 6 * m_nsets); + m_ydot = e_zero_vector(m_ncTotal); + m_qdot = e_zero_vector(m_nqTotal); + m_Wq = e_zero_matrix(m_nqTotal, m_nqTotal); + m_Wy = e_zero_vector(m_ncTotal); + m_Jq = e_zero_matrix(6 * m_nsets, m_nqTotal); + m_Jf = e_zero_matrix(6 * m_nsets, 6 * m_nsets); + m_Jf_inv = m_Jf; + m_Cf = e_zero_matrix(m_ncTotal, m_Jf.rows()); + m_Cq = e_zero_matrix(m_ncTotal, m_nqTotal); + + bool result = true; + // finalize all objects + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + Object_struct *os = it->second; + + os->object->initCache(m_cache); + if (os->constraintrange.count > 0) + project(m_Cq, + os->constraintrange, + os->jointrange) = (((ControlledObject *)(os->object))->getCq()); + } + + m_ytask.resize(m_ncTotal); + bool toggle = true; + int cnt = 0; + // Initialize all ConstraintSets: + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + // Calculate the external pose: + ConstraintSet_struct *cs = it->second; + Frame external_pose; + getConstraintPose(cs->task, cs, external_pose); + result &= cs->task->initialise(external_pose); + cs->task->initCache(m_cache); + for (int i = 0; i < cs->constraintrange.count; i++, cnt++) { + m_ytask[cnt] = toggle; + } + toggle = !toggle; + project(m_Cf, cs->constraintrange, cs->featurerange) = cs->task->getCf(); + } - return result; + if (m_solver != NULL) + m_solver->init(m_nqTotal, m_ncTotal, m_ytask); + else + return false; + + return result; } -bool Scene::getConstraintPose(ConstraintSet* constraint, void *_param, KDL::Frame& _pose) +bool Scene::getConstraintPose(ConstraintSet *constraint, void *_param, KDL::Frame &_pose) { - // function called from constraint when they need to get the external pose - ConstraintSet_struct* cs = (ConstraintSet_struct*)_param; - // verification, the pointer MUST match - assert (constraint == cs->task); - Object_struct* ob1 = cs->object1->second; - Object_struct* ob2 = cs->object2->second; - //Calculate the external pose: - _pose=(ob1->base->getPose(ob1->baseFrameIndex)*ob1->object->getPose(cs->ee1index)).Inverse()*(ob2->base->getPose(ob2->baseFrameIndex)*ob2->object->getPose(cs->ee2index)); - return true; + // function called from constraint when they need to get the external pose + ConstraintSet_struct *cs = (ConstraintSet_struct *)_param; + // verification, the pointer MUST match + assert(constraint == cs->task); + Object_struct *ob1 = cs->object1->second; + Object_struct *ob2 = cs->object2->second; + // Calculate the external pose: + _pose = + (ob1->base->getPose(ob1->baseFrameIndex) * ob1->object->getPose(cs->ee1index)).Inverse() * + (ob2->base->getPose(ob2->baseFrameIndex) * ob2->object->getPose(cs->ee2index)); + return true; } -bool Scene::update(double timestamp, double timestep, unsigned int numsubstep, bool reiterate, bool cache, bool interpolate) +bool Scene::update(double timestamp, + double timestep, + unsigned int numsubstep, + bool reiterate, + bool cache, + bool interpolate) { - // we must have valid timestep and timestamp - if (timestamp < KDL::epsilon || timestep < 0.0) - return false; - Timestamp ts; - ts.realTimestamp = timestamp; - // initially we start with the full timestep to allow velocity estimation over the full interval - ts.realTimestep = timestep; - setCacheTimestamp(ts); - ts.substep = 0; - // for reiteration don't load cache - // reiteration=additional iteration with same timestamp if application finds the convergence not good enough - ts.reiterate = (reiterate) ? 1 : 0; - ts.interpolate = (interpolate) ? 1 : 0; - ts.cache = (cache) ? 1 : 0; - ts.update = 1; - ts.numstep = (numsubstep & 0xFF); - bool autosubstep = (numsubstep == 0) ? true : false; - if (numsubstep < 1) - numsubstep = 1; - double timesubstep = timestep/numsubstep; - double timeleft = timestep; - - if (timeleft == 0.0) { - // this special case correspond to a request to cache data - for(ObjectMap::iterator it=objects.begin();it!=objects.end();++it){ - it->second->object->pushCache(ts); - } - //Update the Constraints - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it){ - it->second->task->pushCache(ts); - } - return true; - } - - // double maxqdot; // UNUSED - e_scalar nlcoef; - SceneLock lockCallback(this); - Frame external_pose; - bool locked; - - // initially we keep timestep unchanged so that update function compute the velocity over - while (numsubstep > 0) { - // get objects - for(ObjectMap::iterator it=objects.begin();it!=objects.end();++it) { - Object_struct* os = it->second; - if (os->object->getType()==Object::Controlled) { - ((ControlledObject*)(os->object))->updateControlOutput(ts); - if (os->constraintrange.count > 0) { - project(m_ydot, os->constraintrange) = ((ControlledObject*)(os->object))->getControlOutput(); - project(m_Wy, os->constraintrange) = ((ControlledObject*)(os->object))->getWy(); - // project(m_Cq,os->constraintrange,os->jointrange) = (((ControlledObject*)(os->object))->getCq()); - } - if (os->jointrange.count > 0) { - project(m_Wq,os->jointrange,os->jointrange) = ((ControlledObject*)(os->object))->getWq(); - } - } - if (os->object->getType()==Object::UnControlled && ((UncontrolledObject*)os->object)->getNrOfCoordinates() != 0) { - ((UncontrolledObject*)(os->object))->updateCoordinates(ts); - if (!ts.substep) { - // velocity of uncontrolled object remains constant during substepping - project(m_xdot,os->coordinaterange) = ((UncontrolledObject*)(os->object))->getXudot(); - } - } - } - - //get new Constraints values - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it) { - ConstraintSet_struct* cs = it->second; - Object_struct* ob1 = cs->object1->second; - Object_struct* ob2 = cs->object2->second; - - if (ob1->base->updated() || ob1->object->updated() || ob2->base->updated() || ob2->object->updated()) { - // the object from which the constraint depends have changed position - // recompute the constraint pose - getConstraintPose(cs->task, cs, external_pose); - cs->task->initialise(external_pose); - } - cs->task->updateControlOutput(ts); - project(m_ydot,cs->constraintrange)=cs->task->getControlOutput(); - if (!ts.substep || cs->task->substep()) { - project(m_Wy,cs->constraintrange)=(cs->task)->getWy(); - //project(m_Cf,cs->constraintrange,cs->featurerange)=cs->task->getCf(); - } - - project(m_Jf,cs->featurerange,cs->featurerange)=cs->task->getJf(); - //std::cout << "Jf = " << Jf << std::endl; - //Transform the reference frame of this jacobian to the world reference frame - Eigen::Block<e_matrix> Jf_part = project(m_Jf,cs->featurerange,cs->featurerange); - changeBase(Jf_part,ob1->base->getPose(ob1->baseFrameIndex)*ob1->object->getPose(cs->ee1index)); - //std::cout << "Jf_w = " << Jf << std::endl; - - //calculate the inverse of Jf - KDL::svd_eigen_HH(project(m_Jf,cs->featurerange,cs->featurerange),m_Uf,m_Sf,m_Vf,m_tempf); - for(unsigned int i=0;i<6;++i) - if(m_Sf(i)<KDL::epsilon) - m_Uf.col(i).setConstant(0.0); - else - m_Uf.col(i)*=(1/m_Sf(i)); - project(m_Jf_inv,cs->featurerange,cs->featurerange).noalias()=m_Vf*m_Uf.transpose(); - - //Get the robotjacobian associated with this constraintset - //Each jacobian is expressed in robot base frame => convert to world reference - //and negate second robot because it is taken reversed when closing the loop: - if(ob1->object->getType()==Object::Controlled){ - project(m_Jq,cs->featurerange,ob1->jointrange) = (((ControlledObject*)(ob1->object))->getJq(cs->ee1index)); - //Transform the reference frame of this jacobian to the world reference frame: - Eigen::Block<e_matrix> Jq_part = project(m_Jq,cs->featurerange,ob1->jointrange); - changeBase(Jq_part,ob1->base->getPose(ob1->baseFrameIndex)); - // if the base of this object is moving, get the Ju part - if (ob1->base->getNrOfCoordinates() != 0) { - // Ju is already computed for world reference frame - project(m_Ju,cs->featurerange,ob1->coordinaterange)=ob1->base->getJu(ob1->baseFrameIndex); - } - } else if (ob1->object->getType() == Object::UnControlled && ((UncontrolledObject*)ob1->object)->getNrOfCoordinates() != 0) { - // object1 is uncontrolled moving object - project(m_Ju,cs->featurerange,ob1->coordinaterange)=((UncontrolledObject*)ob1->object)->getJu(cs->ee1index); - } - if(ob2->object->getType()==Object::Controlled){ - //Get the robotjacobian associated with this constraintset - // process a special case where object2 and object1 are equal but using different end effector - if (ob1->object == ob2->object) { - // we must create a temporary matrix - e_matrix JqTemp(((ControlledObject*)(ob2->object))->getJq(cs->ee2index)); - //Transform the reference frame of this jacobian to the world reference frame: - changeBase(JqTemp,ob2->base->getPose(ob2->baseFrameIndex)); - // substract in place - project(m_Jq,cs->featurerange,ob2->jointrange) -= JqTemp; - } else { - project(m_Jq,cs->featurerange,ob2->jointrange) = -(((ControlledObject*)(ob2->object))->getJq(cs->ee2index)); - //Transform the reference frame of this jacobian to the world reference frame: - Eigen::Block<e_matrix> Jq_part = project(m_Jq,cs->featurerange,ob2->jointrange); - changeBase(Jq_part,ob2->base->getPose(ob2->baseFrameIndex)); - } - if (ob2->base->getNrOfCoordinates() != 0) { - // if base is the same as first object or first object base, - // that portion of m_Ju has been set already => substract inplace - if (ob2->base == ob1->base || ob2->base == ob1->object) { - project(m_Ju,cs->featurerange,ob2->coordinaterange) -= ob2->base->getJu(ob2->baseFrameIndex); - } else { - project(m_Ju,cs->featurerange,ob2->coordinaterange) = -ob2->base->getJu(ob2->baseFrameIndex); - } - } - } else if (ob2->object->getType() == Object::UnControlled && ((UncontrolledObject*)ob2->object)->getNrOfCoordinates() != 0) { - if (ob2->object == ob1->base || ob2->object == ob1->object) { - project(m_Ju,cs->featurerange,ob2->coordinaterange) -= ((UncontrolledObject*)ob2->object)->getJu(cs->ee2index); - } else { - project(m_Ju,cs->featurerange,ob2->coordinaterange) = -((UncontrolledObject*)ob2->object)->getJu(cs->ee2index); - } - } - } - - //Calculate A - m_Atemp.noalias()=m_Cf*m_Jf_inv; - m_A.noalias() = m_Cq-(m_Atemp*m_Jq); - if (m_nuTotal > 0) { - m_B.noalias()=m_Atemp*m_Ju; - m_ydot.noalias() += m_B*m_xdot; - } - - //Call the solver with A, Wq, Wy, ydot to solver qdot: - if(!m_solver->solve(m_A,m_Wy,m_ydot,m_Wq,m_qdot,nlcoef)) - // this should never happen - return false; - //send result to the objects - for(ObjectMap::iterator it=objects.begin();it!=objects.end();++it) { - Object_struct* os = it->second; - if(os->object->getType()==Object::Controlled) - ((ControlledObject*)(os->object))->setJointVelocity(project(m_qdot,os->jointrange)); - } - // compute the constraint velocity - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it){ - ConstraintSet_struct* cs = it->second; - Object_struct* ob1 = cs->object1->second; - Object_struct* ob2 = cs->object2->second; - //Calculate the twist of the world reference frame due to the robots (Jq*qdot+Ju*chiudot): - e_vector6 external_vel = e_zero_vector(6); - if (ob1->jointrange.count > 0) - external_vel.noalias() += (project(m_Jq,cs->featurerange,ob1->jointrange)*project(m_qdot,ob1->jointrange)); - if (ob2->jointrange.count > 0) - external_vel.noalias() += (project(m_Jq,cs->featurerange,ob2->jointrange)*project(m_qdot,ob2->jointrange)); - if (ob1->coordinaterange.count > 0) - external_vel.noalias() += (project(m_Ju,cs->featurerange,ob1->coordinaterange)*project(m_xdot,ob1->coordinaterange)); - if (ob2->coordinaterange.count > 0) - external_vel.noalias() += (project(m_Ju,cs->featurerange,ob2->coordinaterange)*project(m_xdot,ob2->coordinaterange)); - //the twist caused by the constraint must be opposite because of the closed loop - //estimate the velocity of the joints using the inverse jacobian - e_vector6 estimated_chidot = project(m_Jf_inv,cs->featurerange,cs->featurerange)*(-external_vel); - cs->task->setJointVelocity(estimated_chidot); - } - - if (autosubstep) { - // automatic computing of substep based on maximum joint change - // and joint limit gain variation - // We will pass the joint velocity to each object and they will recommend a maximum timestep - timesubstep = timeleft; - // get armature max joint velocity to estimate the maximum duration of integration - // maxqdot = m_qdot.cwise().abs().maxCoeff(); // UNUSED - double maxsubstep = nlcoef*m_maxstep; - if (maxsubstep < m_minstep) - maxsubstep = m_minstep; - if (timesubstep > maxsubstep) - timesubstep = maxsubstep; - for(ObjectMap::iterator it=objects.begin();it!=objects.end();++it){ - Object_struct* os = it->second; - if(os->object->getType()==Object::Controlled) - ((ControlledObject*)(os->object))->getMaxTimestep(timesubstep); - } - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it){ - ConstraintSet_struct* cs = it->second; - cs->task->getMaxTimestep(timesubstep); - } - // use substep that are even dividers of timestep for more regularity - maxsubstep = 2.0*floor(timestep/2.0/timesubstep-0.66666); - timesubstep = (maxsubstep < 0.0) ? timestep : timestep/(2.0+maxsubstep); - if (timesubstep >= timeleft-(m_minstep/2.0)) { - timesubstep = timeleft; - numsubstep = 1; - timeleft = 0.; - } else { - numsubstep = 2; - timeleft -= timesubstep; - } - } - if (numsubstep > 1) { - ts.substep = 1; - } else { - // set substep to false for last iteration so that controlled output - // can be updated in updateKinematics() and model_update)() before next call to Secne::update() - ts.substep = 0; - } - // change timestep so that integration is done correctly - ts.realTimestep = timesubstep; - - do { - ObjectMap::iterator it; - Object_struct* os; - locked = false; - for(it=objects.begin();it!=objects.end();++it){ - os = it->second; - if (os->object->getType()==Object::Controlled) { - lockCallback.setRange(os->jointrange); - if (((ControlledObject*)os->object)->updateJoint(ts, lockCallback)) { - // this means one of the joint was locked and we must rerun - // the solver to update the remaining joints - locked = true; - break; - } - } - } - if (locked) { - // Some rows of m_Wq have been cleared so that the corresponding joint will not move - if(!m_solver->solve(m_A,m_Wy,m_ydot,m_Wq,m_qdot,nlcoef)) - // this should never happen - return false; - - //send result to the objects - for(it=objects.begin();it!=objects.end();++it) { - os = it->second; - if(os->object->getType()==Object::Controlled) - ((ControlledObject*)(os->object))->setJointVelocity(project(m_qdot,os->jointrange)); - } - } - } while (locked); - - //Update the Objects - for(ObjectMap::iterator it=objects.begin();it!=objects.end();++it){ - it->second->object->updateKinematics(ts); - // mark this object not updated since the constraint will be updated anyway - // this flag is only useful to detect external updates - it->second->object->updated(false); - } - //Update the Constraints - for(ConstraintMap::iterator it=constraints.begin();it!=constraints.end();++it){ - ConstraintSet_struct* cs = it->second; - //Calculate the external pose: - getConstraintPose(cs->task, cs, external_pose); - cs->task->modelUpdate(external_pose,ts); - // update the constraint output and cache - cs->task->updateKinematics(ts); - } - numsubstep--; - } - return true; -} + // we must have valid timestep and timestamp + if (timestamp < KDL::epsilon || timestep < 0.0) + return false; + Timestamp ts; + ts.realTimestamp = timestamp; + // initially we start with the full timestep to allow velocity estimation over the full interval + ts.realTimestep = timestep; + setCacheTimestamp(ts); + ts.substep = 0; + // for reiteration don't load cache + // reiteration=additional iteration with same timestamp if application finds the convergence not + // good enough + ts.reiterate = (reiterate) ? 1 : 0; + ts.interpolate = (interpolate) ? 1 : 0; + ts.cache = (cache) ? 1 : 0; + ts.update = 1; + ts.numstep = (numsubstep & 0xFF); + bool autosubstep = (numsubstep == 0) ? true : false; + if (numsubstep < 1) + numsubstep = 1; + double timesubstep = timestep / numsubstep; + double timeleft = timestep; + + if (timeleft == 0.0) { + // this special case correspond to a request to cache data + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + it->second->object->pushCache(ts); + } + // Update the Constraints + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + it->second->task->pushCache(ts); + } + return true; + } + + // double maxqdot; // UNUSED + e_scalar nlcoef; + SceneLock lockCallback(this); + Frame external_pose; + bool locked; + + // initially we keep timestep unchanged so that update function compute the velocity over + while (numsubstep > 0) { + // get objects + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + Object_struct *os = it->second; + if (os->object->getType() == Object::Controlled) { + ((ControlledObject *)(os->object))->updateControlOutput(ts); + if (os->constraintrange.count > 0) { + project(m_ydot, + os->constraintrange) = ((ControlledObject *)(os->object))->getControlOutput(); + project(m_Wy, os->constraintrange) = ((ControlledObject *)(os->object))->getWy(); + // project(m_Cq,os->constraintrange,os->jointrange) = + // (((ControlledObject*)(os->object))->getCq()); + } + if (os->jointrange.count > 0) { + project( + m_Wq, os->jointrange, os->jointrange) = ((ControlledObject *)(os->object))->getWq(); + } + } + if (os->object->getType() == Object::UnControlled && + ((UncontrolledObject *)os->object)->getNrOfCoordinates() != 0) { + ((UncontrolledObject *)(os->object))->updateCoordinates(ts); + if (!ts.substep) { + // velocity of uncontrolled object remains constant during substepping + project(m_xdot, os->coordinaterange) = ((UncontrolledObject *)(os->object))->getXudot(); + } + } + } + + // get new Constraints values + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + ConstraintSet_struct *cs = it->second; + Object_struct *ob1 = cs->object1->second; + Object_struct *ob2 = cs->object2->second; + + if (ob1->base->updated() || ob1->object->updated() || ob2->base->updated() || + ob2->object->updated()) { + // the object from which the constraint depends have changed position + // recompute the constraint pose + getConstraintPose(cs->task, cs, external_pose); + cs->task->initialise(external_pose); + } + cs->task->updateControlOutput(ts); + project(m_ydot, cs->constraintrange) = cs->task->getControlOutput(); + if (!ts.substep || cs->task->substep()) { + project(m_Wy, cs->constraintrange) = (cs->task)->getWy(); + // project(m_Cf,cs->constraintrange,cs->featurerange)=cs->task->getCf(); + } + + project(m_Jf, cs->featurerange, cs->featurerange) = cs->task->getJf(); + // std::cout << "Jf = " << Jf << std::endl; + // Transform the reference frame of this jacobian to the world reference frame + Eigen::Block<e_matrix> Jf_part = project(m_Jf, cs->featurerange, cs->featurerange); + changeBase(Jf_part, + ob1->base->getPose(ob1->baseFrameIndex) * ob1->object->getPose(cs->ee1index)); + // std::cout << "Jf_w = " << Jf << std::endl; + + // calculate the inverse of Jf + KDL::svd_eigen_HH( + project(m_Jf, cs->featurerange, cs->featurerange), m_Uf, m_Sf, m_Vf, m_tempf); + for (unsigned int i = 0; i < 6; ++i) + if (m_Sf(i) < KDL::epsilon) + m_Uf.col(i).setConstant(0.0); + else + m_Uf.col(i) *= (1 / m_Sf(i)); + project(m_Jf_inv, cs->featurerange, cs->featurerange).noalias() = m_Vf * m_Uf.transpose(); + + // Get the robotjacobian associated with this constraintset + // Each jacobian is expressed in robot base frame => convert to world reference + // and negate second robot because it is taken reversed when closing the loop: + if (ob1->object->getType() == Object::Controlled) { + project(m_Jq, + cs->featurerange, + ob1->jointrange) = (((ControlledObject *)(ob1->object))->getJq(cs->ee1index)); + // Transform the reference frame of this jacobian to the world reference frame: + Eigen::Block<e_matrix> Jq_part = project(m_Jq, cs->featurerange, ob1->jointrange); + changeBase(Jq_part, ob1->base->getPose(ob1->baseFrameIndex)); + // if the base of this object is moving, get the Ju part + if (ob1->base->getNrOfCoordinates() != 0) { + // Ju is already computed for world reference frame + project(m_Ju, cs->featurerange, ob1->coordinaterange) = ob1->base->getJu( + ob1->baseFrameIndex); + } + } + else if (ob1->object->getType() == Object::UnControlled && + ((UncontrolledObject *)ob1->object)->getNrOfCoordinates() != 0) { + // object1 is uncontrolled moving object + project(m_Ju, + cs->featurerange, + ob1->coordinaterange) = ((UncontrolledObject *)ob1->object)->getJu(cs->ee1index); + } + if (ob2->object->getType() == Object::Controlled) { + // Get the robotjacobian associated with this constraintset + // process a special case where object2 and object1 are equal but using different end + // effector + if (ob1->object == ob2->object) { + // we must create a temporary matrix + e_matrix JqTemp(((ControlledObject *)(ob2->object))->getJq(cs->ee2index)); + // Transform the reference frame of this jacobian to the world reference frame: + changeBase(JqTemp, ob2->base->getPose(ob2->baseFrameIndex)); + // subtract in place + project(m_Jq, cs->featurerange, ob2->jointrange) -= JqTemp; + } + else { + project(m_Jq, cs->featurerange, ob2->jointrange) = -( + ((ControlledObject *)(ob2->object))->getJq(cs->ee2index)); + // Transform the reference frame of this jacobian to the world reference frame: + Eigen::Block<e_matrix> Jq_part = project(m_Jq, cs->featurerange, ob2->jointrange); + changeBase(Jq_part, ob2->base->getPose(ob2->baseFrameIndex)); + } + if (ob2->base->getNrOfCoordinates() != 0) { + // if base is the same as first object or first object base, + // that portion of m_Ju has been set already => subtract inplace + if (ob2->base == ob1->base || ob2->base == ob1->object) { + project(m_Ju, cs->featurerange, ob2->coordinaterange) -= ob2->base->getJu( + ob2->baseFrameIndex); + } + else { + project(m_Ju, cs->featurerange, ob2->coordinaterange) = -ob2->base->getJu( + ob2->baseFrameIndex); + } + } + } + else if (ob2->object->getType() == Object::UnControlled && + ((UncontrolledObject *)ob2->object)->getNrOfCoordinates() != 0) { + if (ob2->object == ob1->base || ob2->object == ob1->object) { + project(m_Ju, cs->featurerange, ob2->coordinaterange) -= + ((UncontrolledObject *)ob2->object)->getJu(cs->ee2index); + } + else { + project(m_Ju, cs->featurerange, ob2->coordinaterange) = + -((UncontrolledObject *)ob2->object)->getJu(cs->ee2index); + } + } + } + + // Calculate A + m_Atemp.noalias() = m_Cf * m_Jf_inv; + m_A.noalias() = m_Cq - (m_Atemp * m_Jq); + if (m_nuTotal > 0) { + m_B.noalias() = m_Atemp * m_Ju; + m_ydot.noalias() += m_B * m_xdot; + } + // Call the solver with A, Wq, Wy, ydot to solver qdot: + if (!m_solver->solve(m_A, m_Wy, m_ydot, m_Wq, m_qdot, nlcoef)) + // this should never happen + return false; + // send result to the objects + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + Object_struct *os = it->second; + if (os->object->getType() == Object::Controlled) + ((ControlledObject *)(os->object))->setJointVelocity(project(m_qdot, os->jointrange)); + } + // compute the constraint velocity + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + ConstraintSet_struct *cs = it->second; + Object_struct *ob1 = cs->object1->second; + Object_struct *ob2 = cs->object2->second; + // Calculate the twist of the world reference frame due to the robots (Jq*qdot+Ju*chiudot): + e_vector6 external_vel = e_zero_vector(6); + if (ob1->jointrange.count > 0) + external_vel.noalias() += (project(m_Jq, cs->featurerange, ob1->jointrange) * + project(m_qdot, ob1->jointrange)); + if (ob2->jointrange.count > 0) + external_vel.noalias() += (project(m_Jq, cs->featurerange, ob2->jointrange) * + project(m_qdot, ob2->jointrange)); + if (ob1->coordinaterange.count > 0) + external_vel.noalias() += (project(m_Ju, cs->featurerange, ob1->coordinaterange) * + project(m_xdot, ob1->coordinaterange)); + if (ob2->coordinaterange.count > 0) + external_vel.noalias() += (project(m_Ju, cs->featurerange, ob2->coordinaterange) * + project(m_xdot, ob2->coordinaterange)); + // the twist caused by the constraint must be opposite because of the closed loop + // estimate the velocity of the joints using the inverse jacobian + e_vector6 estimated_chidot = project(m_Jf_inv, cs->featurerange, cs->featurerange) * + (-external_vel); + cs->task->setJointVelocity(estimated_chidot); + } + + if (autosubstep) { + // automatic computing of substep based on maximum joint change + // and joint limit gain variation + // We will pass the joint velocity to each object and they will recommend a maximum timestep + timesubstep = timeleft; + // get armature max joint velocity to estimate the maximum duration of integration + // maxqdot = m_qdot.cwise().abs().maxCoeff(); // UNUSED + double maxsubstep = nlcoef * m_maxstep; + if (maxsubstep < m_minstep) + maxsubstep = m_minstep; + if (timesubstep > maxsubstep) + timesubstep = maxsubstep; + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + Object_struct *os = it->second; + if (os->object->getType() == Object::Controlled) + ((ControlledObject *)(os->object))->getMaxTimestep(timesubstep); + } + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + ConstraintSet_struct *cs = it->second; + cs->task->getMaxTimestep(timesubstep); + } + // use substep that are even dividers of timestep for more regularity + maxsubstep = 2.0 * floor(timestep / 2.0 / timesubstep - 0.66666); + timesubstep = (maxsubstep < 0.0) ? timestep : timestep / (2.0 + maxsubstep); + if (timesubstep >= timeleft - (m_minstep / 2.0)) { + timesubstep = timeleft; + numsubstep = 1; + timeleft = 0.; + } + else { + numsubstep = 2; + timeleft -= timesubstep; + } + } + if (numsubstep > 1) { + ts.substep = 1; + } + else { + // set substep to false for last iteration so that controlled output + // can be updated in updateKinematics() and model_update)() before next call to + // Secne::update() + ts.substep = 0; + } + // change timestep so that integration is done correctly + ts.realTimestep = timesubstep; + + do { + ObjectMap::iterator it; + Object_struct *os; + locked = false; + for (it = objects.begin(); it != objects.end(); ++it) { + os = it->second; + if (os->object->getType() == Object::Controlled) { + lockCallback.setRange(os->jointrange); + if (((ControlledObject *)os->object)->updateJoint(ts, lockCallback)) { + // this means one of the joint was locked and we must rerun + // the solver to update the remaining joints + locked = true; + break; + } + } + } + if (locked) { + // Some rows of m_Wq have been cleared so that the corresponding joint will not move + if (!m_solver->solve(m_A, m_Wy, m_ydot, m_Wq, m_qdot, nlcoef)) + // this should never happen + return false; + + // send result to the objects + for (it = objects.begin(); it != objects.end(); ++it) { + os = it->second; + if (os->object->getType() == Object::Controlled) + ((ControlledObject *)(os->object))->setJointVelocity(project(m_qdot, os->jointrange)); + } + } + } while (locked); + + // Update the Objects + for (ObjectMap::iterator it = objects.begin(); it != objects.end(); ++it) { + it->second->object->updateKinematics(ts); + // mark this object not updated since the constraint will be updated anyway + // this flag is only useful to detect external updates + it->second->object->updated(false); + } + // Update the Constraints + for (ConstraintMap::iterator it = constraints.begin(); it != constraints.end(); ++it) { + ConstraintSet_struct *cs = it->second; + // Calculate the external pose: + getConstraintPose(cs->task, cs, external_pose); + cs->task->modelUpdate(external_pose, ts); + // update the constraint output and cache + cs->task->updateKinematics(ts); + } + numsubstep--; + } + return true; } + +} // namespace iTaSC diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index aa80611ac6b..0ec3a322173 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -72,7 +72,7 @@ class SpellChecker: "wasn", # wasn't # Merged words - "antialiasing", + "antialiasing", "antialias", "arcsine", "arccosine", "arctangent", "autoclip", "autocomplete", @@ -241,7 +241,7 @@ class SpellChecker: "unsets", "unshadowed", "unspill", - "unstitchable", + "unstitchable", "unstitch", "unsubdivided", "unsubdivide", "untrusted", "vectorscope", @@ -421,6 +421,7 @@ class SpellChecker: "searchable", "spacebar", "subtractive", + "superellipse", "tooltip", "tooltips", "trackpad", "tuple", @@ -618,6 +619,7 @@ class SpellChecker: "musgrave", "nayar", "netravali", + "nishita", "ogawa", "oren", "peucker", # Ramer-Douglas-Peucker diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 3c0ec8147fe..02495496ee2 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -217,7 +217,7 @@ typedef struct ParticleCollision { /** Collision modifier for current object. */ struct CollisionModifierData *md; - /** Time factor of previous collision, needed for substracting face velocity. */ + /** Time factor of previous collision, needed for subtracting face velocity. */ float f; float fac1, fac2; diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 8178415a8f6..39fbea66637 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -503,7 +503,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.4f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->input_samples = 10; brush->gpencil_settings->active_smooth = ACTIVE_SMOOTH; @@ -686,7 +686,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag &= ~GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 1.0f; - brush->gpencil_settings->flag &= ~GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag &= ~GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->input_samples = 10; brush->gpencil_settings->active_smooth = ACTIVE_SMOOTH; @@ -717,7 +717,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.4f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->input_samples = 10; brush->gpencil_settings->active_smooth = ACTIVE_SMOOTH; @@ -760,7 +760,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.6f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->input_samples = 10; brush->gpencil_settings->active_smooth = ACTIVE_SMOOTH; @@ -812,7 +812,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->draw_strength = 0.5f; brush->gpencil_settings->flag |= GP_BRUSH_DEFAULT_ERASER; brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_ERASE_SOFT; brush->gpencil_tool = GPAINT_TOOL_ERASE; brush->gpencil_settings->eraser_mode = GP_BRUSH_ERASER_SOFT; @@ -859,7 +859,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -872,7 +872,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -885,7 +885,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -898,7 +898,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -911,7 +911,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -924,7 +924,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; zero_v3(brush->secondary_rgb); break; @@ -937,7 +937,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.3f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_flag = GP_SCULPT_FLAG_SMOOTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; @@ -951,7 +951,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.3f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_flag = GP_SCULPT_FLAG_SMOOTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; @@ -965,7 +965,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.5f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -978,7 +978,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->size = 25.0f; brush->gpencil_settings->draw_strength = 0.3f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -991,7 +991,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.3f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -1004,7 +1004,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.3f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -1017,7 +1017,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.5f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -1030,7 +1030,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.5f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -1043,7 +1043,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->size = 25.0f; brush->gpencil_settings->draw_strength = 1.0f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; @@ -1056,7 +1056,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type) brush->gpencil_settings->flag |= GP_BRUSH_USE_PRESSURE; brush->gpencil_settings->draw_strength = 0.8f; - brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE; + brush->gpencil_settings->flag |= GP_BRUSH_USE_STRENGTH_PRESSURE; brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION; break; diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index b9279ace39f..7b7b7ceb84b 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -4203,7 +4203,7 @@ static void dynamic_paint_paint_mesh_cell_point_cb_ex( brushVelocity[v3].v, weights); - /* substract canvas point velocity */ + /* subtract canvas point velocity */ if (bData->velocity) { sub_v3_v3v3(velocity, brushPointVelocity, bData->velocity[index].v); } @@ -4548,7 +4548,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex( ParticleData *pa = psys->particles + part_index; mul_v3_v3fl(velocity, pa->state.vel, particle_timestep); - /* substract canvas point velocity */ + /* subtract canvas point velocity */ if (bData->velocity) { sub_v3_v3(velocity, bData->velocity[index].v); } @@ -4739,7 +4739,7 @@ static void dynamic_paint_paint_single_point_cb_ex(void *__restrict userdata, if (brush->flags & MOD_DPAINT_USES_VELOCITY) { float velocity[3]; - /* substract canvas point velocity */ + /* subtract canvas point velocity */ if (bData->velocity) { sub_v3_v3v3(velocity, brushVelocity->v, bData->velocity[index].v); } diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index 937bf8b1ae6..7c187679ad1 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -3000,7 +3000,7 @@ int isect_line_line_epsilon_v3(const float v1[3], mul_v3_fl(a, dot_v3v3(cb, ab) / dot_v3v3(ab, ab)); add_v3_v3v3(r_i1, v1, a); - /* for the second line, just substract the offset from the first intersection point */ + /* for the second line, just subtract the offset from the first intersection point */ sub_v3_v3v3(r_i2, r_i1, t); return 2; /* two nearest points */ diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index 36fe9df9e5a..c19bf1e7b50 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -487,7 +487,7 @@ void stroke_vertex() vec2 screen_ofs = miter * y; - /* Reminder: we packed the cap flag into the sign of stength and thickness sign. */ + /* Reminder: we packed the cap flag into the sign of strength and thickness sign. */ if ((is_stroke_start && strength1 > 0.0) || (is_stroke_end && thickness1 > 0.0) || (miter_break && !is_stroke_start && !is_stroke_end)) { screen_ofs += line * x; diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c index d648245f232..e8355c1d8da 100644 --- a/source/blender/draw/intern/draw_cache_impl_gpencil.c +++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c @@ -272,7 +272,7 @@ static void gpencil_buffer_add_point(gpStrokeVert *verts, int v, bool is_endpoint) { - /* Note: we use the sign of stength and thickness to pass cap flag. */ + /* Note: we use the sign of strength and thickness to pass cap flag. */ const bool round_cap0 = (gps->caps[0] == GP_STROKE_CAP_ROUND); const bool round_cap1 = (gps->caps[1] == GP_STROKE_CAP_ROUND); gpStrokeVert *vert = &verts[v]; diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index d1be99150ae..9ec04bbb553 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -836,7 +836,7 @@ static short gpencil_stroke_addpoint(tGPsdata *p, } /* color strength */ - if (brush_settings->flag & GP_BRUSH_USE_STENGTH_PRESSURE) { + if (brush_settings->flag & GP_BRUSH_USE_STRENGTH_PRESSURE) { pt->strength *= BKE_curvemapping_evaluateF(brush_settings->curve_strength, 0, pressure); CLAMP(pt->strength, GPENCIL_STRENGTH_MIN, 1.0f); } diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 9006482d7bb..35449ad4d34 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -745,7 +745,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) if (brush_settings->flag & GP_BRUSH_USE_JITTER_PRESSURE) { BKE_curvemapping_init(brush_settings->curve_jitter); } - if (brush_settings->flag & GP_BRUSH_USE_STENGTH_PRESSURE) { + if (brush_settings->flag & GP_BRUSH_USE_STRENGTH_PRESSURE) { BKE_curvemapping_init(brush_settings->curve_strength); } @@ -911,7 +911,7 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) } /* color strength */ - if (brush_settings->flag & GP_BRUSH_USE_STENGTH_PRESSURE) { + if (brush_settings->flag & GP_BRUSH_USE_STRENGTH_PRESSURE) { float curvef = BKE_curvemapping_evaluateF(brush_settings->curve_strength, 0, curve_pressure); strength *= curvef; strength *= brush_settings->draw_strength; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index a3396a80444..cde4039d20f 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -8947,7 +8947,7 @@ static void SCULPT_OT_mask_by_color(wmOperatorType *ot) "preserve_previous_mask", false, "Preserve Previous Mask", - "Preserve the previous mask and add or substract the new one generated by the colors"); + "Preserve the previous mask and add or subtract the new one generated by the colors"); RNA_def_float(ot->srna, "threshold", diff --git a/source/blender/editors/sculpt_paint/sculpt_filter_color.c b/source/blender/editors/sculpt_paint/sculpt_filter_color.c index 878a08ceeb7..912dfd808b0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_filter_color.c +++ b/source/blender/editors/sculpt_paint/sculpt_filter_color.c @@ -322,6 +322,6 @@ void SCULPT_OT_color_filter(struct wmOperatorType *ot) ot->srna, "strength", 1.0f, -10.0f, 10.0f, "Strength", "Filter Strength", -10.0f, 10.0f); PropertyRNA *prop = RNA_def_float_color( - ot->srna, "fill_color", 3, NULL, 0.0f, FLT_MAX, "Fill Color", "fill color", 0.0f, 1.0f); + ot->srna, "fill_color", 3, NULL, 0.0f, FLT_MAX, "Fill Color", "", 0.0f, 1.0f); RNA_def_property_subtype(prop, PROP_COLOR_GAMMA); } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 5c60ece747a..6a63578a363 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2151,7 +2151,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) if (BKE_sequencer_render_loop_check(seq1, last_seq) || BKE_sequencer_render_loop_check(seq2, last_seq) || BKE_sequencer_render_loop_check(seq3, last_seq)) { - BKE_report(op->reports, RPT_ERROR, "Cannot reassign inputs: recursion detected."); + BKE_report(op->reports, RPT_ERROR, "Cannot reassign inputs: recursion detected"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index ad98321c458..956c094c19b 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2109,7 +2109,7 @@ void ED_operatormacros_uvedit(void) ot = WM_operatortype_append_macro("UV_OT_rip_move", "UV Rip Move", - "unstitch UV's and move the result", + "Unstitch UV's and move the result", OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "UV_OT_rip"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c index a95c4ee63fc..e3511d9645e 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c @@ -195,7 +195,7 @@ static void panel_draw(const bContext *C, Panel *panel) row = uiLayoutRow(layout, true); uiItemR(row, &ptr, "use_edit_position", UI_ITEM_R_TOGGLE, IFACE_("Position"), ICON_NONE); - uiItemR(row, &ptr, "use_edit_strength", UI_ITEM_R_TOGGLE, IFACE_("Stength"), ICON_NONE); + uiItemR(row, &ptr, "use_edit_strength", UI_ITEM_R_TOGGLE, IFACE_("Strength"), ICON_NONE); uiItemR(row, &ptr, "use_edit_thickness", UI_ITEM_R_TOGGLE, IFACE_("Thickness"), ICON_NONE); uiItemR(row, &ptr, "use_edit_uv", UI_ITEM_R_TOGGLE, IFACE_("UV"), ICON_NONE); diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 8b42f1a936d..152c5e25910 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -191,7 +191,7 @@ typedef enum eGPDbrush_Flag { /* brush use pressure */ GP_BRUSH_USE_PRESSURE = (1 << 0), /* brush use pressure for alpha factor */ - GP_BRUSH_USE_STENGTH_PRESSURE = (1 << 1), + GP_BRUSH_USE_STRENGTH_PRESSURE = (1 << 1), /* brush use pressure for alpha factor */ GP_BRUSH_USE_JITTER_PRESSURE = (1 << 2), /* fill hide transparent */ diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 00ce5488636..f28222d0947 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1525,7 +1525,7 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_STENGTH_PRESSURE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_STRENGTH_PRESSURE); RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); RNA_def_property_ui_text( prop, "Use Pressure Strength", "Use tablet pressure for color strength"); @@ -2289,7 +2289,7 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Wet Persistence", - "Amount of wet paint that stays in the brush after applyig paint to the surface"); + "Amount of wet paint that stays in the brush after applying paint to the surface"); RNA_def_property_update(prop, 0, "rna_Brush_update"); prop = RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR); diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 8d8a9620466..feb26f8c775 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -2398,7 +2398,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "openvdb_cache_compress_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "openvdb_compression"); RNA_def_property_enum_items(prop, prop_compression_items); - RNA_def_property_ui_text(prop, "Compression", "facession method to be used"); + RNA_def_property_ui_text(prop, "Compression", "Compression method to be used"); prop = RNA_def_property(srna, "openvdb_data_depth", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "openvdb_data_depth"); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index d360e37588c..0cfc6fd569c 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -872,7 +872,7 @@ static void rna_Sequence_input_set(PointerRNA *ptr, Sequence *input = ptr_value.data; if (BKE_sequencer_render_loop_check(input, seq)) { - BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected."); + BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected"); return; } diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c index e1970a57a91..7b039b91188 100644 --- a/source/blender/makesrna/intern/rna_shader_fx.c +++ b/source/blender/makesrna/intern/rna_shader_fx.c @@ -338,7 +338,7 @@ static void rna_def_shader_fx_pixel(BlenderRNA *brna) prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FX_PIXEL_FILTER_NEAREST); - RNA_def_property_ui_text(prop, "Antialiasing", "Antialiase pixels"); + RNA_def_property_ui_text(prop, "Antialiasing", "Antialias pixels"); RNA_def_property_update(prop, NC_OBJECT | ND_SHADERFX, "rna_ShaderFx_update"); } |