Maniphest T68442

ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emitter returns a value
Closed, Resolved

Assigned To
Bastien Montagne (mont29)
Authored By
Jakub Uhlik (carbon14)
Aug 9 2019, 10:08 AM
Tags
  • BF Blender
Subscribers
Jakub Uhlik (carbon14)

Description

System Information
Operating system: Darwin-16.4.0-x86_64-i386-64bit 64 Bits

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e

Short description of error
ParticleSystem.uv_on_emitter returns always 0,0 while Particle.uv_on_emitter returns a value

Exact steps for others to reproduce the error
have a object with uv and particle system, both added with initial settings, run following:

import bpy

c = bpy.context
o = c.active_object
d = c.evaluated_depsgraph_get()
o = o.evaluated_get(d)
ps = o.particle_systems.active
uv_no = o.data.uv_layers.active_index
mod = None
for m in o.modifiers:
    if(m.type == 'PARTICLE_SYSTEM'):
        if(m.particle_system == ps):
            mod = m
            break

for i, p in enumerate(ps.particles):
    uv = ps.uv_on_emitter(mod, particle=p, particle_no=i, uv_no=uv_no, )
    print(uv)
    uv = ps.uv_on_emitter(mod, particle=p, )
    print(uv)
    uv = p.uv_on_emitter(mod)
    print(uv)
    print()

to obtain output:

...
<Vector (0.0000, 0.0000)>
<Vector (0.0000, 0.0000)>
<Vector (0.4783, 0.2514)>

<Vector (0.0000, 0.0000)>
<Vector (0.0000, 0.0000)>
<Vector (0.4114, 0.6010)>

<Vector (0.0000, 0.0000)>
<Vector (0.0000, 0.0000)>
<Vector (0.1824, 0.6382)>
...

Related Objects

Mentioned In
rB35a9a85b2708: Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.
T68542: Keyboard "A" to deselect all vertices only works inconsistently
Mentioned Here
rB35a9a85b2708: Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle.

Event Timeline

Jakub Uhlik (carbon14) created this task.Aug 9 2019, 10:08 AM
Bastien Montagne (mont29) claimed this task.Aug 12 2019, 11:43 AM
Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.
Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved.Aug 12 2019, 11:48 AM

Fixed by rB35a9a85b2708 (sorry for wrong number in commit message :/ ).

Bastien Montagne (mont29) mentioned this in rB35a9a85b2708: Fix T68542: ParticleSystem.uv_on_emitter returns always 0,0 while Particle..Aug 12 2019, 11:49 AM