Please describe the feature you have in mind and explain what the current shortcomings are?
Consider refactoring the existing implementation of 3dsmax to replace rt.execute() calls with the appropriate pymxs implementation. Although rt.execute()allows executing MAXScript code within pymxs, it is less efficient and less safe compared to using pymxs functions directly.rt.execute() involves parsing and evaluating MAXScript code, leading to a slight performance overhead. Additionally, and more importantly, it often bypasses crucial built-in safety mechanisms provided by the pymxs API, such as error handling. This can lead to silent fails making debugging more challenging.
How would you imagine the implementation of the feature?
Refactoring the code would involve replacing rt.execute() calls with there pymxs implementation (where possible).
An example of this:
This new implementation directly assigns the desired animation range to rt.animationRange using the rt.interval() constructor. By doing so, we eliminate the need to construct a MAXScript command string and execute it using rt.execute(). This refactor improves efficiency and eliminates potential safety concerns associated with using rt.execute() for this particular example.
Are there any labels you wish to add?
[X] I have added the relevant labels to the enhancement request.
Is there an existing issue for this?
Please describe the feature you have in mind and explain what the current shortcomings are?
Consider refactoring the existing implementation of 3dsmax to replace
rt.execute()
calls with the appropriate pymxs implementation. Althoughrt.execute()
allows executing MAXScript code within pymxs, it is less efficient and less safe compared to using pymxs functions directly.rt.execute()
involves parsing and evaluating MAXScript code, leading to a slight performance overhead. Additionally, and more importantly, it often bypasses crucial built-in safety mechanisms provided by the pymxs API, such as error handling. This can lead to silent fails making debugging more challenging.How would you imagine the implementation of the feature?
Refactoring the code would involve replacing
rt.execute()
calls with there pymxs implementation (where possible). An example of this:Current:
frange_cmd = f"animationRange = interval {frame_start} {frame_end}"
rt.execute(frange_cmd)
Refactor:
rt.animationRange = rt.interval(frame_start, frame_end)
This new implementation directly assigns the desired animation range to rt.animationRange using the rt.interval() constructor. By doing so, we eliminate the need to construct a MAXScript command string and execute it using rt.execute(). This refactor improves efficiency and eliminates potential safety concerns associated with using rt.execute() for this particular example.
Are there any labels you wish to add?
Describe alternatives you've considered:
No response
Additional context:
No response
[cuID:OP-5945]