Notifications
Clear all

[Closed] Camera "Plugin" extension

Hello, i found this topic about Standard Camera Extensions

the problem is that i can’t extend a vrayphisicalcamera as i can do with the standard one. i’d like to add the spinners to the “new” vraycamera as opposed to what you can see in the standard. the camera shows up as a new camera but without spinners.

here is the standard one that works

plugin Camera TestStd_Cam
name:"TestStd_Cam"
classID:#(0x2f145551, 0x3886df88)
category:"Standard"
extends: FreeCamera
(

  parameters pblock rollout:params
  (
    radius1 type:#float animatable:true ui:r1_amount default:40.0
    radius2 type:#float animatable:true ui:r2_amount default:20.0
  )
  rollout params "CamTest Parameters"
  (
    Spinner r1_amount "Radius 1:" range:[0, 1e9, 40]
    Spinner r2_amount "Radius 2:" range:[0, 1e9, 20]
  )

)

but this one doesn’t

plugin Camera TestVrCam
name:"TestVrCam"
classID:#(0x671989bf, 0x25070b5a)
category:"VRay"
extends: VRayPhysicalCamera
(

  parameters pblock rollout:params
  (
    radius1 type:#float animatable:true ui:r1_amount default:40.0
    radius2 type:#float animatable:true ui:r2_amount default:20.0
  )
  rollout params "CamTest Parameters"
  (
    Spinner r1_amount "Radius 1:" range:[0, 1e9, 40]
    Spinner r2_amount "Radius 2:" range:[0, 1e9, 20]
  )

)

do you know why it’s not working?
thanks

ps: i’d be happy just to be able to add a button (not necessarily spinners) to the camera so i can run some function from that butotns!

4 Replies

use custom attributes

thanks, i was actually using custom attributes in an attributes holder but when i saw i could do this in the camera (from the example file) i tought i could do the same for a vraycam. i just liked to know if i can extend the camera but seems not from your reply.

i could eventually use the appdata attribute together with the active camera so when i set the active camera it would change the resolution for example but is not what i meant to do.

the “problem” wit the custom attributes is that i need to have a modifier and i thought i could avoid it with this method

1 Reply
(@serejah)
Joined: 11 months ago

Posts: 0

you can add them directly to the object


ca = attributes myca attribID:#(0xdeadbeef, 0xdeadbeef)
(
	parameters main rollout:main
	(
		
		
	)	
	
	rollout main "settings"
	(
		button btn1 "Button 1"
		button btn2 "Button 2" across:2
		button btn3 "Button 3"
	)
)

custAttributes.add $ ca

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5]

wow! i didn’t know that, i tought it was only via attribute holder

thank you very much!