Override the "Create button"/setting

Hi Everyone,

Through the last few years of experience using 3dsmax and Vray, I have some custom setting that I use in almost every project, and I am planning to customize 3dsmax and Vray to those setting so I could let my colleague using it. These are some example of things that I would like to change:

[a] vray light setting
[b] vray material setting

Create a rollout of light or material preset/setup is good, but what I hope is to override the original button and setting so my colleague don't need to change their habit of work. Here's some of my idea for it:

[1] vray light | create the light by pressing the same button, but the setting is customized, or it will create a vraylight with rig setup

[2] vray material | vray material is created with customized setting every time they create a new one

Could you advice, or give me an idea or a hint of direction of which way should I dig into?
Thank you very much!


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
juleslin's picture

Appreciate that Farjar, I

Appreciate that Farjar, I will try now.

fajar's picture

using callbacks u can do

using callbacks u can do that.....

clue on...

#nodeCreated: node

or you could modify "vrayutils.ms" in maxfolder/scripts/startup

macroScript VRaySphere
	buttonText:"V-Ray Sphere"
	toolTip: "Create V-Ray Sphere"
	on execute do StartObjectCreation VRaySphere
macroScript VRayLight_Plane
	buttonText:"V-Ray Plane Light"
	toolTip: "Create V-Ray Plane Light"
	fn setType obj = (if (classof(obj)==VRayLight) do (obj.type = 0); obj.affect_reflections = off) --- or any vray plane light properties that yoo want to change
	on execute do StartObjectCreation VRayLight newNodeCallback: setType

after finishing your script , then share it to your friend, show it how to install and thats all, no need to change the way your friend work.

here is vray light properties that you might want to change

 .on : boolean
  .type : integer
  .castShadows : boolean
  .size0 : worldUnits
  .size1 : worldUnits
  .size2 : worldUnits
  .subdivs : integer
  .color_mode : integer
  .color_temperature : float
  .color : RGB color
  .multiplier : float
  .doubleSided : boolean
  .invisible : boolean
  .affect_diffuse : boolean
  .affect_specualr (affect_specular) : boolean
  .affect_reflections : boolean
  .ignoreNormals : boolean
  .normalizeColor : integer
  .noDecay : boolean
  .storeWithIrradMap : boolean
  .notUsed : integer
  .notUsed : integer
  .skylightPortal : boolean
  .simplePortal : boolean
  .smoothSurfaceShadows : boolean
  .texmap : texturemap
  .texmap_on : boolean
  .texmap_resolution : integer
  .texmap_adaptiveness : float
  .dome_emitRadius : worldUnits
  .dome_targetRadius : worldUnits
  .dome_spherical : boolean
  .dome_rayDistanceMode : integer
  .dome_rayDistance : worldUnits
  .shadowBias : worldUnits
  .dome_visibleOriginal : integer
  .cutoffThreshold : float
  .mesh_source : node
  .mesh_replaceOnPick : boolean
  .mesh_flip : boolean
  .lightDistribution : float
  .enable_viewport_shading : boolean
  .targeted : boolean
  .target_distance : worldUnits
  .preview_distribution (type) : integer
  .excludeList : node array
  .includeList : node array
  .inclExclType : integer

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.