Find texture of displacement modifier
This commit is contained in:
parent
c515509b24
commit
0d82dc7fd0
@ -34,6 +34,7 @@ IMA_SRC_SEQUENCE = 2
|
|||||||
IMA_SRC_MOVIE = 3
|
IMA_SRC_MOVIE = 3
|
||||||
|
|
||||||
# DNA_modifier_types.h
|
# DNA_modifier_types.h
|
||||||
|
eModifierType_Displace = 14
|
||||||
eModifierType_ParticleSystem = 19
|
eModifierType_ParticleSystem = 19
|
||||||
eModifierType_Ocean = 39
|
eModifierType_Ocean = 39
|
||||||
eModifierType_MeshCache = 46
|
eModifierType_MeshCache = 46
|
||||||
|
|||||||
@ -62,6 +62,20 @@ def modifier_ocean(modifier: blendfile.BlendFileBlock, block_name: bytes) \
|
|||||||
block_name=block_name)
|
block_name=block_name)
|
||||||
|
|
||||||
|
|
||||||
|
@mod_handler(cdefs.eModifierType_Displace)
|
||||||
|
def modifier_texture(modifier: blendfile.BlendFileBlock, block_name: bytes) \
|
||||||
|
-> typing.Iterator[result.BlockUsage]:
|
||||||
|
tx = modifier.get_pointer(b'texture')
|
||||||
|
if not tx:
|
||||||
|
return
|
||||||
|
ima = tx.get_pointer(b'ima')
|
||||||
|
if not ima:
|
||||||
|
return
|
||||||
|
|
||||||
|
path, field = ima.get(b'name', return_field=True)
|
||||||
|
yield result.BlockUsage(modifier, path, path_full_field=field, block_name=block_name)
|
||||||
|
|
||||||
|
|
||||||
@mod_handler(cdefs.eModifierType_ParticleSystem)
|
@mod_handler(cdefs.eModifierType_ParticleSystem)
|
||||||
def modifier_particle_system(modifier: blendfile.BlendFileBlock, block_name: bytes) \
|
def modifier_particle_system(modifier: blendfile.BlendFileBlock, block_name: bytes) \
|
||||||
-> typing.Iterator[result.BlockUsage]:
|
-> typing.Iterator[result.BlockUsage]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user