motorsep Posted March 16, 2015 Report Posted March 16, 2015 (edited) I am wondering if it's possible to make a plugin using Python for DarkRadiant, that will load prefabs based on a set of rules and align them accordingly ? Thanks. Edited March 17, 2015 by motorsep Quote
Morat Posted March 16, 2015 Report Posted March 16, 2015 Maybe try this thread. Tels was doing something very interesting a while ago about making mazes out of prefabs using a text editor. Hope this helps. Quote
motorsep Posted March 16, 2015 Author Report Posted March 16, 2015 Yep, but his app is a standalone app which generates .map file. I am wondering about generating level without leaving DR. Quote
SteveL Posted March 16, 2015 Report Posted March 16, 2015 I think that DR's python interface would need extending a bit. It doesn't provide a way to manipulate brushes as far as I can see. Quote
motorsep Posted March 16, 2015 Author Report Posted March 16, 2015 I think that DR's python interface would need extending a bit. It doesn't provide a way to manipulate brushes as far as I can see. So there is no way to load prefabs, select stuff per layer and move selection around via Python in DR? Quote
SteveL Posted March 16, 2015 Report Posted March 16, 2015 Erm.. yes now you come to mention it, I think that that can be done. What I think you can't do is create, resize or cut brushes using the python api. But you *can* move selections, which is probably enough. I'm not sure about loading the prefabs though. Quote
motorsep Posted March 16, 2015 Author Report Posted March 16, 2015 Erm.. yes now you come to mention it, I think that that can be done. What I think you can't do is create, resize or cut brushes using the python api. But you *can* move selections, which is probably enough. I'm not sure about loading the prefabs though. Yeah, I wouldn't need to do anything with brushes, except moving them. Who would be able to know more about Python API in DR to tell if prefabs can or can not be loaded (or .map files imported). The idea is to have modules saves as either prefabs or .map files, and then Python scrip would load each into each layer, properly name layer, use sorting by name to select certain pieces and then duplicate one of the modular pieces, move them to a "construction" layer, move them on the grid to match other pieces, etc. Quote
motorsep Posted March 17, 2015 Author Report Posted March 17, 2015 Btw, is there C++ API, like it was in GTKRadiant ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.