I concur with the previous feedback. I wonder what your attorney would have recommended had you made it clear from the start that paying legal bills might no longer be possible without modeling income. In any case, this seems like an outright case of malpractice to me.* If you were conducting erotica shoots or reviewing pornography while children were present, I could see how that might give your ex-husband legitimate grounds to question your fitness as a parent. It sounds instead like your children did not even know the particulars of your work, never mind being exposed directly to it. Maintaining such a clear division between family life and erotic modeling sounds to me like evidence that you took your parental responsibilities more seriously than most parents with 9-5 office jobs.
Still, the past cannot be undone. As I see it, this leaves you with two courses of action. If your ex-husband could ever be susceptible to reason, it might be in your best interest to negotiate. If he is an active parent who cares deeply for his children, then it should be possible to persuade him that an amicable arrangement would be best for everyone involved, including the kids (though that might involve allowing him more time with them.) If he is a reluctant parent who would prefer a child-free lifestyle, then it should be possible to persuade him to stop demanding responsibilities that he does not actually want. Of course, if vitriol blocks the lines of communication; you may not have the opportunity to draw him into reasonable dialogue about what is ultimately best for the children.
The second path involves what, in the world of politics, is known as "opposition research." Does he ever drink heavily or take recreational drugs around the children? Are there any medical or psychological issues that could impair his ability to meet their needs? Has he ever neglected them in order to lavish his attention on a new lover? Do any of his close friends or other frequent visitors to his home have a criminal history? Might his work interfere in any way with raising the children in an optimal environment? Regardless of the jurisdiction, courts the world over must evaluate parental fitness in relative terms. If he finds a way to sling mud at you, but you can respond by exposing greater troubles with his domestic situation; the judge might admonish both parties for squabbling, but ultimately he or she will favor the least objectionable biological parent.
That second path can be tricky, because there are good reasons (both legal and developmental) not to turn children into little spies. They are the best source of incriminating information, but it looks bad and actually is bad to use them as tools against their own father. Do not ignore what they say spontaneously, but do your best to avoid fishing for incriminating information, and certainly do not task them with any sort of snooping on your behalf. Other methods (consulting with mutual friends, dealing with a private investigator, etc.) are less problematic. Of course, if he is squeaky clean and a much better parent than he was a husband, digging for dirt may be unwise.
Ultimately, you may find the best results come from an adaptive blend of the carrot and the stick. Open with appeals to reason, then follow up in the gentlest and least provocative manner possible with verifiable details that undermine his claim of superior parental fitness. Also, what the children desire should be an important factor for the two of you, even if your particular jurisdiction is one of those that gives no weight to the desire of your children at their present age. As far as I know (though I never formally studied family law,) every U.S. jurisdiction explicitly places the best interests of the child as the prevailing concern in resolving custody disputes. However, some states bar consideration of children's wishes to avoid psychologically unhealthy manipulation, and some other states only consider those wishes for children above a specific age.
I'm sure everyone here wishes you the best during this heartwrenching struggle. Given your economic situation, you may be able to find support, including free or low-cost legal counsel that couldn't be much worse than what you've already bought**, with a local women's advocacy group. If there was a significant degree of abuse on his part during the breakup, organizations that sponsor shelters for battered women will no doubt be quick to offer a sympathetic ear and point you in the right direction for further support. If you have any divorced friends, certainly it would be worthwhile to listen to their take on the matter. If you have no divorced friends, you might want to look into a divorcee's support group if only to get a range of perspectives and learn about better quality and/or lower cost legal options in your community.
Best Regards,
messydom
*I need to qualify that statement, because it is possible the attorney happens to know that the family court judge handling custody disputes in your case is a fanatical prude. If that were true or if there were some other extraordinary circumstance justifying the extraordinary measures you were advised to take, that advice might not actually be the product of woeful incompetence. Such a scenario is unlikely, but certainly possible.
**This statement I hedge on the chance that your ex-husband is especially wealthy. Another possible "extraordinary circumstance" that would make the advice you were given sensible is if the final financial settlement is likely to provide you and your children with ample material support. Ditching your own income may have been deemed necessary to avoid jeopardizing a lucrative alimony and child support package. If that is the case, it may be short-sighted to get back into erotic modeling just now. Otherwise, it does seem likely a professional to whom you paid good money responded by giving you horrible advice that inflicted direct, quantifiable, and substantial harm to your personal finances.