Maxscripters: check your script for Max 2014 compatibility

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  03 March 2013
Maxscripters: check your script for Max 2014 compatibility

There was a small change introduced with 3ds Max 2014:
struct declarations are handled in a stricter way now. You are not allowed to declare a member variable more than once ( which was possible before )
There might be some existing scripts out, which are affected by this change and might break at compile time in Max 2014. Please see the following post for exact details

http://forums.cgsociety.org/showpos...00&postcount=14
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
  03 March 2013
In the post you are linking to, this will work without forward definition in pre-2014 max versions :

struct TestB
(
	member1,
	
	function DependsOnF1=
	(
		this.F1();
	),

	function F1 =
	(
		print member1;
	)
)


edit: Btw, it needs an instance so that you can call theTestBInstance.DependsOnF1()

I didn't test it in 2014, could you say us if it is still working ?

Last edited by feranti : 03 March 2013 at 03:00 PM.
 
  03 March 2013
Originally Posted by feranti: I didn't test it in 2014, could you say us if it is still working ?


yes still works

good to know about the this solution

I'm so used to that "pseudo forward" style that i did'nt investigate other solutions for that...
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
  03 March 2013
RayMeshGridIntersect.intersectSphere is broken as well, intersectBox still works so that can be used as a fallback.
__________________
The GPU revolution will not be rasterized! - http://www.jdbgraphics.nl
 
  04 April 2013
Now that Max 2014 is officially released, i give this thread a little bump...
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
  05 May 2013
In Max 2013/2014 the following causes a system exception. It works in prior versions:

(
  	-- collect the data into an array and ensure files are absolute paths
  	local oldArray = #()
  	ATSOps.GetFiles &oldArray
  
  	for itm in oldArray do 
  	(
  		ATSOps.SelectFiles itm
  		ATSOps.ResolveSelectionToAbsolute()
  	)
  )
 
  05 May 2013
Originally Posted by JasonB: In Max 2013/2014 the following causes a system exception. It works in prior versions:

(
  	-- collect the data into an array and ensure files are absolute paths
  	local oldArray = #()
  	ATSOps.GetFiles &oldArray
  
  	for itm in oldArray do 
  	(
  		ATSOps.SelectFiles itm
  		ATSOps.ResolveSelectionToAbsolute()
  	)
  )



yep - fails here too
Whats failing is ATSOps.ResolveSelectionToAbsolute()
Further investigation shows all ATSOps select commands throw a system exception


    <bool>ResolveSelectionToUNC()
    <bool>ResolveSelectionRelativeToProjectFolder()
    <bool>ResolveSelectionToAbsolute()


UPDATE:
I only see this exception while the Asset Tracker dialog is open. When it's closed it doesn't fail here
So it seems to be something in the Asset Tracker dialog code. Nevertheless i reported it ...
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio

Last edited by spacefrog : 05 May 2013 at 06:14 AM.
 
  05 May 2013
In 2013 the skin modifier changed the list to alphabetical order, so the bone index was no longer predictable. But if you had 20 bones, the highest index was 20. If you removed 10 bones the indices were updated so the highest was now 10.

In 2014, the bone index doesn't change if you remove a bone. So if you have 20 bones, and remove 10 the highest index is still 20. I tried the Invalidate method, but it doesn't seem to do anything.

I had to change this function, but is there a better way?


	fn getSkinBones obj =
	(
		boneArray = #()
		bCount = skinOps.GetNumberBones obj.skin
		
		for i = 1 to bCount do
		(
			append boneArray (skinOps.GetBoneName obj.skin i 1)
		)
		
		boneArray
	)


Update:

	fn getSkinBones obj =
	(
		boneArray = #()
		bCount = skinOps.GetNumberBones obj.skin
		i = 1
		
		while boneArray.count != bCount do
		(
			try(append boneArray (skinOps.GetBoneName obj.skin i 1))catch()
				
			i += 1
		)
		
		sort boneArray
	)
__________________
Juan Martinez | Blog | Animator
 
  05 May 2013
I would consider this a bug ( non updating bones index )

Did you report it t? If not, please do so ...
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
  05 May 2013
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



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 06:47 PM.


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