Thinking Particles- How to Set "Settings"
-
In Simulate -> Thinking Particles -> TP Settings... there are a series of UI elements at the top of the General tab controlling global settings for the TP system:
Max. Particles
Force this Setting
Show Objects
View TypeHow do I set these from python? (I specifically need Max Particles and View Type.) I have been all over the docs and cannot seem to find them.
Thank you.
-
hi,
you can access them in the BaseContainer of the ParticleSystem.
import c4d def main(): # Retrieves the Particles System of the current document pSys = doc.GetParticleSystem() if pSys is None: raise RuntimeError("op is none, please select one object.") bc = pSys.GetDataInstance() bc[54] = 300 # Execute main() if __name__=='__main__': main()
Those are the ids corresponding.
#define TP_VIEWTYPE 50 #define TP_VIEWMESH 51 #define TP_FORCEGLOBAL 52 #define TP_ON 53 #define TP_NUMLIMIT 54
the ViewType's ID:
// Particle View Typen #define VTYPE_NONE 0 #define VTYPE_FLAKES 1 #define VTYPE_DOTS 2 #define VTYPE_TICKS 3 #define VTYPE_DROPS 4 #define VTYPE_BOX 5 #define VTYPE_GLOBAL 6
Cheers,
Manuel -
Hi Manuel,
Thank you for your answer, I appreciate it.
So that in the future I can find these things myself, I tried searching searching your Python docs for TP_VIEWTYPE. No results were returned. I assume those #defines are drawn from a C++ header, so I tried searching for TP_VIEWTYPE here, also with no success.
Where can I find full searchable API documentation for Cinema 4D? (Like that for Rhino Common)
-
hi,
This are copy/paste directly from our code. They are not available, not documented. That's why i 've provided them.
You can have a look at that page for having informations about the IDs that pageCheers,
Manuel -
Okay, thank you again.