How can I load a .ply file in blender-2.68 and apply modifier to it through command line/script?

StackOverflow https://stackoverflow.com/questions/20634301

  •  18-09-2022
  •  | 
  •  

Question

I want to apply a modifier to large number of meshes stored in different .ply files.
I wish to do this through command line so that the process can be automated. I know the basic of blender python API like how to write the modifier in python. But that required me to first import .ply file in blender using UI and then run my python script.
However, I want to automate the process of loading ply file, do the required operations and save back the result in ply format so that all the files can be processed one by one with minimum manual work.

Was it helpful?

Solution

I finally got the solution to the problem.
1. Invoke blender through command line
blender.exe --background --python yourFile.py
2. In your python file, you could use the modules provided by blender such as import_ply (....Blender/2.68/scripts/addons/import_ply), etc.
Just go through the module and you will be able to use the function written inside and manage to write code according to your need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top