Notifications
Clear all

[Closed] How can i do this ? and this ?

the problem it’s here


if ( ( RappaTools.open ) and ( RappaTools.theZone.subModeling.btn_connectslidepus  h.enabled ) ) then

says that RappaTools.open it’s not defined… but if i type RappaTools.open in the listener or evaluate that… i get true like i should… but the macro won’t see it…only if i evaluate the macro

Yup, clearly a variable scope problem, it’s hard to diagnose without the full code, but basically you have to make sure that RappaTools is defined as a global variable before anything else runs, or that it’s visible to the macro.


--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--
-- START RAPPATOOLS
--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx--

(
	starTime = timeStamp()

	--------------------
	global RappaTools, theZone, subColors, subRender, subViewPort, subModeling, subFly, subShakeCam, subObjVibrator, subSnowMaker, subInfo
	global RappaToolsSpinner, RappaToolsExtra, RappaToolsSetPos, RappaToolsColorsS, RappaToolsColorsL --thePose
	--------------------
	global rappa_fn, rappa_btn, infoMessage, PolyTools_Slide, Polytools_Push, disTool, roNotify, selElem -- is, savecolorsfn, loadcolorsfn, loadColorsList, deleteColorsList
	global lightthing, camthing, meditthing
	--, sceneCam, sceneCamNames, sceneLight, sceneLightNames, sceneMat, sceneMatNames
	--------------------	
	global commandWidth = 225
	--slf = 0, scf = 0, polycolor = (getuicolor 8)*255, polytext1, polytext2, 

this is the beginning of the script :)… pretty sure that everything it’s global !

if you have 3ds max 2010 you could try getting rappatools (i’ve released v1.6 today… yesterday since now it’s 12:30AM) and see if you have the same problem

 JHN

So many globals, that’s asking for problems…
You should try make 1 global rappatools struct and reference your other variables from there.
Or prefix every global var with a “rappatools_” prefix.
Variables like “infoMessage” are so generic, it’s waiting for another tool to overwrite that.

My 2 cents,
-Johan

Johan well i started rewriting rappatools again… i think it’s the 6’th time :)… now i have only one global or 2… i got rid of the subRollout’s and i’m going to brake it in 2… but now i have to do test’s over test’s to make sure that that everything works again… plus i have to change a few thing since there are no more subRollout’s… anyway…

i got another question (since the quad problem might get fixed after i finish the change) i was thinking of using .xml file instead of .ini to store settings and stuff like that… if it’s faster or better how to use the xml ? like write to an xml file and read…

Well, if you are only storing preferences and stuff like that, I would say stay with the INI. While you could use XML, I don’t think it’s worth the hassle. The beauty of XML is that it’s well standardized, so it can be used to share with other applications for instance, but that’s not really something you need.

As for the speed, unless you are writing massive amounts of data I doubt you’ll notice any significant difference.

is it possible to have modify panel (from command panel) in a script rollout? i mean just the modifiers list and the subRollout bellow it !?

Page 6 / 6