You know what happens when you’re looking at complicated stuff? You complicate stuff even more :D Thanks to Daniel, Martin and Lukas, they gave me this beautiful insight: windows.processPostedMessages()

Which I am sure is an implementation of what is described below.

So here’s the BEST way to do it in Maxscript :)


One of the most annoying things when you create a script that needs to do some intensive or time consuming operation is that it usually leaves your 3ds Max UI or your script UI freezing (white window, not responding).

Well today while reading some of the SDK stuff I stumbled upon WindowsMessageFilter, which I’m sure is there for all the C++ gurus, fortunately for us, it’s also exposed to the .NET API which means we can use it in Maxscript too!

What this does is basically processing all the windows messages that are used to paint the windows, controls and so on, thus giving the impression the window is not blocked even when doing some other task. You will probably want to use it inside some loop when doing lots of stuff and you want to keep your UI updated.

The cool thing about this is that by UI, you can say your script rollout or… 3ds Max main window, which basically allows you to check what’s happening in the viewport and even continue to work while some other task is being done in “the background” (not exactly in the background, this is way different from using background threads).

Might not feel like a big thing but we all know that when a user is trying to do something and he simply gets a window freezing, that’s not good.

You can register whatever window handle you want, in the following example I’ve registered the 3ds Max main window, but you can easily use your rollout .hwnd property to register your rollout. You can also register multiple windows.

I’ve created a small example where you can see what is going on while being able to move around your viewport, create new geometry and so on. I hope you like it!


Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

Artur Leao and Eddie Perlberg

That’s right, End User Event 2014 is done and it was a success pretty much like every year! I had the chance to see my friends again and meet new ones. I love it. Another cool stuff was the fact that I got to hang out with some of the guys from the 3ds Max development team, Alex Horst, Eddie Perlberg, Martin Coven and they are some pretty cool guys too! I hope to see them again next year or before, who knows!

I was very happy with my talk at EUE, I have to confess I was a bit worried before, since I had a lot of things going on before the EUE, like moving to a new country, but all went well. Attendance was pretty good considering the other talks happening at the same time and I think the feedback I got from it was very good too! Thanks to everyone that attended!

I’ve also submitted my talk to the Autodesk University, but unfortunately it didn’t make it, so I guess it makes it OK for me to finally share it here on my website, more news on that soon!

Another major event that went by during EUE was the official launch of the MGODI website, as some of you know it’s a project I’ve been working during the last year with my good friend Joep van der Steen and Ricardo Moutinho. We are currently on 3 platforms, web, iOS and Android, how cool is that? I can’t even imagine that a year ago all that we had was some black screens with text showing up an early prototype!

So if you either are a freelancer or a company looking for talent, go to MGODI website, register and post your job applications or wait for the right job to look at you!

This as also been a year to straighten relationships, personal and professional, and hopefully that will bring good things for the whole 3ds Max community, starting this week! Me and Daniel Santana are and will be working together in the future in a very broad range of projects, so stay tuned because this week we will bring you something new!

If you’ve made it this far, thanks for reading my words and please don’t hesitate to send me an e-mail anytime! Take care and thanks for the beer!


There is always beer… even when talking on the phone!

Laughing out loud with my friend Hristo Velev

Serious business

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

I’m in a compile rampage, so I ended up compiling libzmq and PyZMQ using that same build.

I’ve compiled using the latest 4.x stable release which is 4.0.4.

Same place, YCDIVFX MaxPlus Packages, under the Externals folder. I will soon update the Examples with a server and client using PyZMQ.

Drop me a message if you’re interested in some other version.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

First time I did something like this, turned out pretty simple, the documentation on Perforce webpage is pretty good! Yay for that.

I haven’t tested it intensively but I’m crossing fingers all is working, I got some warnings when compiling but from my tests, at least in 3ds Max 2015 all is good. Both 3ds Max 2015 and Maya 2015 break binary compatibility with it’s predecessors so everything needs to be compiled with Visual C++ 11.0 Service Pack 3. Visual Studio 2012 Update 4.

As usual this is in my GitHub repo YCDIVFX MaxPlus Packages and you can find it under the Externals folder. I’ve also included a small example from the Perforce website in the Examples folder.

Copy and P4API.pyd to your site-packages foder and you’re done.

For 3ds Max users this means “C:\Program Files\Autodesk\3ds Max 2015\python\Lib\site-packages”.

Maya users “C:\Program Files\Autodesk\Maya2015\Python\Lib\site-packages”

Let me know if you run into any issues!

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

Yes! Again! Same place! What can I tell you, it’s basically one of the best conferences I have the pleasure to attend, it’s fun, it’s in a pub and there is beer! Oh yes, CG too, all sorts of it, you name it.

I have to say it’s a pleasure for me to be able to speak there again for the second time, I love sharing what I learn and this is definitely the perfect place for it. This year my talk is titled “Developing for 3ds Max” where I’ll give an introduction to the new Python API, MaxPlus and also talk a little bit about C#. This will be a talk for all kind of users and all levels but of course if you are trying to get into scripting and programming to develop your own tools for Max, this is for you.

