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
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top