Example #1
0
    def __init__(self, camera, asset_handler, engine):
        logger.debug("Creating camera translator")
        super().__init__(camera, asset_handler)

        self.__as_camera = None
        self.__xform_seq = asr.TransformSequence()
        self.__engine = engine
Example #2
0
 def xform_update(self, inst_key, bl_matrix, as_assembly, as_scene):
     logger.debug("Updating instances for %s", self.appleseed_name)
     xform_seq = asr.TransformSequence()
     xform_seq.set_transform(0.0, self._convert_matrix(bl_matrix))
     ass_name = f"{self.appleseed_name}_ass"
     ass_inst_name = f"{inst_key}_ass_inst"
     ass_inst = asr.AssemblyInstance(ass_inst_name, {}, ass_name)
     ass_inst.set_transform_sequence(xform_seq)
     as_assembly.assembly_instances().insert(ass_inst)
     self.__instances[inst_key] = as_assembly.assembly_instances(
     ).get_by_name(ass_inst_name)
    def __init__(self, asset_handler, engine, context, camera=None):
        logger.debug("Creating interactive camera translator")
        super().__init__(camera, asset_handler)

        self.__as_camera = None
        self.__xform_seq = asr.TransformSequence()
        self.__engine = engine
        self.__context = context
        self.__model = None
        self.__view_cam_type = None
        self.__params = None
        self.__matrix = None
Example #4
0
	def testTransformationMotionBlur( self ) :

		transformSequence = appleseed.TransformSequence()
		IECoreAppleseed.TransformAlgo.makeTransformSequence(
			[ 0.25, 0.5, 0.75 ],
			[ imath.M44f().translate( imath.V3f( 0 ) ), imath.M44f().translate( imath.V3f( 1 ) ), imath.M44f().translate( imath.V3f( 2 ) ) ],
			transformSequence
		)

		transforms = transformSequence.transforms()
		self.assertTrue( len( transforms ) == 3 )
		self.assertTrue( transforms[0][0] == 0.25 )
		self.assertTrue( transforms[1][0] == 0.50 )
		self.assertTrue( transforms[2][0] == 0.75 )
Example #5
0
 def add_instance(self, key):
     logger.debug("Adding instance to %s", self.appleseed_name)
     self.__instances[key] = asr.TransformSequence()
Example #6
0
    def __init__(self, obj, asset_handler):
        super(ObjectTranslator, self).__init__(obj, asset_handler)

        self._xform_seq = asr.TransformSequence()
        self._num_instances = 1
Example #7
0
    def __init__(self, camera, asset_handler):
        super(CameraTranslator, self).__init__(camera, asset_handler)
        self._xform_seq = asr.TransformSequence()

        self.__cam_map = None
        self.__cam_map_inst = None