2

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.

elp
  • 8,021
  • 7
  • 61
  • 120
DarkKnight
  • 31
  • 6
  • Hi and welcome to Stackoverflow! While we can guess what you exactly want, you should rephrase your question (e.g. 'import' or 'load'? I think it's the latter), and be more specific in what you ask for (as of now, one can just answer on how to automate Blender to load a file, which is probably not what you need: you want to load a file, perform operations XY on it, then save, etc.). –  Dec 17 '13 at 13:00
  • Thanks for the suggestion. I have made the changes. – DarkKnight Dec 17 '13 at 13:12

1 Answers1

1

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.

DarkKnight
  • 31
  • 6