maxscript

get distance in meters maxscript

倖福魔咒の 提交于 2020-01-06 04:11:19
问题 Is there a way to get distance between two objects in meters? I'm trying this right now units.displayType =#metric myDistance = distance aObject1 aObject2 label1.text = distance as string Of course this is giving me the distance between those objects but in units of 3dsmax... So if anyone knows a way or a formula i will be really grateful thank you 回答1: There is a whole topic in maxscript help dedicated to this, Units Struct - Accessing System and Display Units The piece of code you need

Denormalize vector

一世执手 提交于 2019-12-30 11:12:15
问题 How can I denormalize a vector that has been normalized to get the original values prior to normalizing? For example: vec = [-0.5, -1.0, 0.0] vec_length = sqrt(vec.x^2 + vec.y^2 + vec.z^2) vec_normalized = [vec.x/vec_length, vec.y/vec_length, vec.z/vec_length] yields: vec_length = 1.11803 vec_normalized = [-0.447214,-0.894427,0] How can I get the original vector [-0.5, -1.0, 0.0] from the normalized vector [-0.447214,-0.894427,0]? Thanks! 回答1: You can't. There are infinite number of vectors

Should I parse git status or use gitsharp?

让人想犯罪 __ 提交于 2019-12-21 14:59:30
问题 I'd like to integrate git into production pipeline to stage 3dsmax files. While it is alright to work with git through TortoiseGit, I'd like to communicate with it from the Maxscript to add custom menu commands to 3dsmax. Should I parse git status output text to determine folder status or should I use some wrapping tool to correctly communicate with git? I was thinking about gitsharp since it is easy to call dotNet objects from Maxscript, but I didn't use external dotNet programs. 回答1: My own

Should I parse git status or use gitsharp?

巧了我就是萌 提交于 2019-12-21 14:59:25
问题 I'd like to integrate git into production pipeline to stage 3dsmax files. While it is alright to work with git through TortoiseGit, I'd like to communicate with it from the Maxscript to add custom menu commands to 3dsmax. Should I parse git status output text to determine folder status or should I use some wrapping tool to correctly communicate with git? I was thinking about gitsharp since it is easy to call dotNet objects from Maxscript, but I didn't use external dotNet programs. 回答1: My own

Python scripting in 3dsmax [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-11 16:27:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Please where can I find resources for Python scripting inside 3dsmax ? I tried Google but the results I found just discuss the access to the Python engine via Maxscript. I found a little introduction at http://www.sfdm.scad.edu/ but it's not enough. 回答1: The 3ds Max Python API Help should get you started: http:/

Maxscript - Changing the value for all Box objects in a Scene, on different Keyframes?

给你一囗甜甜゛ 提交于 2019-12-11 15:41:55
问题 I am new to Maxcscript, I try to explain a problem the best I can, I am trying to make a script in Maxscript, that would change a height to a zero of all box objects in a scene on their first keyframe. I have several scenes that all have a number of boxes, some have 12, some 20 boxes, etc. And all boxes are animated - but on different keyframes, for example first box is animated from 12-23rd frame, second box is animated from 30-45 frame, etc. (so I cant put specific frame number in a script)

Smart Indenting of brackets (parenthesis) in sublime text 2

混江龙づ霸主 提交于 2019-12-09 17:58:37
问题 I've got a pretty sweet setup for editing and running maxscript from inside sublime text 2. The one thing I've been wanting recently is to emulate or copy the behaviour of the curly brackets with the normal round brackets EDIT: Sorry - Chrome decided I was finished editing there when I wasn't :( If I type if (x) then { then enter I will get a nicely formatted block, with the caret now at the arrow if(x) then { <- } but I cant find where sublime text is hiding it. I want to copy this behaviour

Should I parse git status or use gitsharp?

烂漫一生 提交于 2019-12-04 09:15:01
I'd like to integrate git into production pipeline to stage 3dsmax files. While it is alright to work with git through TortoiseGit, I'd like to communicate with it from the Maxscript to add custom menu commands to 3dsmax. Should I parse git status output text to determine folder status or should I use some wrapping tool to correctly communicate with git? I was thinking about gitsharp since it is easy to call dotNet objects from Maxscript, but I didn't use external dotNet programs. My own attempt to solve this resulted in parsing git status. Seems cleaner and easier to implement. On the other

Smart Indenting of brackets (parenthesis) in sublime text 2

元气小坏坏 提交于 2019-12-04 05:40:51
I've got a pretty sweet setup for editing and running maxscript from inside sublime text 2. The one thing I've been wanting recently is to emulate or copy the behaviour of the curly brackets with the normal round brackets EDIT: Sorry - Chrome decided I was finished editing there when I wasn't :( If I type if (x) then { then enter I will get a nicely formatted block, with the caret now at the arrow if(x) then { <- } but I cant find where sublime text is hiding it. I want to copy this behaviour to the normal round brackets () instead of getting if (x) then ( <-) I've found where it does this on

A QApplication instance already exists

主宰稳场 提交于 2019-12-03 18:05:45
问题 I'm doing some simple PySide on 3Dsmax 2015. This is my error: python.ExecuteFile "C:\Program Files\Autodesk\3ds Max 2015\scripts\Python\demoUniTest.py" -- Runtime error: Line 32 <module>() <type 'exceptions.RuntimeError'> A QApplication instance already exists. This is my code: import sys from PySide.QtCore import * from PySide.QtGui import * from math import * class Form(QDialog): def __init__(self,parent=None): super(Form,self).__init__(parent) self.browser = QTextBrowser() self.lineedit =