fix [#29433] Incorrect drawing of Circle/Axes/Cross on Particles when Display set to that AND Size/Vel/Num/Health also selected
This commit is contained in:
@@ -4042,7 +4042,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
ParticleDrawData *pdd = psys->pdd;
|
||||
Material *ma;
|
||||
float vel[3], imat[4][4];
|
||||
float timestep, pixsize=1.0, pa_size, r_tilt, r_length;
|
||||
float timestep, pixsize_scale, pa_size, r_tilt, r_length;
|
||||
float pa_time, pa_birthtime, pa_dietime, pa_health, intensity;
|
||||
float cfra;
|
||||
float ma_col[3]= {0.0f, 0.0f, 0.0f};
|
||||
@@ -4149,12 +4149,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
case PART_DRAW_CROSS:
|
||||
case PART_DRAW_AXIS:
|
||||
/* lets calculate the scale: */
|
||||
pixsize= ED_view3d_pixel_size(rv3d, ob->obmat[3]);
|
||||
|
||||
if(part->draw_size==0.0)
|
||||
pixsize *= 2.0f;
|
||||
if (part->draw_size == 0.0)
|
||||
pixsize_scale = 2.0f;
|
||||
else
|
||||
pixsize*=part->draw_size;
|
||||
pixsize_scale = part->draw_size;
|
||||
|
||||
if(draw_as==PART_DRAW_AXIS)
|
||||
create_cdata = 1;
|
||||
@@ -4342,6 +4341,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
|
||||
ct+=dt;
|
||||
for(i=0; i < trail_count; i++, ct += dt) {
|
||||
float pixsize;
|
||||
|
||||
if(part->draw & PART_ABS_PATH_TIME) {
|
||||
if(ct < pa_birthtime || ct > pa_dietime)
|
||||
continue;
|
||||
@@ -4375,6 +4376,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
bb.time = ct;
|
||||
}
|
||||
|
||||
pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale;
|
||||
|
||||
draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, psys->pdd);
|
||||
|
||||
totpoint++;
|
||||
@@ -4385,6 +4388,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
{
|
||||
state.time=cfra;
|
||||
if(psys_get_particle_state(&sim,a,&state,0)){
|
||||
float pixsize;
|
||||
|
||||
if(psys->parent)
|
||||
mul_m4_v3(psys->parent->obmat, state.co);
|
||||
|
||||
@@ -4408,6 +4413,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
bb.time = pa_time;
|
||||
}
|
||||
|
||||
pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale;
|
||||
|
||||
draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, pdd);
|
||||
|
||||
totpoint++;
|
||||
|
||||
@@ -969,7 +969,6 @@ void apply_project_float(float persmat[4][4], int winx, int winy, const float ve
|
||||
void project_float(ARegion *ar, const float vec[3], float adr[2])
|
||||
{
|
||||
RegionView3D *rv3d= ar->regiondata;
|
||||
float vec4[4];
|
||||
|
||||
apply_project_float(rv3d->persmat, ar->winx, ar->winy, vec, adr);
|
||||
}
|
||||
@@ -1898,8 +1897,6 @@ void ED_view3d_operator_properties_viewmat_set(bContext *C, wmOperator *op)
|
||||
|
||||
void ED_view3d_operator_properties_viewmat_get(wmOperator *op, int *winx, int *winy, float persmat[4][4])
|
||||
{
|
||||
float values[16];
|
||||
|
||||
*winx = RNA_int_get(op->ptr, "region_width");
|
||||
*winy = RNA_int_get(op->ptr, "region_height");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user