CGTalk > Software Specific Forums > Autodesk 3ds max > 3dsMax SDK and MaxScript
To minimize the ads you see on this page create a CGTalk account and log in HERE
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 01-07-2012, 08:57 PM   #1
notNullGothik
New Member
portfolio
Itzjac Daath
mexico, Mexico
 
Join Date: Aug 2010
Posts: 11
Console logging for a max plugin

I wonder if anyone here has tried debugging a plugin by printing info in the windows console, maybe the node name, hierarchy, etc. I tried this using the simple standard C++ ostream (cout), but i can't even make the console open. My plugin sets the Linker->System->Subsystem->Console (/SUBSYSTEM:CONSOLE) option but when the debugger starts, is hidden anyway.
Do I have to manually create the console in the plug-in initialization or is there an easier way of doing this?
 
Old 01-09-2012, 07:40 AM   #2
stigatle
Expert
 
stigatle's Avatar
portfolio
Stig Atle Steffensen
Project Engineer
National Oilwell Varco
kristiansand, Norway
 
Join Date: Aug 2010
Posts: 324
You can print to the output window in visualstudio.

see here:

http://www.windows-tech.info/18/5bc1830de822b81d.php
__________________
http://stigatle.no
 
Old 01-10-2012, 12:22 PM   #3
dokdan85
Veteran
 
dokdan85's Avatar
portfolio
Daniel
R&D
Demolition VFX
Tel Aviv, Israel
 
Join Date: Dec 2010
Posts: 43
you also can print to maxscript listener with mprintf()
if it help you
 
Old 01-10-2012, 01:41 PM   #4
Pjanssen
Veteran
portfolio
Pier Janssen
Göteborg, Sweden
 
Join Date: Apr 2003
Posts: 2,400
Quote:
Originally Posted by stigatle
You can print to the output window in visualstudio.

see here:

http://www.windows-tech.info/18/5bc1830de822b81d.php

The SDK also provides a function "DebugPrint" allowing easy string formatting, which is nice.
 
Old 01-11-2012, 03:49 PM   #5
notNullGothik
New Member
portfolio
Itzjac Daath
mexico, Mexico
 
Join Date: Aug 2010
Posts: 11
Thank you guys, indeed all of those were useful, although a bit restrictive. The thing is I already have a dll logger which works in a windows console and i use for other enviroemnts, it will be perfect if I can redirect my logging printing of this max plugin to that dll, with those options you mention it will be tricky but let me try...
 
Old 01-12-2012, 06:23 AM   #6
stigatle
Expert
 
stigatle's Avatar
portfolio
Stig Atle Steffensen
Project Engineer
National Oilwell Varco
kristiansand, Norway
 
Join Date: Aug 2010
Posts: 324
Quote:
Originally Posted by dokdan85
you also can print to maxscript listener with mprintf()
if it help you


Thanks for this tip, I honestly did not know that, this is very useful!
__________________
http://stigatle.no
 
Old 10-04-2012, 06:34 AM   #7
duke
Lord of the posts
George Rolfe
Newport, AU
 
Join Date: Mar 2002
Posts: 872
Quote:
Originally Posted by dokdan85
you also can print to maxscript listener with mprintf()
if it help you


What do I have to include to use that? It doesn't know what it is from a new wizard generated modifier.
 
Old 10-04-2012, 06:43 AM   #8
stigatle
Expert
 
stigatle's Avatar
portfolio
Stig Atle Steffensen
Project Engineer
National Oilwell Varco
kristiansand, Norway
 
Join Date: Aug 2010
Posts: 324
try to include:
Code:
#include <stdio.h>
__________________
http://stigatle.no
 
Old 10-04-2012, 04:06 PM   #9
dokdan85
Veteran
 
dokdan85's Avatar
portfolio
Daniel
R&D
Demolition VFX
Tel Aviv, Israel
 
Join Date: Dec 2010
Posts: 43
Quote:
Originally Posted by duke
What do I have to include to use that? It doesn't know what it is from a new wizard generated modifier.


try
#include "maxscrpt.h"
or
#include "maxscrpt\maxscrpt.h"
 
Old 10-04-2012, 04:06 PM   #10
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:45 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.