Hopefully some of the tips and tricks I’ll be sharing will also be of value to more advanced users so feel free to join in too!  I can also tell you that I’ll be talking and showing a lot of stuff that I’ve worked over the past year and shared here in my blog and my open source project on GitHub, YCDIVFX MaxPlus Packages.

At some extent I feel that this is something I will continue to do in the future, being able to work on small tasks/projects over the year and then gather all that and show it and talk about it.

So if you want to hang out with the cool kids, register at and I’ll meet you there, grab me and let’s have a beer and talk about stuff!


Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

This might sound stupid, but I never found this a simple task, even with PrintScreen and all the key combinations to just grab the current window and whatnot.

Until I found this great tool that’s available with Windows 7, I assume with Windows 8 too. It’s called “Snipping Tool”, just hit Start and start typing “Snipping Tool” and trust me, no more Photoshop or paint to paste the images and save them as JPG or whatever!

Load it, select New, click and drag the region you want to capture and voila, you’re done, you can either have it in the clipboard or save it in a bunch of useful formats, just like that, easy, no hassle and no extra downloads.

Snipping Tool

I’m sure Mac OS and Linux aficionados have three hundred ways to do this really easy, but at least for me, this little tool changed my life in Windows :)


PS – There is a bunch of different snipping modes, free form, region, window, full screen, be sure to check that small arrow!

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

I’ve struggled and saw a lot of people struggling to get the work of Sven Fraeys regarding executing Maxscript in the most recent versions of Notepad++ (6.1.5+) so I’ve decided to have a look at it and try to tie it to my current pipeline.

My ultimate goal would be to be able to get Maxscript language definitions in PyCharm but from my research, that requires writing a IntelliJ plugin in Java and I really don’t want to go there now.

I’m definitely not a Sublime guy and I use Notepad++ everyday for most of my text editing, so it only made sense that if I wanted to leave the Maxscript Editor behind for good, I would go with Notepad++.

The other issue for running MXS from Npp is the dependency on ExternalIDE.exe from Sven, and this was a problem to me, because I already have an efficient way of running any type of file in 3ds Max with my module from the YCDIVFX MaxPlus Packages ,  so it only makes sense to tie up Npp to this and have a coherent workflow for either developing with MaxPlus and python or pure Maxscript. This means, NO MORE Maxscript editor!

Added benefits on all of this?

- Maxscript with auto-complete!
- Use latest version of Notepad++ (at the time I’m writing this, 6.6.2)
- One module to rule them all, we can now run externally python and maxscript files with
- PyCharm for python, Notepad++ for Maxscript/Python
- No more development inside 3ds Max and Maxscript Editor (although it’s based on Scintilla like Notepad++)
- More flexibility with Notepad++, can install plugins, etc.

Let’s get to the point, how can I haz!? Easy, just update YCDIVFX MaxPlus Packages and check the ‘externals\Npp’ folder, you’ll find 3 files there.

- MaxScript.xml: contains auto-complete info
- userDefineLang.xml: syntax highlighting and language definitions
- shortcuts.xml: custom command to execute the python module

Before copying the files to the correct paths, make sure you edit shortcuts.xml and setup the right paths for your YCDIVFX MaxPlus Packages folder. If you are running3ds Max 2014 Extension and not 3ds Max 2015 change %ADSK_3DSMAX_x64_2015% to %ADSK_3DSMAX_x64_2014%. Default path for is: C:\YCDIVFX_MaxPlus\

So after we did that we copy the files to the following directories:

- MaxScript.xml: C:\Program Files (x86)\Notepad++\plugins\APIs
- userDefineLang.xml: C:\Users\[username]\AppData\Roaming\Notepad++
- shortcuts.xml: C:\Users\[username]\AppData\Roaming\Notepad++

Default shortcut for executing files is Ctrl+E. Gentle reminder, you need to have an instance of 3ds Max runnnig and remember to Ctrl+S and then Ctrl+E :) Also, if you need to make changes to any of the files, make sure you do it with standard Notepad and have Notepad++ closed since it blocks the files while open.

Get it here!


Hopefully this makes your life easier and faster.
This wouldn’t be possible without all the hard work from Sven Fraeys and Christoph Bülter so don’t forget to visit their website and check their work!

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

And with it, the Python API!

Which comes with something really interesting now… PySide 2.1 is built-in! Really cool :)

Anyway, bookmark this URL, you will probably need it during the next year:

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

I finally managed to get the viewport grabbing to work with python only, no hacks using MaxPlus.Core.EvalMAXscript(). More or less :) It’s working for the standard viewport.getViewportDib() equivalent in Maxscript, I still can’t figure out how to grab it directly from the GraphicsWindow (gw.getViewportDib()) to get a clean viewport snapshot without any overlays like gizmos, etc. This method works only in 2015.

Long story short, I’ve updated the YCDIVFX MaxPlus Packages in github and even added a new package called maxhelpers where I will put code that will be reused across all other packages.


Here’s how the code looks:

To grab and display the bitmap in max you just need to do this:

Hope this is useful!

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with:

In Maxscript! I’ll just leave it here as a reminder and hopefully it will be useful for you too!~

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone
Tagged with: