Maya to Vray Parser update to show camera layers...

Post Reply
seven11
Posts: 20
Joined: Tue Feb 21, 2017 8:03 pm

Maya to Vray Parser update to show camera layers...

Post by seven11 »

Hi Timur,
This update is to the mayatovray parser to show the camera layer count as it converts the maya scene file to a vrscene file.
Great to have when you are doing multipass rendering of large sequences.
-Scott

afanasy/python/parsers/mayatovray.py

Code: Select all

# -*- coding: utf-8 -*-

from parsers import parser

FRAME = 'Appending '
RESET_COUNT = 'Render complete'
PERCENT = 'PROGRESS: '
PERCENT_len = len(PERCENT)

class mayatovray(parser.parser):
	"""Simple generic parser (mayatovray)
	"""

	def __init__(self):
		parser.parser.__init__(self)
		self.firstframe = True
		self.layer = 1

	def do(self, data, mode):
		"""Missing DocString

		:param data:
		:param mode:
		:return:
		"""
		# print(data)
		needcalc = False
		if data.find(FRAME) > -1:
			if self.firstframe:
				self.firstframe = False
			else:
				self.frame += 1
				self.activity = 'Layer ' + str(self.layer) + ':'
				needcalc = True
		if data.find(RESET_COUNT) > -1:
			self.layer += 1
			self.firstframe = True
			self.frame = 0
		percent_pos = data.find(PERCENT)
		if percent_pos > -1:
			ppos = data.find('%')
			if ppos > -1:
				needcalc = True
				self.percentframe = int(data[percent_pos + PERCENT_len:ppos])
		if needcalc:
			self.calculate()
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Maya to Vray Parser update to show camera layers...

Post by timurhai »

Hi.
It will be useful to create a pull request on GutHub for such issues.
https://github.com/CGRU/cgru
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply