Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello PluginCafe
I need to select PHONG BREAK EDGES using python. In this code, I'm trying to accomplish this task by utilizing MCOMMAND_PHONGTOSELECTION
import c4d def main(): if op is None: return c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_PHONGTOSELECTION, list = [op], doc = doc) if __name__=='__main__': main() c4d.EventAdd()
I don't know if this is a bug or a limitation, but MCOMMAND_PHONGTOSELECTION selects edges only if their phong is broken manually using MCOMMAND_BREAKPHONG command. I need to select all phong break edges based on actuall phong tag, or by manually defining the angle.
Is there any alternative way in C4D's Python SDK?
I've done this in the past by going through all edges in the object and comparing the normals of neighboring polygons. A bit ugly, but it works. There are some helper functions in the Neighbor class you might want to look at: https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.utils/Neighbor/index.html
Hi @merkvilson, this is a limitation actually the tool Phong Break selection and the modeling command MCOMMAND_PHONGTOSELECTION are two completely separate things. So the only solution available to you is to manually break the Phong.
I'm sorry we can't help you more on that, Donovan points you to the correct direction with the neighbor class. Cheers, Maxime.