3ds max sdk .NET

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Display Modes
  08 August 2017
Have you seen this thread?
http://forums.cgsociety.org/showthr...554#post8027554
__________________
Andrés FC.
P3D_PathScripts
 
  08 August 2017
I definitely have seen it before, thx. Feel like reinventing the wheel
 
  04 April 2018
I'm trying to create CustomAttrib using SDK-NET.
__________________
Andrés FC.
P3D_PathScripts

Last edited by aaandres : 07 July 2018 at 11:04 AM.
 
  04 April 2018
Well, at least I've solved saving modified parameters values with the scene:
__________________
Andrés FC.
P3D_PathScripts

Last edited by aaandres : 07 July 2018 at 11:04 AM.
 
  05 May 2018
Names problem solved.
Thanks in any case.
__________________
Andrés FC.
P3D_PathScripts
 
  05 May 2018
Need help (again).

I've done a custom attribute plugin with SDK.NET
Now I'm trying to find its dependents through a "DependentEnumProc" class.
All works fine but...
... when the ReferenceMaker is a CustAttribContainer (the one I'm interested in), I can't cast it to IICustAttribContainer.

That is:
IReferenceMaker: Autodesk.Max.Wrappers.ReferenceTarget
IReferenceMaker.ClassName: CustAttribContainer
IReferenceMaker.SuperClassID: RefMaker
IReferenceMaker.GetType: Autodesk.Max.Wrappers.ReferenceTarget

Then I want to get its 'owner' through: (thanks DenisT)
((IICustAttribContainer)rmaker).Owner;

But I get the typical error "Unable to cast object of type 'Autodesk.Max.Wrappers.ReferenceTarget' to type 'Autodesk.Max.IICustAttribContainer'.
   at P3D.CountDependents.Proc(IReferenceMaker rmaker) in D:\_000-ANDRES\PROGRAMACION\VISUAL C#\\CustomAttrib\P3D_UTILS-01.cs:line 264
   at Autodesk.Max.Wrappers.ManagedWrapperDependentEnumP roc.proc(ManagedWrapperDependentEnumProc* , ReferenceMaker* rmaker)".

Can anyone think about another way to do this? Marshaling? A workaround?

NOTE: if I return from this method an array with all the Reference Makers, in Maxscript I get a 'dotNetObject:Autodesk.Max.Wrappers.ICustAttribCon tainer' object from wich I can get its owner (with the good result). Seems that the cast to dotnet works automatically!!??
__________________
Andrés FC.
P3D_PathScripts
 
  06 June 2018
I have been looking at your problem. And there seems to be no easy answer. The simple cast should do it (as per maxscript result), but that is not true. But I'm still investigating.
__________________
Daniel Santana | Co-Founder / Technical Director
You can do it! VFX
Lisbon/Porto - Portugal
http://www.ycdivfx.com
 
  06 June 2018
Thanks a lot for your time, Daniel.
Working with SDK.NET is an obstacle course, some of them insurmountable.
__________________
Andrés FC.
P3D_PathScripts
 
  06 June 2018
"Working with SDK.NET is an obstacle course, some of them insurmountable."     Andrés FC.





 
  06 June 2018
Originally Posted by aaandres: Thanks a lot for your time, Daniel.
Working with SDK.NET is an obstacle course, some of them insurmountable.
Very true . Mostly because they never finished everything in Autodesk.Max, they add what was needed to run the .NET UI (WPF and WinForms), and to run the StateSets, remember the true origin of the .NET SDK was from Ephere.
The new MaxPlus should had supersede the Autodesk.Max, using swig to automate most of the C++ SDK to .NET bindinds, but that is also not true, since we can't create a SDK Plugin in MaxPlus, and again it was used to drive the first Python iteration and MCG.
__________________
Daniel Santana | Co-Founder / Technical Director
You can do it! VFX
Lisbon/Porto - Portugal
http://www.ycdivfx.com
 
  06 June 2018
Originally Posted by dgsantana: Very true . Mostly because they never finished everything in Autodesk.Max, they add what was needed to run the .NET UI (WPF and WinForms), and to run the StateSets, remember the true origin of the .NET SDK was from Ephere.
The new MaxPlus should had supersede the Autodesk.Max, using swig to automate most of the C++ SDK to .NET bindinds, but that is also not true, since we can't create a SDK Plugin in MaxPlus, and again it was used to drive the first Python iteration and MCG.
It's very unusual to see a good independent project get any better after been acquired by a major corporation. And when it does, it takes years.
__________________
Jorge Rodríguez
PolyTools3D
 
  06 June 2018
Well, it seems that this obstacle is surmountable!
__________________
Andrés FC.
P3D_PathScripts

Last edited by aaandres : 07 July 2018 at 11:06 AM.
 
  06 June 2018
In fact,  we can pass objects to C#:
__________________
Andrés FC.
P3D_PathScripts

Last edited by aaandres : 07 July 2018 at 11:11 AM.
 
  06 June 2018
..........
__________________
Andrés FC.
P3D_PathScripts

Last edited by aaandres : 07 July 2018 at 11:11 AM.
 
reply share thread



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 08:05 PM.


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