Modify already defined rendertarget and renderpath command

Happy new year to you all Urho people! :mrgreen:

I want to modify already defined rendertarget and renderpath on my application, but I can’t seems to get them on my renderpath object.
Urho only provide GetNumCommands() and GetNumRenderTargets() on RenderPath class.
Can I actually do it? :question:

Which language are you using?

I use C++, but if it’s can be done with scripting too, please let me know. :unamused:

In C++ you can modify the RenderPath’s public commands_ and renderTargets_ vectors. In AngelScript this corresponds to the “commands” and “rendertargets” arrays. Lua currently provides functions to set new commands, but you can’t “get” an existing command.

Sorry for late response. I just tested it, and it works like magic! Thaaanks! :mrgreen:
One more question, is there more easy way to check if certain command is enable or not? For now I can only think the solution is iterating through RenderPath->commands_ and checks command.tag_
Is that the only way?

Yes, the best way is to index or iterate the commands, because we cannot guarantee a single correct answer for the enabled state of a tag (in case user modifies enabled state of commands manually, outside the tag system.)

Oh, I see. Thanks for the answer! :mrgreen: