Merge branch 'master' into blender2.8
This commit is contained in:
commit
eae486f5e6
@ -2,13 +2,14 @@
|
|||||||
Modal Execution
|
Modal Execution
|
||||||
+++++++++++++++
|
+++++++++++++++
|
||||||
|
|
||||||
This operator defines a :class:`Operator.modal` function which running,
|
This operator defines a :class:`Operator.modal` function that will keep being
|
||||||
handling events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
|
run to handle events until it returns ``{'FINISHED'}`` or ``{'CANCELLED'}``.
|
||||||
|
|
||||||
Grab, Rotate, Scale and Fly-Mode are examples of modal operators.
|
Modal operators run every time a new event is detected, such as a mouse click
|
||||||
They are especially useful for interactive tools,
|
or key press. Conversely, when no new events are detected, the modal operator
|
||||||
your operator can have its own state where keys toggle options as the operator
|
will not run. Modal operators are especially useful for interactive tools, an
|
||||||
runs.
|
operator can have its own state where keys toggle options as the operator runs.
|
||||||
|
Grab, Rotate, Scale, and Fly-Mode are examples of modal operators.
|
||||||
|
|
||||||
:class:`Operator.invoke` is used to initialize the operator as being by
|
:class:`Operator.invoke` is used to initialize the operator as being by
|
||||||
returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
|
returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
|
||||||
|
@ -432,7 +432,7 @@ AbcTransformWriter * AbcExporter::createTransformWriter(Object *ob, Object *pare
|
|||||||
|
|
||||||
/* check if we have already created a transform writer for this object */
|
/* check if we have already created a transform writer for this object */
|
||||||
AbcTransformWriter *my_writer = getXForm(name);
|
AbcTransformWriter *my_writer = getXForm(name);
|
||||||
if (my_writer != NULL){
|
if (my_writer != NULL) {
|
||||||
return my_writer;
|
return my_writer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ void create_swapped_rotation_matrix(
|
|||||||
float rz;
|
float rz;
|
||||||
|
|
||||||
/* Apply transformation */
|
/* Apply transformation */
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case ABC_ZUP_FROM_YUP:
|
case ABC_ZUP_FROM_YUP:
|
||||||
ry = -euler[2];
|
ry = -euler[2];
|
||||||
rz = euler[1];
|
rz = euler[1];
|
||||||
@ -205,7 +205,7 @@ void copy_m44_axis_swap(float dst_mat[4][4], float src_mat[4][4], AbcAxisSwapMod
|
|||||||
copy_m4_m3(dst_mat, dst_rot);
|
copy_m4_m3(dst_mat, dst_rot);
|
||||||
|
|
||||||
/* Apply translation */
|
/* Apply translation */
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case ABC_ZUP_FROM_YUP:
|
case ABC_ZUP_FROM_YUP:
|
||||||
copy_zup_from_yup(dst_mat[3], src_trans);
|
copy_zup_from_yup(dst_mat[3], src_trans);
|
||||||
break;
|
break;
|
||||||
|
@ -470,7 +470,8 @@ static std::pair<bool, AbcObjectReader *> visit_object(
|
|||||||
else {
|
else {
|
||||||
if (child_claims_this_object) {
|
if (child_claims_this_object) {
|
||||||
claiming_child_readers.push_back(child_reader);
|
claiming_child_readers.push_back(child_reader);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
nonclaiming_child_readers.push_back(child_reader);
|
nonclaiming_child_readers.push_back(child_reader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1092,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti
|
|||||||
|
|
||||||
/* For hair, sort by origindex (allows optimization's in rendering), */
|
/* For hair, sort by origindex (allows optimization's in rendering), */
|
||||||
/* however with virtual parents the children need to be in random order. */
|
/* however with virtual parents the children need to be in random order. */
|
||||||
if (part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents!=0.0f)) {
|
if (part->type == PART_HAIR && !(part->childtype==PART_CHILD_FACES && part->parents != 0.0f)) {
|
||||||
int *orig_index = NULL;
|
int *orig_index = NULL;
|
||||||
|
|
||||||
if (from == PART_FROM_VERT) {
|
if (from == PART_FROM_VERT) {
|
||||||
|
@ -1000,7 +1000,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
|
|||||||
part=psys->part;
|
part=psys->part;
|
||||||
|
|
||||||
/* get precise emitter matrix if particle is born */
|
/* get precise emitter matrix if particle is born */
|
||||||
if (part->type!=PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
|
if (part->type != PART_HAIR && dtime > 0.f && pa->time < cfra && pa->time >= sim->psys->cfra) {
|
||||||
evaluate_emitter_anim(sim->scene, sim->ob, pa->time);
|
evaluate_emitter_anim(sim->scene, sim->ob, pa->time);
|
||||||
|
|
||||||
psys->flag |= PSYS_OB_ANIM_RESTORE;
|
psys->flag |= PSYS_OB_ANIM_RESTORE;
|
||||||
@ -1183,7 +1183,7 @@ static void set_keyed_keys(ParticleSimulationData *sim)
|
|||||||
key->time = pa->time;
|
key->time = pa->time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psys->flag & PSYS_KEYED_TIMING && pt->duration!=0.0f)
|
if (psys->flag & PSYS_KEYED_TIMING && pt->duration != 0.0f)
|
||||||
k++;
|
k++;
|
||||||
|
|
||||||
ksim.psys->flag |= keyed_flag;
|
ksim.psys->flag |= keyed_flag;
|
||||||
|
@ -139,18 +139,18 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
|
|||||||
IDDepsNode *id_node = comp_node->owner;
|
IDDepsNode *id_node = comp_node->owner;
|
||||||
|
|
||||||
ID *id = id_node->id;
|
ID *id = id_node->id;
|
||||||
if(id_node->done == 0) {
|
if (id_node->done == 0) {
|
||||||
deg_editors_id_update(bmain, id);
|
deg_editors_id_update(bmain, id);
|
||||||
lib_id_recalc_tag(bmain, id);
|
lib_id_recalc_tag(bmain, id);
|
||||||
/* TODO(sergey): For until we've got proper data nodes in the graph. */
|
/* TODO(sergey): For until we've got proper data nodes in the graph. */
|
||||||
lib_id_recalc_data_tag(bmain, id);
|
lib_id_recalc_data_tag(bmain, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(comp_node->done == 0) {
|
if (comp_node->done == 0) {
|
||||||
Object *object = NULL;
|
Object *object = NULL;
|
||||||
if (GS(id->name) == ID_OB) {
|
if (GS(id->name) == ID_OB) {
|
||||||
object = (Object *)id;
|
object = (Object *)id;
|
||||||
if(id_node->done == 0) {
|
if (id_node->done == 0) {
|
||||||
++num_flushed_objects;
|
++num_flushed_objects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4442,7 +4442,7 @@ void PE_undo_push(Scene *scene, SceneLayer *sl, const char *str)
|
|||||||
undo= undo->prev;
|
undo= undo->prev;
|
||||||
}
|
}
|
||||||
if (undo) {
|
if (undo) {
|
||||||
while (edit->undo.first!=undo) {
|
while (edit->undo.first != undo) {
|
||||||
PTCacheUndo *first= edit->undo.first;
|
PTCacheUndo *first= edit->undo.first;
|
||||||
BLI_remlink(&edit->undo, first);
|
BLI_remlink(&edit->undo, first);
|
||||||
free_PTCacheUndo(first);
|
free_PTCacheUndo(first);
|
||||||
|
@ -3112,10 +3112,10 @@ vec2 calc_brick_texture(vec3 p, float mortar_size, float mortar_smooth, float bi
|
|||||||
float tint = clamp((integer_noise((rownum << 16) + (bricknum & 0xFFFF)) + bias), 0.0, 1.0);
|
float tint = clamp((integer_noise((rownum << 16) + (bricknum & 0xFFFF)) + bias), 0.0, 1.0);
|
||||||
|
|
||||||
float min_dist = min(min(x, y), min(brick_width - x, row_height - y));
|
float min_dist = min(min(x, y), min(brick_width - x, row_height - y));
|
||||||
if(min_dist >= mortar_size) {
|
if (min_dist >= mortar_size) {
|
||||||
return vec2(tint, 0.0);
|
return vec2(tint, 0.0);
|
||||||
}
|
}
|
||||||
else if(mortar_smooth == 0.0) {
|
else if (mortar_smooth == 0.0) {
|
||||||
return vec2(tint, 1.0);
|
return vec2(tint, 1.0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -464,48 +464,48 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
|
|||||||
float *fp, *col= NULL;
|
float *fp, *col= NULL;
|
||||||
int pixsize= 3;
|
int pixsize= 3;
|
||||||
|
|
||||||
if(STREQ(rpass->name, RE_PASSNAME_COMBINED)) {
|
if (STREQ(rpass->name, RE_PASSNAME_COMBINED)) {
|
||||||
add_filt_fmask(curmask, shr->combined, rpass->rect + 4*offset, rectx);
|
add_filt_fmask(curmask, shr->combined, rpass->rect + 4*offset, rectx);
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_Z)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_Z)) {
|
||||||
fp = rpass->rect + offset;
|
fp = rpass->rect + offset;
|
||||||
*fp = shr->z;
|
*fp = shr->z;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_RGBA)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_RGBA)) {
|
||||||
col = shr->col;
|
col = shr->col;
|
||||||
pixsize = 4;
|
pixsize = 4;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_EMIT)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_EMIT)) {
|
||||||
col = shr->emit;
|
col = shr->emit;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_DIFFUSE)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_DIFFUSE)) {
|
||||||
col = shr->diff;
|
col = shr->diff;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_SPEC)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_SPEC)) {
|
||||||
col = shr->spec;
|
col = shr->spec;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_SHADOW)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_SHADOW)) {
|
||||||
col = shr->shad;
|
col = shr->shad;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_AO)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_AO)) {
|
||||||
col = shr->ao;
|
col = shr->ao;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_ENVIRONMENT)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_ENVIRONMENT)) {
|
||||||
col = shr->env;
|
col = shr->env;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_INDIRECT)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_INDIRECT)) {
|
||||||
col = shr->indirect;
|
col = shr->indirect;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_REFLECT)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_REFLECT)) {
|
||||||
col = shr->refl;
|
col = shr->refl;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_REFRACT)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_REFRACT)) {
|
||||||
col = shr->refr;
|
col = shr->refr;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_NORMAL)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_NORMAL)) {
|
||||||
col = shr->nor;
|
col = shr->nor;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_UV)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_UV)) {
|
||||||
/* box filter only, gauss will screwup UV too much */
|
/* box filter only, gauss will screwup UV too much */
|
||||||
if (shi->totuv) {
|
if (shi->totuv) {
|
||||||
float mult = (float)count_mask(curmask)/(float)R.osa;
|
float mult = (float)count_mask(curmask)/(float)R.osa;
|
||||||
@ -515,7 +515,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
|
|||||||
fp[2]+= mult;
|
fp[2]+= mult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_INDEXOB)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_INDEXOB)) {
|
||||||
/* no filter */
|
/* no filter */
|
||||||
if (shi->vlr) {
|
if (shi->vlr) {
|
||||||
fp = rpass->rect + offset;
|
fp = rpass->rect + offset;
|
||||||
@ -523,7 +523,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
|
|||||||
*fp = (float)shi->obr->ob->index;
|
*fp = (float)shi->obr->ob->index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_INDEXMA)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_INDEXMA)) {
|
||||||
/* no filter */
|
/* no filter */
|
||||||
if (shi->vlr) {
|
if (shi->vlr) {
|
||||||
fp = rpass->rect + offset;
|
fp = rpass->rect + offset;
|
||||||
@ -531,12 +531,12 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
|
|||||||
*fp = (float)shi->mat->index;
|
*fp = (float)shi->mat->index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_MIST)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_MIST)) {
|
||||||
/* */
|
/* */
|
||||||
col = &shr->mist;
|
col = &shr->mist;
|
||||||
pixsize = 1;
|
pixsize = 1;
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_VECTOR)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_VECTOR)) {
|
||||||
/* add minimum speed in pixel, no filter */
|
/* add minimum speed in pixel, no filter */
|
||||||
fp = rpass->rect + 4*offset;
|
fp = rpass->rect + 4*offset;
|
||||||
if ( (ABS(shr->winspeed[0]) + ABS(shr->winspeed[1]))< (ABS(fp[0]) + ABS(fp[1])) ) {
|
if ( (ABS(shr->winspeed[0]) + ABS(shr->winspeed[1]))< (ABS(fp[0]) + ABS(fp[1])) ) {
|
||||||
@ -548,7 +548,7 @@ static void add_filt_passes(RenderLayer *rl, int curmask, int rectx, int offset,
|
|||||||
fp[3] = shr->winspeed[3];
|
fp[3] = shr->winspeed[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(STREQ(rpass->name, RE_PASSNAME_RAYHITS)) {
|
else if (STREQ(rpass->name, RE_PASSNAME_RAYHITS)) {
|
||||||
/* */
|
/* */
|
||||||
col = shr->rayhits;
|
col = shr->rayhits;
|
||||||
pixsize= 4;
|
pixsize= 4;
|
||||||
|
@ -124,7 +124,7 @@ void KX_SoundActuator::play()
|
|||||||
AUD_Device_free(device);
|
AUD_Device_free(device);
|
||||||
|
|
||||||
// in case of pingpong, we have to free the sound
|
// in case of pingpong, we have to free the sound
|
||||||
if(sound != m_sound)
|
if (sound != m_sound)
|
||||||
AUD_Sound_free(sound);
|
AUD_Sound_free(sound);
|
||||||
|
|
||||||
if (m_handle != NULL) {
|
if (m_handle != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user