Python Particle texture mapping object affectation is working but has no effect in simulation #30713
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#30713
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%I wrote a python script to "macro" this tuto http://blenderdiplom.com/index.php/en/tutorials/item/78-tutorial-dissolve-your-logo-in-blender-262.
All is working fine when done manually with GUI.
But when i use the script, the following step halfly goes wrong :
affect new texture
ActiveObjectText.particle_systems['ParticleSystem'].settings.texture_slots- [x].texture = sTex
ActiveObjectText.particle_systems['ParticleSystem'].settings.texture_slots- [x].texture_coords = 'OBJECT'
ActiveObjectText.particle_systems['ParticleSystem'].settings.texture_slots- [x].object = bpy.data.objects['Plane'] #ActiveObjectPlane
ActiveObjectText.data.update()
In the blender, the "plane" is well affected in the combo box, but it has no effect when running the animation. If I scrolldown the combo a REselect manually the plane, then it works.
Another point, when copy/pasting each line from the script to python console, i have the same result in the animation as in automatic script way. But if make in the python console
ActiveObjectText.data.update()
or
bpy.data.scenes['Scene'].update()
or
another plane affectation
ActiveObjectText.particle_systems['ParticleSystem'].settings.texture_slots- [x].texture_coords = 'OBJECT'
ActiveObjectText.particle_systems['ParticleSystem'].settings.texture_slots- [x].object = ActiveObjectPlane
the plane effect works, and the animation is good.
I made severals tests (as you can see in the script), on 32 and 64 bits architecture, with 2.62 released, and svn compiled verion. The problem is always the same. Full reproductible.
You can find full script here : http://yann.morere.free.fr/spip/spip.php?article160
See the attached to make you're own tests
Yann%%%
Changed status to: 'Open'
%%%can't upload files! Error message Parameter missing%%%
%%%Adding System info and blend file%%%
%%%Ok it worked... need to understand!%%%
%%%Peharps there is a misunderstanding. Upload worked. I didn't understood that upload mus be joined with a comment !.
But my Blender problem still remains ;-)%%%
%%%Assigning to Janne,
but olease always try to find minimal case when blender does not work as expected, it helps a lot understanding what you expect to have and what in fact you've got, also saves lots of time trying to understand this things.%%%
%%%Ok, thanks a lot take into account my problem. Tomorrow, I will make a small video to help to understand the keypoint. and post the link here.
For now, here is 2 screenshots to show where is the problem. (animation at the same frame, without and with the plane reaffectation).
Hope this helps%%%
%%%Hi Yann,
In Blender code, after such actions Blender gets signals to refresh itself (update calls). These update calls are handled by the event system.
While you run a script, events are being halted until you end the script. That is why the API has update calls too add yourself.
I realize it is clumsy, but this is the inner working of Blender itself. People use the Python API as a full replacement for C code now, which is nice but not a specification we can guarantee to work.%%%
Changed status from 'Open' to: 'Archived'
%%%Hi Ton , thanks for this answer. Finally I gave up and did not use this plane feature.
I'm going to do some new test to see if it works now ;-)
This animation has been included in Openshot Video Editor program ;-)%%%